OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/view_manager/native_viewport/onscreen_context_provider.h" | 5 #include "components/view_manager/native_viewport/onscreen_context_provider.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "components/gles2/command_buffer_driver.h" | 8 #include "components/view_manager/gles2/command_buffer_driver.h" |
9 #include "components/gles2/command_buffer_impl.h" | 9 #include "components/view_manager/gles2/command_buffer_impl.h" |
10 #include "components/gles2/gpu_state.h" | 10 #include "components/view_manager/gles2/gpu_state.h" |
11 | 11 |
12 namespace native_viewport { | 12 namespace native_viewport { |
13 | 13 |
14 OnscreenContextProvider::OnscreenContextProvider( | 14 OnscreenContextProvider::OnscreenContextProvider( |
15 const scoped_refptr<gles2::GpuState>& state) | 15 const scoped_refptr<gles2::GpuState>& state) |
16 : command_buffer_impl_(nullptr), | 16 : command_buffer_impl_(nullptr), |
17 state_(state), | 17 state_(state), |
18 widget_(gfx::kNullAcceleratedWidget), | 18 widget_(gfx::kNullAcceleratedWidget), |
19 binding_(this) { | 19 binding_(this) { |
20 } | 20 } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 pending_create_callback_.Run(cb.Pass()); | 83 pending_create_callback_.Run(cb.Pass()); |
84 pending_create_callback_.reset(); | 84 pending_create_callback_.reset(); |
85 } | 85 } |
86 | 86 |
87 void OnscreenContextProvider::CommandBufferDestroyed( | 87 void OnscreenContextProvider::CommandBufferDestroyed( |
88 gles2::CommandBufferDriver* command_buffer) { | 88 gles2::CommandBufferDriver* command_buffer) { |
89 command_buffers_.erase(command_buffer); | 89 command_buffers_.erase(command_buffer); |
90 } | 90 } |
91 | 91 |
92 } // namespace mojo | 92 } // namespace mojo |
OLD | NEW |