Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(862)

Side by Side Diff: services/ui/gpu/gpu_main.cc

Issue 2781553002: gpu: Introduce separate mojo api for failed initialization. (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/ipc/common/typemaps.gni ('k') | services/ui/gpu/gpu_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « gpu/ipc/common/typemaps.gni ('k') | services/ui/gpu/gpu_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698