| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #define SHADER(Src) #Src | 13 #define SHADER(Src) #Src |
| 14 | 14 |
| 15 namespace gpu { | 15 namespace gpu { |
| 16 | 16 |
| 17 class DepthTextureTest : public testing::Test { | 17 class DepthTextureTest : public testing::Test { |
| 18 protected: | 18 protected: |
| 19 static const GLsizei kResolution = 64; | 19 static const GLsizei kResolution = 64; |
| 20 virtual void SetUp() { | 20 void SetUp() override { |
| 21 GLManager::Options options; | 21 GLManager::Options options; |
| 22 options.size = gfx::Size(kResolution, kResolution); | 22 options.size = gfx::Size(kResolution, kResolution); |
| 23 gl_.Initialize(options); | 23 gl_.Initialize(options); |
| 24 } | 24 } |
| 25 | 25 |
| 26 virtual void TearDown() { | 26 void TearDown() override { gl_.Destroy(); } |
| 27 gl_.Destroy(); | |
| 28 } | |
| 29 | 27 |
| 30 GLuint SetupUnitQuad(GLint position_location); | 28 GLuint SetupUnitQuad(GLint position_location); |
| 31 | 29 |
| 32 GLManager gl_; | 30 GLManager gl_; |
| 33 }; | 31 }; |
| 34 | 32 |
| 35 GLuint DepthTextureTest::SetupUnitQuad(GLint position_location) { | 33 GLuint DepthTextureTest::SetupUnitQuad(GLint position_location) { |
| 36 GLuint vbo = 0; | 34 GLuint vbo = 0; |
| 37 glGenBuffers(1, &vbo); | 35 glGenBuffers(1, &vbo); |
| 38 glBindBuffer(GL_ARRAY_BUFFER, vbo); | 36 glBindBuffer(GL_ARRAY_BUFFER, vbo); |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 | 228 |
| 231 GLTestHelper::CheckGLError("no errors after everything", __LINE__); | 229 GLTestHelper::CheckGLError("no errors after everything", __LINE__); |
| 232 } | 230 } |
| 233 } | 231 } |
| 234 | 232 |
| 235 } // namespace gpu | 233 } // namespace gpu |
| 236 | 234 |
| 237 | 235 |
| 238 | 236 |
| 239 | 237 |
| OLD | NEW |