OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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> |
11 #include <GLES2/gl2extchromium.h> | 11 #include <GLES2/gl2extchromium.h> |
12 | 12 |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
17 #include "gpu/command_buffer/service/gpu_switches.h" | |
18 #include "gpu/command_buffer/tests/gl_manager.h" | 17 #include "gpu/command_buffer/tests/gl_manager.h" |
19 #include "gpu/command_buffer/tests/gl_test_utils.h" | 18 #include "gpu/command_buffer/tests/gl_test_utils.h" |
| 19 #include "gpu/config/gpu_switches.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 | 22 |
23 namespace gpu { | 23 namespace gpu { |
24 | 24 |
25 // A collection of tests that exercise the glClear workaround. | 25 // A collection of tests that exercise the glClear workaround. |
26 class GLClearFramebufferTest : public testing::TestWithParam<bool> { | 26 class GLClearFramebufferTest : public testing::TestWithParam<bool> { |
27 public: | 27 public: |
28 GLClearFramebufferTest() : color_handle_(0u), depth_handle_(0u) {} | 28 GLClearFramebufferTest() : color_handle_(0u), depth_handle_(0u) {} |
29 | 29 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 glClearDepthf(0.9f); | 192 glClearDepthf(0.9f); |
193 glClear(GL_DEPTH_BUFFER_BIT); | 193 glClear(GL_DEPTH_BUFFER_BIT); |
194 DrawQuad(); | 194 DrawQuad(); |
195 // Verify - depth test should have passed, so red. | 195 // Verify - depth test should have passed, so red. |
196 EXPECT_TRUE( | 196 EXPECT_TRUE( |
197 GLTestHelper::CheckPixels(0, 0, 1, 1, 0 /* tolerance */, kRed)); | 197 GLTestHelper::CheckPixels(0, 0, 1, 1, 0 /* tolerance */, kRed)); |
198 } | 198 } |
199 | 199 |
200 } // namespace gpu | 200 } // namespace gpu |
OLD | NEW |