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 "components/mus/surfaces/surfaces_context_provider.h" | 5 #include "services/ui/surfaces/surfaces_context_provider.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/synchronization/waitable_event.h" | 12 #include "base/synchronization/waitable_event.h" |
13 #include "base/threading/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "components/mus/common/switches.h" | |
16 #include "components/mus/gles2/command_buffer_driver.h" | |
17 #include "components/mus/gles2/command_buffer_impl.h" | |
18 #include "components/mus/gles2/command_buffer_local.h" | |
19 #include "components/mus/gles2/gpu_state.h" | |
20 #include "components/mus/gpu/gpu_service_mus.h" | |
21 #include "components/mus/surfaces/surfaces_context_provider_delegate.h" | |
22 #include "gpu/command_buffer/client/gles2_cmd_helper.h" | 15 #include "gpu/command_buffer/client/gles2_cmd_helper.h" |
23 #include "gpu/command_buffer/client/gles2_implementation.h" | 16 #include "gpu/command_buffer/client/gles2_implementation.h" |
24 #include "gpu/command_buffer/client/shared_memory_limits.h" | 17 #include "gpu/command_buffer/client/shared_memory_limits.h" |
25 #include "gpu/command_buffer/client/transfer_buffer.h" | 18 #include "gpu/command_buffer/client/transfer_buffer.h" |
26 #include "gpu/ipc/client/command_buffer_proxy_impl.h" | 19 #include "gpu/ipc/client/command_buffer_proxy_impl.h" |
| 20 #include "services/ui/common/switches.h" |
| 21 #include "services/ui/gles2/command_buffer_driver.h" |
| 22 #include "services/ui/gles2/command_buffer_impl.h" |
| 23 #include "services/ui/gles2/command_buffer_local.h" |
| 24 #include "services/ui/gles2/gpu_state.h" |
| 25 #include "services/ui/gpu/gpu_service_mus.h" |
| 26 #include "services/ui/surfaces/surfaces_context_provider_delegate.h" |
27 #include "ui/gl/gpu_preference.h" | 27 #include "ui/gl/gpu_preference.h" |
28 | 28 |
29 namespace mus { | 29 namespace mus { |
30 | 30 |
31 SurfacesContextProvider::SurfacesContextProvider( | 31 SurfacesContextProvider::SurfacesContextProvider( |
32 gfx::AcceleratedWidget widget, | 32 gfx::AcceleratedWidget widget, |
33 const scoped_refptr<GpuState>& state) | 33 const scoped_refptr<GpuState>& state) |
34 : use_chrome_gpu_command_buffer_(false), | 34 : use_chrome_gpu_command_buffer_(false), |
35 delegate_(nullptr), | 35 delegate_(nullptr), |
36 widget_(widget), | 36 widget_(widget), |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 if (delegate_) | 197 if (delegate_) |
198 delegate_->OnVSyncParametersUpdated(timebase, interval); | 198 delegate_->OnVSyncParametersUpdated(timebase, interval); |
199 } | 199 } |
200 | 200 |
201 void SurfacesContextProvider::SetSwapBuffersCompletionCallback( | 201 void SurfacesContextProvider::SetSwapBuffersCompletionCallback( |
202 gl::GLSurface::SwapCompletionCallback callback) { | 202 gl::GLSurface::SwapCompletionCallback callback) { |
203 swap_buffers_completion_callback_ = callback; | 203 swap_buffers_completion_callback_ = callback; |
204 } | 204 } |
205 | 205 |
206 } // namespace mus | 206 } // namespace mus |
OLD | NEW |