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

Side by Side Diff: gpu/command_buffer/service/gpu_service_test.cc

Issue 500243002: Remove implicit conversions from scoped_refptr to T* in gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert silliness Created 6 years, 4 months 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
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.cc ('k') | gpu/command_buffer/service/gpu_tracer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "gpu/command_buffer/service/gpu_service_test.h" 5 #include "gpu/command_buffer/service/gpu_service_test.h"
6 6
7 #include "gpu/command_buffer/service/test_helper.h" 7 #include "gpu/command_buffer/service/test_helper.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/gl/gl_context_stub_with_extensions.h" 9 #include "ui/gl/gl_context_stub_with_extensions.h"
10 #include "ui/gl/gl_implementation.h" 10 #include "ui/gl/gl_implementation.h"
(...skipping 15 matching lines...) Expand all
26 testing::Test::SetUp(); 26 testing::Test::SetUp();
27 27
28 gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress); 28 gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress);
29 gfx::GLSurface::InitializeOneOffWithMockBindingsForTests(); 29 gfx::GLSurface::InitializeOneOffWithMockBindingsForTests();
30 gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>()); 30 gl_.reset(new ::testing::StrictMock< ::gfx::MockGLInterface>());
31 ::gfx::MockGLInterface::SetGLInterface(gl_.get()); 31 ::gfx::MockGLInterface::SetGLInterface(gl_.get());
32 32
33 context_ = new gfx::GLContextStubWithExtensions; 33 context_ = new gfx::GLContextStubWithExtensions;
34 context_->AddExtensionsString(gl_extensions); 34 context_->AddExtensionsString(gl_extensions);
35 context_->SetGLVersionString(gl_version); 35 context_->SetGLVersionString(gl_version);
36 gfx::GLSurface::InitializeDynamicMockBindingsForTests(context_); 36 gfx::GLSurface::InitializeDynamicMockBindingsForTests(context_.get());
37 ran_setup_ = true; 37 ran_setup_ = true;
38 } 38 }
39 39
40 void GpuServiceTest::SetUp() { 40 void GpuServiceTest::SetUp() {
41 SetUpWithGLVersion("2.0", NULL); 41 SetUpWithGLVersion("2.0", NULL);
42 } 42 }
43 43
44 void GpuServiceTest::TearDown() { 44 void GpuServiceTest::TearDown() {
45 DCHECK(ran_setup_); 45 DCHECK(ran_setup_);
46 ::gfx::MockGLInterface::SetGLInterface(NULL); 46 ::gfx::MockGLInterface::SetGLInterface(NULL);
47 gl_.reset(); 47 gl_.reset();
48 gfx::ClearGLBindings(); 48 gfx::ClearGLBindings();
49 ran_teardown_ = true; 49 ran_teardown_ = true;
50 50
51 testing::Test::TearDown(); 51 testing::Test::TearDown();
52 } 52 }
53 53
54 } // namespace gles2 54 } // namespace gles2
55 } // namespace gpu 55 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gpu_scheduler.cc ('k') | gpu/command_buffer/service/gpu_tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698