| 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" |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 gpu_init_.reset(); | 230 gpu_init_.reset(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void GpuMain::CreateGpuServiceOnGpuThread( | 233 void GpuMain::CreateGpuServiceOnGpuThread( |
| 234 mojom::GpuServiceRequest request, | 234 mojom::GpuServiceRequest request, |
| 235 mojom::GpuHostPtrInfo gpu_host_info, | 235 mojom::GpuHostPtrInfo gpu_host_info, |
| 236 const gpu::GpuPreferences& preferences, | 236 const gpu::GpuPreferences& preferences, |
| 237 gpu::GpuProcessActivityFlags activity_flags) { | 237 gpu::GpuProcessActivityFlags activity_flags) { |
| 238 mojom::GpuHostPtr gpu_host; | 238 mojom::GpuHostPtr gpu_host; |
| 239 gpu_host.Bind(std::move(gpu_host_info)); | 239 gpu_host.Bind(std::move(gpu_host_info)); |
| 240 gpu_service_->InitializeWithHost(std::move(gpu_host), preferences, | 240 gpu_service_->UpdateGPUInfoFromPreferences(preferences); |
| 241 gpu_service_->InitializeWithHost(std::move(gpu_host), |
| 241 std::move(activity_flags)); | 242 std::move(activity_flags)); |
| 242 gpu_service_->Bind(std::move(request)); | 243 gpu_service_->Bind(std::move(request)); |
| 243 | 244 |
| 244 if (pending_display_compositor_request_.is_pending()) { | 245 if (pending_display_compositor_request_.is_pending()) { |
| 245 CreateDisplayCompositorInternal( | 246 CreateDisplayCompositorInternal( |
| 246 std::move(pending_display_compositor_request_), | 247 std::move(pending_display_compositor_request_), |
| 247 std::move(pending_display_compositor_client_info_)); | 248 std::move(pending_display_compositor_client_info_)); |
| 248 } | 249 } |
| 249 } | 250 } |
| 250 | 251 |
| 251 void GpuMain::BindGpuInternalOnGpuThread(mojom::GpuServiceRequest request) { | 252 void GpuMain::BindGpuInternalOnGpuThread(mojom::GpuServiceRequest request) { |
| 252 gpu_service_->Bind(std::move(request)); | 253 gpu_service_->Bind(std::move(request)); |
| 253 } | 254 } |
| 254 | 255 |
| 255 void GpuMain::PreSandboxStartup() { | 256 void GpuMain::PreSandboxStartup() { |
| 256 // TODO(sad): https://crbug.com/645602 | 257 // TODO(sad): https://crbug.com/645602 |
| 257 } | 258 } |
| 258 | 259 |
| 259 bool GpuMain::EnsureSandboxInitialized( | 260 bool GpuMain::EnsureSandboxInitialized( |
| 260 gpu::GpuWatchdogThread* watchdog_thread) { | 261 gpu::GpuWatchdogThread* watchdog_thread) { |
| 261 // TODO(sad): https://crbug.com/645602 | 262 // TODO(sad): https://crbug.com/645602 |
| 262 return true; | 263 return true; |
| 263 } | 264 } |
| 264 | 265 |
| 265 } // namespace ui | 266 } // namespace ui |
| OLD | NEW |