| 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 gpu_service_ = base::MakeUnique<GpuService>( | 160 gpu_service_ = base::MakeUnique<GpuService>( |
| 161 gpu_init_->gpu_info(), gpu_init_->TakeWatchdogThread(), io_runner, | 161 gpu_init_->gpu_info(), gpu_init_->TakeWatchdogThread(), io_runner, |
| 162 gpu_init_->gpu_feature_info()); | 162 gpu_init_->gpu_feature_info()); |
| 163 } | 163 } |
| 164 | 164 |
| 165 void GpuMain::CreateFrameSinkManagerInternal( | 165 void GpuMain::CreateFrameSinkManagerInternal( |
| 166 cc::mojom::FrameSinkManagerRequest request, | 166 cc::mojom::FrameSinkManagerRequest request, |
| 167 cc::mojom::FrameSinkManagerClientPtrInfo client_info) { | 167 cc::mojom::FrameSinkManagerClientPtrInfo client_info) { |
| 168 DCHECK(!gpu_command_service_); | 168 DCHECK(!gpu_command_service_); |
| 169 DCHECK(gpu_service_); |
| 169 gpu_command_service_ = new gpu::GpuInProcessThreadService( | 170 gpu_command_service_ = new gpu::GpuInProcessThreadService( |
| 170 gpu_thread_task_runner_, gpu_service_->sync_point_manager(), | 171 gpu_thread_task_runner_, gpu_service_->sync_point_manager(), |
| 171 gpu_service_->mailbox_manager(), gpu_service_->share_group()); | 172 gpu_service_->mailbox_manager(), gpu_service_->share_group()); |
| 172 | 173 |
| 173 gpu::ImageFactory* image_factory = gpu_service_->gpu_image_factory(); | 174 gpu::ImageFactory* image_factory = gpu_service_->gpu_image_factory(); |
| 174 mojom::GpuServicePtr gpu_service; | 175 mojom::GpuServicePtr gpu_service; |
| 175 mojom::GpuServiceRequest gpu_service_request(&gpu_service); | 176 mojom::GpuServiceRequest gpu_service_request(&gpu_service); |
| 176 | 177 |
| 177 if (gpu_thread_task_runner_->BelongsToCurrentThread()) { | 178 if (gpu_thread_task_runner_->BelongsToCurrentThread()) { |
| 178 // If the FrameSinkManager creation was delayed because GpuService had not | 179 // If the FrameSinkManager creation was delayed because GpuService had not |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 // TODO(sad): https://crbug.com/645602 | 255 // TODO(sad): https://crbug.com/645602 |
| 255 } | 256 } |
| 256 | 257 |
| 257 bool GpuMain::EnsureSandboxInitialized( | 258 bool GpuMain::EnsureSandboxInitialized( |
| 258 gpu::GpuWatchdogThread* watchdog_thread) { | 259 gpu::GpuWatchdogThread* watchdog_thread) { |
| 259 // TODO(sad): https://crbug.com/645602 | 260 // TODO(sad): https://crbug.com/645602 |
| 260 return true; | 261 return true; |
| 261 } | 262 } |
| 262 | 263 |
| 263 } // namespace ui | 264 } // namespace ui |
| OLD | NEW |