Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(242)

Side by Side Diff: gpu/command_buffer/tests/gl_stream_draw_unittest.cc

Issue 682743002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13
14 #define SHADER(Src) #Src 14 #define SHADER(Src) #Src
15 15
16 namespace gpu { 16 namespace gpu {
17 17
18 class GLStreamDrawTest : public testing::Test { 18 class GLStreamDrawTest : public testing::Test {
19 protected: 19 protected:
20 static const int kSize = 4; 20 static const int kSize = 4;
21 21
22 virtual void SetUp() { 22 void SetUp() override {
23 GLManager::Options options; 23 GLManager::Options options;
24 options.size = gfx::Size(kSize, kSize); 24 options.size = gfx::Size(kSize, kSize);
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 GLManager gl_; 30 GLManager gl_;
33 }; 31 };
34 32
35 namespace { 33 namespace {
36 34
37 GLuint SetupProgram() { 35 GLuint SetupProgram() {
38 static const char* v_shader_str = SHADER( 36 static const char* v_shader_str = SHADER(
39 attribute vec4 a_position; 37 attribute vec4 a_position;
40 attribute vec4 a_color; 38 attribute vec4 a_color;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 glDrawArrays(GL_TRIANGLES, 0, 6); 149 glDrawArrays(GL_TRIANGLES, 0, 6);
152 EXPECT_TRUE( 150 EXPECT_TRUE(
153 GLTestHelper::CheckPixels(0, 0, kSize, kSize, 0, expected_green)); 151 GLTestHelper::CheckPixels(0, 0, kSize, kSize, 0, expected_green));
154 } 152 }
155 153
156 GLTestHelper::CheckGLError("no errors", __LINE__); 154 GLTestHelper::CheckGLError("no errors", __LINE__);
157 } 155 }
158 156
159 } // namespace gpu 157 } // namespace gpu
160 158
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_shared_resources_unittest.cc ('k') | gpu/command_buffer/tests/gl_texture_mailbox_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698