| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GL_GLEXT_PROTOTYPES | 5 #ifndef GL_GLEXT_PROTOTYPES |
| 6 #define GL_GLEXT_PROTOTYPES | 6 #define GL_GLEXT_PROTOTYPES |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
| 10 #include <GLES2/gl2ext.h> | 10 #include <GLES2/gl2ext.h> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class GLCopyTexImage2DWorkaroundTest : public testing::TestWithParam<GLenum> { | 26 class GLCopyTexImage2DWorkaroundTest : public testing::TestWithParam<GLenum> { |
| 27 public: | 27 public: |
| 28 GLCopyTexImage2DWorkaroundTest() {} | 28 GLCopyTexImage2DWorkaroundTest() {} |
| 29 | 29 |
| 30 protected: | 30 protected: |
| 31 void SetUp() override { | 31 void SetUp() override { |
| 32 base::CommandLine command_line(0, NULL); | 32 base::CommandLine command_line(0, NULL); |
| 33 command_line.AppendSwitchASCII( | 33 command_line.AppendSwitchASCII( |
| 34 switches::kGpuDriverBugWorkarounds, | 34 switches::kGpuDriverBugWorkarounds, |
| 35 base::IntToString(gpu::USE_INTERMEDIARY_FOR_COPY_TEXTURE_IMAGE)); | 35 base::IntToString(gpu::USE_INTERMEDIARY_FOR_COPY_TEXTURE_IMAGE)); |
| 36 gl_.InitializeWithCommandLine(GLManager::Options(), &command_line); | 36 gl_.InitializeWithCommandLine(GLManager::Options(), command_line); |
| 37 gl_.set_use_iosurface_memory_buffers(true); | 37 gl_.set_use_iosurface_memory_buffers(true); |
| 38 DCHECK(gl_.workarounds().use_intermediary_for_copy_texture_image); | 38 DCHECK(gl_.workarounds().use_intermediary_for_copy_texture_image); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void TearDown() override { | 41 void TearDown() override { |
| 42 GLTestHelper::CheckGLError("no errors", __LINE__); | 42 GLTestHelper::CheckGLError("no errors", __LINE__); |
| 43 gl_.Destroy(); | 43 gl_.Destroy(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 GLManager gl_; | 46 GLManager gl_; |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Verify. | 113 // Verify. |
| 114 const uint8_t* expected = expectations[i]; | 114 const uint8_t* expected = expectations[i]; |
| 115 EXPECT_TRUE( | 115 EXPECT_TRUE( |
| 116 GLTestHelper::CheckPixels(0, 0, 1, 1, 1 /* tolerance */, expected)); | 116 GLTestHelper::CheckPixels(0, 0, 1, 1, 1 /* tolerance */, expected)); |
| 117 } | 117 } |
| 118 } | 118 } |
| 119 | 119 |
| 120 #endif // defined(OS_MACOSX) | 120 #endif // defined(OS_MACOSX) |
| 121 | 121 |
| 122 } // namespace gpu | 122 } // namespace gpu |
| OLD | NEW |