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 #include <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
6 #include <GLES2/gl2ext.h> | 6 #include <GLES2/gl2ext.h> |
7 | 7 |
8 #include "gpu/command_buffer/tests/gl_manager.h" | 8 #include "gpu/command_buffer/tests/gl_manager.h" |
9 #include "gpu/command_buffer/tests/gl_test_utils.h" | 9 #include "gpu/command_buffer/tests/gl_test_utils.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace gpu { | 13 namespace gpu { |
14 | 14 |
15 class OcclusionQueryTest : public testing::Test { | 15 class OcclusionQueryTest : public testing::Test { |
16 protected: | 16 protected: |
17 virtual void SetUp() { | 17 void SetUp() override { |
18 GLManager::Options options; | 18 GLManager::Options options; |
19 options.size = gfx::Size(512, 512); | 19 options.size = gfx::Size(512, 512); |
20 gl_.Initialize(options); | 20 gl_.Initialize(options); |
21 } | 21 } |
22 | 22 |
23 virtual void TearDown() { | 23 void TearDown() override { gl_.Destroy(); } |
24 gl_.Destroy(); | |
25 } | |
26 | 24 |
27 void DrawRect(float x, float z, float scale, float* color); | 25 void DrawRect(float x, float z, float scale, float* color); |
28 | 26 |
29 GLManager gl_; | 27 GLManager gl_; |
30 | 28 |
31 GLint position_loc_; | 29 GLint position_loc_; |
32 GLint matrix_loc_; | 30 GLint matrix_loc_; |
33 GLint color_loc_; | 31 GLint color_loc_; |
34 }; | 32 }; |
35 | 33 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT, &result); | 140 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_AVAILABLE_EXT, &result); |
143 EXPECT_TRUE(result); | 141 EXPECT_TRUE(result); |
144 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_EXT, &query_status); | 142 glGetQueryObjectuivEXT(query, GL_QUERY_RESULT_EXT, &query_status); |
145 EXPECT_TRUE(query_status); | 143 EXPECT_TRUE(query_status); |
146 GLTestHelper::CheckGLError("no errors", __LINE__); | 144 GLTestHelper::CheckGLError("no errors", __LINE__); |
147 } | 145 } |
148 | 146 |
149 } // namespace gpu | 147 } // namespace gpu |
150 | 148 |
151 | 149 |
OLD | NEW |