OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/ui/gpu/gpu_main.h" | 5 #include "services/ui/gpu/gpu_main.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/power_monitor/power_monitor_device_source.h" | 10 #include "base/power_monitor/power_monitor_device_source.h" |
| 11 #include "components/viz/frame_sinks/mojo_frame_sink_manager.h" |
11 #include "gpu/command_buffer/common/activity_flags.h" | 12 #include "gpu/command_buffer/common/activity_flags.h" |
12 #include "gpu/ipc/common/gpu_memory_buffer_support.h" | 13 #include "gpu/ipc/common/gpu_memory_buffer_support.h" |
13 #include "gpu/ipc/gpu_in_process_thread_service.h" | 14 #include "gpu/ipc/gpu_in_process_thread_service.h" |
14 #include "gpu/ipc/service/gpu_memory_buffer_factory.h" | 15 #include "gpu/ipc/service/gpu_memory_buffer_factory.h" |
15 #include "gpu/ipc/service/gpu_watchdog_thread.h" | 16 #include "gpu/ipc/service/gpu_watchdog_thread.h" |
16 #include "services/ui/common/server_gpu_memory_buffer_manager.h" | 17 #include "services/ui/common/server_gpu_memory_buffer_manager.h" |
17 #include "services/ui/gpu/gpu_service.h" | 18 #include "services/ui/gpu/gpu_service.h" |
18 #include "services/ui/surfaces/mus_display_provider.h" | 19 #include "services/ui/surfaces/mus_display_provider.h" |
19 | 20 |
20 #if defined(USE_OZONE) | 21 #if defined(USE_OZONE) |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 client.Bind(std::move(client_info)); | 204 client.Bind(std::move(client_info)); |
204 | 205 |
205 gpu_internal_.Bind(std::move(gpu_service_info)); | 206 gpu_internal_.Bind(std::move(gpu_service_info)); |
206 | 207 |
207 display_provider_ = base::MakeUnique<MusDisplayProvider>( | 208 display_provider_ = base::MakeUnique<MusDisplayProvider>( |
208 gpu_command_service_, | 209 gpu_command_service_, |
209 base::MakeUnique<ServerGpuMemoryBufferManager>(gpu_internal_.get(), | 210 base::MakeUnique<ServerGpuMemoryBufferManager>(gpu_internal_.get(), |
210 1 /* client_id */), | 211 1 /* client_id */), |
211 image_factory); | 212 image_factory); |
212 | 213 |
213 frame_sink_manager_ = base::MakeUnique<MojoFrameSinkManager>( | 214 frame_sink_manager_ = base::MakeUnique<viz::MojoFrameSinkManager>( |
214 display_provider_.get(), std::move(request), std::move(client)); | 215 display_provider_.get(), std::move(request), std::move(client)); |
215 } | 216 } |
216 | 217 |
217 void GpuMain::TearDownOnCompositorThread() { | 218 void GpuMain::TearDownOnCompositorThread() { |
218 frame_sink_manager_.reset(); | 219 frame_sink_manager_.reset(); |
219 display_provider_.reset(); | 220 display_provider_.reset(); |
220 gpu_internal_.reset(); | 221 gpu_internal_.reset(); |
221 } | 222 } |
222 | 223 |
223 void GpuMain::TearDownOnGpuThread() { | 224 void GpuMain::TearDownOnGpuThread() { |
(...skipping 29 matching lines...) Expand all Loading... |
253 // TODO(sad): https://crbug.com/645602 | 254 // TODO(sad): https://crbug.com/645602 |
254 } | 255 } |
255 | 256 |
256 bool GpuMain::EnsureSandboxInitialized( | 257 bool GpuMain::EnsureSandboxInitialized( |
257 gpu::GpuWatchdogThread* watchdog_thread) { | 258 gpu::GpuWatchdogThread* watchdog_thread) { |
258 // TODO(sad): https://crbug.com/645602 | 259 // TODO(sad): https://crbug.com/645602 |
259 return true; | 260 return true; |
260 } | 261 } |
261 | 262 |
262 } // namespace ui | 263 } // namespace ui |
OLD | NEW |