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

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

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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/tracing/service.cc ('k') | services/ui/ime/ime_unittest.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 = mojo::GetProxy(&gpu_service); 161 mojom::GpuServiceRequest gpu_service_request =
162 mojo::MakeRequest(&gpu_service);
162 163
163 if (gpu_thread_.task_runner()->BelongsToCurrentThread()) { 164 if (gpu_thread_.task_runner()->BelongsToCurrentThread()) {
164 // If the DisplayCompositor creation was delayed because GpuService 165 // If the DisplayCompositor creation was delayed because GpuService
165 // had not been created yet, then this is called, in gpu thread, right after 166 // had not been created yet, then this is called, in gpu thread, right after
166 // GpuService is created. 167 // GpuService is created.
167 BindGpuInternalOnGpuThread(std::move(gpu_service_request)); 168 BindGpuInternalOnGpuThread(std::move(gpu_service_request));
168 } else { 169 } else {
169 gpu_thread_.task_runner()->PostTask( 170 gpu_thread_.task_runner()->PostTask(
170 FROM_HERE, 171 FROM_HERE,
171 base::Bind(&GpuMain::BindGpuInternalOnGpuThread, base::Unretained(this), 172 base::Bind(&GpuMain::BindGpuInternalOnGpuThread, base::Unretained(this),
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // TODO(sad): https://crbug.com/645602 232 // TODO(sad): https://crbug.com/645602
232 } 233 }
233 234
234 bool GpuMain::EnsureSandboxInitialized( 235 bool GpuMain::EnsureSandboxInitialized(
235 gpu::GpuWatchdogThread* watchdog_thread) { 236 gpu::GpuWatchdogThread* watchdog_thread) {
236 // TODO(sad): https://crbug.com/645602 237 // TODO(sad): https://crbug.com/645602
237 return true; 238 return true;
238 } 239 }
239 240
240 } // namespace ui 241 } // namespace ui
OLDNEW
« no previous file with comments | « services/tracing/service.cc ('k') | services/ui/ime/ime_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698