#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#include <GLES2/gl2extchromium.h>
#include <stdint.h>
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "gpu/command_buffer/tests/gl_manager.h"
#include "gpu/command_buffer/tests/gl_test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#define SHADER(Src) …
namespace gpu {
class GLVirtualContextsTest
: public testing::TestWithParam<GpuDriverBugWorkarounds> { … };
constexpr GLfloat kFloatRed[4] = …;
constexpr GLfloat kFloatGreen[4] = …;
constexpr uint8_t kExpectedRed[4] = …;
constexpr uint8_t kExpectedGreen[4] = …;
namespace {
void SetupSimpleShader(const uint8_t* color) { … }
void TestDraw(int size) { … }
}
TEST_P(GLVirtualContextsTest, Basic) { … }
TEST_P(GLVirtualContextsTest, VertexArrayObjectRestore) { … }
TEST_P(GLVirtualContextsTest, VertexArrayObjectRestoreRebind) { … }
TEST_P(GLVirtualContextsTest, VertexArrayObjectRestoreDefault) { … }
TEST_P(GLVirtualContextsTest, VirtualQueries) { … }
TEST_P(GLVirtualContextsTest, Texture2DArrayAnd3DRestore) { … }
static const GpuDriverBugWorkarounds workarounds_cases[] = …;
INSTANTIATE_TEST_SUITE_P(…);
}