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

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

Issue 2342003003: [WIP] Mus: Pass the mojo connector to OzonePlatform::InitializeForGPU (Closed)
Patch Set: Created 4 years, 3 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 | « services/ui/gpu/gpu_main.h ('k') | services/ui/service.cc » ('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 "gpu/ipc/common/gpu_memory_buffer_support.h" 8 #include "gpu/ipc/common/gpu_memory_buffer_support.h"
9 #include "gpu/ipc/service/gpu_memory_buffer_factory.h" 9 #include "gpu/ipc/service/gpu_memory_buffer_factory.h"
10 #include "gpu/ipc/service/gpu_watchdog_thread.h" 10 #include "gpu/ipc/service/gpu_watchdog_thread.h"
11 #include "services/ui/gpu/gpu_service_internal.h" 11 #include "services/ui/gpu/gpu_service_internal.h"
12 12
13 namespace ui { 13 namespace ui {
14 14
15 GpuMain::GpuMain() { 15 GpuMain::GpuMain(shell::Connector* connector) {
16 gpu_init_.set_sandbox_helper(this); 16 gpu_init_.set_sandbox_helper(this);
17 bool success = gpu_init_.InitializeAndStartSandbox( 17 bool success = gpu_init_.InitializeAndStartSandbox(
18 *base::CommandLine::ForCurrentProcess()); 18 *base::CommandLine::ForCurrentProcess(), connector);
19 if (success) { 19 if (success) {
20 if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER) { 20 if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER) {
21 gpu_memory_buffer_factory_ = 21 gpu_memory_buffer_factory_ =
22 gpu::GpuMemoryBufferFactory::CreateNativeType(); 22 gpu::GpuMemoryBufferFactory::CreateNativeType();
23 } 23 }
24 gpu_service_internal_.reset(new GpuServiceInternal( 24 gpu_service_internal_.reset(new GpuServiceInternal(
25 gpu_init_.gpu_info(), gpu_init_.watchdog_thread(), 25 gpu_init_.gpu_info(), gpu_init_.watchdog_thread(),
26 gpu_memory_buffer_factory_.get())); 26 gpu_memory_buffer_factory_.get()));
27 } 27 }
28 } 28 }
(...skipping 11 matching lines...) Expand all
40 void GpuMain::PreSandboxStartup() { 40 void GpuMain::PreSandboxStartup() {
41 // TODO(sad): https://crbug.com/645602 41 // TODO(sad): https://crbug.com/645602
42 } 42 }
43 43
44 bool GpuMain::EnsureSandboxInitialized() { 44 bool GpuMain::EnsureSandboxInitialized() {
45 // TODO(sad): https://crbug.com/645602 45 // TODO(sad): https://crbug.com/645602
46 return true; 46 return true;
47 } 47 }
48 48
49 } // namespace ui 49 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/gpu/gpu_main.h ('k') | services/ui/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698