OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "services/ui/gpu/gpu_main.h" |
| 6 |
| 7 #include "base/command_line.h" |
| 8 #include "services/ui/gpu/gpu_service_internal.h" |
| 9 |
| 10 namespace ui { |
| 11 |
| 12 GpuMain::GpuMain() : gpu_init_(this, *base::CommandLine::ForCurrentProcess()) { |
| 13 DCHECK(gpu_service_internal_); |
| 14 } |
| 15 |
| 16 GpuMain::~GpuMain() {} |
| 17 |
| 18 void GpuMain::Add(mojom::GpuServiceInternalRequest request) { |
| 19 gpu_service_internal_->Add(std::move(request)); |
| 20 } |
| 21 |
| 22 void GpuMain::OnGpuInfoUpdate(const gpu::GPUInfo& gpu_info) { |
| 23 gpu_info_ = gpu_info; |
| 24 } |
| 25 |
| 26 void GpuMain::OnGpuWatchdogThreadCreated(gpu::GpuWatchdogThread* thread) { |
| 27 watchdog_thread_ = thread; |
| 28 } |
| 29 |
| 30 void GpuMain::OnGpuWatchdogThreadDestroyed() { |
| 31 watchdog_thread_ = nullptr; |
| 32 } |
| 33 |
| 34 bool GpuMain::ShouldInitializeGL() { |
| 35 // TODO(sad): GL is currently initialized by WS. Once the gpu moves into a |
| 36 // separate process, this should return true. |
| 37 return false; |
| 38 } |
| 39 |
| 40 void GpuMain::WaitForDebugger() { |
| 41 NOTIMPLEMENTED(); |
| 42 } |
| 43 |
| 44 void GpuMain::PreSandboxInitialization() {} |
| 45 |
| 46 bool GpuMain::ShouldStartSandboxEarly() { |
| 47 return false; |
| 48 } |
| 49 |
| 50 void GpuMain::WarmUpSandbox() {} |
| 51 |
| 52 bool GpuMain::StartSandbox() { |
| 53 return true; |
| 54 } |
| 55 |
| 56 void GpuMain::InitializeMessageLoop() {} |
| 57 |
| 58 void GpuMain::Initialize(base::Time start_time, |
| 59 bool dead_on_arrival, |
| 60 std::vector<gpu::GpuInitLogMessage> int_log_messages, |
| 61 gpu::GpuMemoryBufferFactory* gpu_buffer_factory) { |
| 62 gpu_service_internal_.reset( |
| 63 new GpuServiceInternal(watchdog_thread_, gpu_buffer_factory)); |
| 64 } |
| 65 |
| 66 } // namespace ui |
OLD | NEW |