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

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

Issue 2592623002: mojo:: Introduce InterfaceRequest ctor that takes in InterfacePtr* (Closed)
Patch Set: Rebase + response to review Created 3 years, 12 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/service_manager/service_manager.cc ('k') | services/ui/ws/frame_generator.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 "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "gpu/ipc/common/gpu_memory_buffer_support.h" 9 #include "gpu/ipc/common/gpu_memory_buffer_support.h"
10 #include "gpu/ipc/gpu_in_process_thread_service.h" 10 #include "gpu/ipc/gpu_in_process_thread_service.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 gpu_command_service_ = new gpu::GpuInProcessThreadService( 151 gpu_command_service_ = new gpu::GpuInProcessThreadService(
152 gpu_thread_.task_runner(), gpu_service_->sync_point_manager(), 152 gpu_thread_.task_runner(), gpu_service_->sync_point_manager(),
153 gpu_service_->mailbox_manager(), gpu_service_->share_group()); 153 gpu_service_->mailbox_manager(), gpu_service_->share_group());
154 154
155 // |gpu_memory_buffer_factory_| is null in tests. 155 // |gpu_memory_buffer_factory_| is null in tests.
156 gpu::ImageFactory* image_factory = 156 gpu::ImageFactory* image_factory =
157 gpu_memory_buffer_factory_ ? gpu_memory_buffer_factory_->AsImageFactory() 157 gpu_memory_buffer_factory_ ? gpu_memory_buffer_factory_->AsImageFactory()
158 : nullptr; 158 : nullptr;
159 159
160 mojom::GpuServicePtr gpu_service; 160 mojom::GpuServicePtr gpu_service;
161 mojom::GpuServiceRequest gpu_service_request = 161 mojom::GpuServiceRequest gpu_service_request(&gpu_service);
162 mojo::MakeRequest(&gpu_service);
163 162
164 if (gpu_thread_.task_runner()->BelongsToCurrentThread()) { 163 if (gpu_thread_.task_runner()->BelongsToCurrentThread()) {
165 // If the DisplayCompositor creation was delayed because GpuService 164 // If the DisplayCompositor creation was delayed because GpuService
166 // had not been created yet, then this is called, in gpu thread, right after 165 // had not been created yet, then this is called, in gpu thread, right after
167 // GpuService is created. 166 // GpuService is created.
168 BindGpuInternalOnGpuThread(std::move(gpu_service_request)); 167 BindGpuInternalOnGpuThread(std::move(gpu_service_request));
169 } else { 168 } else {
170 gpu_thread_.task_runner()->PostTask( 169 gpu_thread_.task_runner()->PostTask(
171 FROM_HERE, 170 FROM_HERE,
172 base::Bind(&GpuMain::BindGpuInternalOnGpuThread, base::Unretained(this), 171 base::Bind(&GpuMain::BindGpuInternalOnGpuThread, base::Unretained(this),
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 // TODO(sad): https://crbug.com/645602 231 // TODO(sad): https://crbug.com/645602
233 } 232 }
234 233
235 bool GpuMain::EnsureSandboxInitialized( 234 bool GpuMain::EnsureSandboxInitialized(
236 gpu::GpuWatchdogThread* watchdog_thread) { 235 gpu::GpuWatchdogThread* watchdog_thread) {
237 // TODO(sad): https://crbug.com/645602 236 // TODO(sad): https://crbug.com/645602
238 return true; 237 return true;
239 } 238 }
240 239
241 } // namespace ui 240 } // namespace ui
OLDNEW
« no previous file with comments | « services/service_manager/service_manager.cc ('k') | services/ui/ws/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698