| 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 PointCoordTest : public testing::Test { | 17 class PointCoordTest : public testing::Test { |
| 18 public: | 18 public: |
| 19 static const GLsizei kResolution = 256; | 19 static const GLsizei kResolution = 256; |
| 20 | 20 |
| 21 protected: | 21 protected: |
| 22 virtual void SetUp() { | 22 void SetUp() override { |
| 23 GLManager::Options options; | 23 GLManager::Options options; |
| 24 options.size = gfx::Size(kResolution, kResolution); | 24 options.size = gfx::Size(kResolution, kResolution); |
| 25 gl_.Initialize(options); | 25 gl_.Initialize(options); |
| 26 } | 26 } |
| 27 | 27 |
| 28 virtual void TearDown() { | 28 void TearDown() override { gl_.Destroy(); } |
| 29 gl_.Destroy(); | |
| 30 } | |
| 31 | 29 |
| 32 GLuint SetupQuad(GLint position_location, GLfloat pixel_offset); | 30 GLuint SetupQuad(GLint position_location, GLfloat pixel_offset); |
| 33 | 31 |
| 34 GLManager gl_; | 32 GLManager gl_; |
| 35 }; | 33 }; |
| 36 | 34 |
| 37 GLuint PointCoordTest::SetupQuad( | 35 GLuint PointCoordTest::SetupQuad( |
| 38 GLint position_location, GLfloat pixel_offset) { | 36 GLint position_location, GLfloat pixel_offset) { |
| 39 GLuint vbo = 0; | 37 GLuint vbo = 0; |
| 40 glGenBuffers(1, &vbo); | 38 glGenBuffers(1, &vbo); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 } | 145 } |
| 148 } | 146 } |
| 149 | 147 |
| 150 GLTestHelper::CheckGLError("no errors", __LINE__); | 148 GLTestHelper::CheckGLError("no errors", __LINE__); |
| 151 } | 149 } |
| 152 | 150 |
| 153 } // namespace gpu | 151 } // namespace gpu |
| 154 | 152 |
| 155 | 153 |
| 156 | 154 |
| OLD | NEW |