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