| 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 "gpu/command_buffer/service/gl_context_virtual.h" | 5 #include "gpu/command_buffer/service/gl_context_virtual.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/service/gl_state_restorer_impl.h" | 7 #include "gpu/command_buffer/service/gl_state_restorer_impl.h" |
| 8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 8 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 9 #include "ui/gl/gl_gl_api_implementation.h" | |
| 10 #include "ui/gl/gl_surface.h" | 9 #include "ui/gl/gl_surface.h" |
| 11 #include "ui/gl/gpu_timing.h" | 10 #include "ui/gl/gpu_timing.h" |
| 11 #include "ui/gl/scoped_api.h" |
| 12 | 12 |
| 13 namespace gpu { | 13 namespace gpu { |
| 14 | 14 |
| 15 GLContextVirtual::GLContextVirtual( | 15 GLContextVirtual::GLContextVirtual( |
| 16 gfx::GLShareGroup* share_group, | 16 gfx::GLShareGroup* share_group, |
| 17 gfx::GLContext* shared_context, | 17 gfx::GLContext* shared_context, |
| 18 base::WeakPtr<gles2::GLES2Decoder> decoder) | 18 base::WeakPtr<gles2::GLES2Decoder> decoder) |
| 19 : GLContext(share_group), | 19 : GLContext(share_group), |
| 20 shared_context_(shared_context), | 20 shared_context_(shared_context), |
| 21 decoder_(decoder) { | 21 decoder_(decoder) { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 gfx::ScopedSetGLToRealGLApi scoped_set_gl_api; | 120 gfx::ScopedSetGLToRealGLApi scoped_set_gl_api; |
| 121 GetGLStateRestorer()->RestoreState(NULL); | 121 GetGLStateRestorer()->RestoreState(NULL); |
| 122 shared_context_->SetStateWasDirtiedExternally(false); | 122 shared_context_->SetStateWasDirtiedExternally(false); |
| 123 } | 123 } |
| 124 | 124 |
| 125 GLContextVirtual::~GLContextVirtual() { | 125 GLContextVirtual::~GLContextVirtual() { |
| 126 Destroy(); | 126 Destroy(); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace gpu | 129 } // namespace gpu |
| OLD | NEW |