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

Side by Side Diff: gpu/command_buffer/tests/gl_shared_resources_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 "base/logging.h" 8 #include "base/logging.h"
9 #include "gpu/command_buffer/tests/gl_manager.h" 9 #include "gpu/command_buffer/tests/gl_manager.h"
10 #include "gpu/command_buffer/tests/gl_test_utils.h" 10 #include "gpu/command_buffer/tests/gl_test_utils.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace gpu { 14 namespace gpu {
15 15
16 class GLSharedResources : public testing::Test { 16 class GLSharedResources : public testing::Test {
17 protected: 17 protected:
18 virtual void SetUp() { 18 void SetUp() override {
19 GLManager::Options options; 19 GLManager::Options options;
20 options.bind_generates_resource = true; 20 options.bind_generates_resource = true;
21 gl1_.Initialize(options); 21 gl1_.Initialize(options);
22 options.share_group_manager = &gl1_; 22 options.share_group_manager = &gl1_;
23 gl2_.Initialize(options); 23 gl2_.Initialize(options);
24 } 24 }
25 25
26 virtual void TearDown() { 26 void TearDown() override {
27 gl1_.Destroy(); 27 gl1_.Destroy();
28 gl2_.Destroy(); 28 gl2_.Destroy();
29 } 29 }
30 30
31 GLManager gl1_; 31 GLManager gl1_;
32 GLManager gl2_; 32 GLManager gl2_;
33 }; 33 };
34 34
35 // Test that GL creating/deleting works across context. 35 // Test that GL creating/deleting works across context.
36 TEST_F(GLSharedResources, CreateDelete) { 36 TEST_F(GLSharedResources, CreateDelete) {
37 gl1_.MakeCurrent(); 37 gl1_.MakeCurrent();
38 GLuint tex = 0; 38 GLuint tex = 0;
39 glGenTextures(1, &tex); 39 glGenTextures(1, &tex);
40 gl2_.MakeCurrent(); 40 gl2_.MakeCurrent();
41 glBindTexture(GL_TEXTURE_2D, tex); 41 glBindTexture(GL_TEXTURE_2D, tex);
42 glDeleteTextures(1, &tex); 42 glDeleteTextures(1, &tex);
43 gl1_.MakeCurrent(); 43 gl1_.MakeCurrent();
44 glBindTexture(GL_TEXTURE_2D,tex); 44 glBindTexture(GL_TEXTURE_2D,tex);
45 GLTestHelper::CheckGLError("no errors", __LINE__); 45 GLTestHelper::CheckGLError("no errors", __LINE__);
46 gl2_.MakeCurrent(); 46 gl2_.MakeCurrent();
47 GLTestHelper::CheckGLError("no errors", __LINE__); 47 GLTestHelper::CheckGLError("no errors", __LINE__);
48 } 48 }
49 49
50 } // namespace gpu 50 } // namespace gpu
51 51
OLDNEW
« no previous file with comments | « gpu/command_buffer/tests/gl_readback_unittest.cc ('k') | gpu/command_buffer/tests/gl_stream_draw_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698