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