| Index: gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc
|
| diff --git a/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc b/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc
|
| index ee20525a2b460e3d77d9b5733b709890a6854f78..ff2ca7975be0064d1cf710b9dd5ab77c6e6c1be1 100644
|
| --- a/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc
|
| +++ b/gpu/command_buffer/tests/gl_clear_framebuffer_unittest.cc
|
| @@ -43,6 +43,14 @@
|
| gl_.Initialize(GLManager::Options());
|
| DCHECK(!gl_.workarounds().gl_clear_broken);
|
| }
|
| + }
|
| +
|
| + bool IsApplicable() {
|
| + // The workaround doesn't use VAOs which would cause a failure on a core
|
| + // context and the hardware for each the workaround is necessary has a buggy
|
| + // VAO implementation. So we skip testing the workaround on core profiles.
|
| + return !GetParam() ||
|
| + !gl_.context()->GetVersionInfo()->is_desktop_core_profile;
|
| }
|
|
|
| void InitDraw();
|
| @@ -110,6 +118,10 @@
|
| ::testing::Values(true, false));
|
|
|
| TEST_P(GLClearFramebufferTest, ClearColor) {
|
| + if (!IsApplicable()) {
|
| + return;
|
| + }
|
| +
|
| glClearColor(1.0f, 0.5f, 0.25f, 0.5f);
|
| glClear(GL_COLOR_BUFFER_BIT);
|
|
|
| @@ -120,6 +132,10 @@
|
| }
|
|
|
| TEST_P(GLClearFramebufferTest, ClearColorWithMask) {
|
| + if (!IsApplicable()) {
|
| + return;
|
| + }
|
| +
|
| glColorMask(GL_TRUE, GL_FALSE, GL_FALSE, GL_FALSE);
|
| glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
|
| glClear(GL_COLOR_BUFFER_BIT);
|
| @@ -133,6 +149,10 @@
|
| // crbug.com/434094
|
| #if !defined(OS_MACOSX)
|
| TEST_P(GLClearFramebufferTest, ClearColorWithScissor) {
|
| + if (!IsApplicable()) {
|
| + return;
|
| + }
|
| +
|
| glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
|
| glClear(GL_COLOR_BUFFER_BIT);
|
|
|
| @@ -153,6 +173,10 @@
|
| #endif
|
|
|
| TEST_P(GLClearFramebufferTest, ClearDepthStencil) {
|
| + if (!IsApplicable()) {
|
| + return;
|
| + }
|
| +
|
| const GLuint kStencilRef = 1 << 2;
|
| InitDraw();
|
| SetDrawColor(1.0f, 0.0f, 0.0f, 1.0f);
|
|
|