| OLD | NEW |
| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 void GpuServiceTest::SetUp() { | 43 void GpuServiceTest::SetUp() { |
| 44 SetUpWithGLVersion("2.0", "GL_EXT_framebuffer_object"); | 44 SetUpWithGLVersion("2.0", "GL_EXT_framebuffer_object"); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void GpuServiceTest::TearDown() { | 47 void GpuServiceTest::TearDown() { |
| 48 DCHECK(ran_setup_); | 48 DCHECK(ran_setup_); |
| 49 context_ = nullptr; | 49 context_ = nullptr; |
| 50 surface_ = nullptr; | 50 surface_ = nullptr; |
| 51 ::gl::MockGLInterface::SetGLInterface(NULL); | 51 ::gl::MockGLInterface::SetGLInterface(NULL); |
| 52 gl_.reset(); | 52 gl_.reset(); |
| 53 gl::init::ClearGLBindings(); | 53 gl::init::ShutdownGL(); |
| 54 ran_teardown_ = true; | 54 ran_teardown_ = true; |
| 55 | 55 |
| 56 testing::Test::TearDown(); | 56 testing::Test::TearDown(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 gl::GLContext* GpuServiceTest::GetGLContext() { | 59 gl::GLContext* GpuServiceTest::GetGLContext() { |
| 60 return context_.get(); | 60 return context_.get(); |
| 61 } | 61 } |
| 62 | 62 |
| 63 gl::GLSurface* GpuServiceTest::GetGLSurface() { | 63 gl::GLSurface* GpuServiceTest::GetGLSurface() { |
| 64 return surface_.get(); | 64 return surface_.get(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 } // namespace gles2 | 67 } // namespace gles2 |
| 68 } // namespace gpu | 68 } // namespace gpu |
| OLD | NEW |