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

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

Issue 2768563002: Move DisplayCompositor code to new component. (Closed)
Patch Set: Rebase. Created 3 years, 9 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/surfaces/BUILD.gn » ('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 "gpu/command_buffer/common/activity_flags.h" 10 #include "gpu/command_buffer/common/activity_flags.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 gpu::ImageFactory* image_factory, 204 gpu::ImageFactory* image_factory,
205 mojom::GpuServicePtrInfo gpu_service_info, 205 mojom::GpuServicePtrInfo gpu_service_info,
206 cc::mojom::DisplayCompositorRequest request, 206 cc::mojom::DisplayCompositorRequest request,
207 cc::mojom::DisplayCompositorClientPtrInfo client_info) { 207 cc::mojom::DisplayCompositorClientPtrInfo client_info) {
208 DCHECK(!display_compositor_); 208 DCHECK(!display_compositor_);
209 cc::mojom::DisplayCompositorClientPtr client; 209 cc::mojom::DisplayCompositorClientPtr client;
210 client.Bind(std::move(client_info)); 210 client.Bind(std::move(client_info));
211 211
212 gpu_internal_.Bind(std::move(gpu_service_info)); 212 gpu_internal_.Bind(std::move(gpu_service_info));
213 213
214 display_compositor_ = base::MakeUnique<DisplayCompositor>( 214 display_compositor_ = base::MakeUnique<frame_sinks::DisplayCompositor>(
215 gpu_command_service_, base::MakeUnique<ServerGpuMemoryBufferManager>( 215 gpu_command_service_,
216 gpu_internal_.get(), 1 /* client_id */), 216 base::MakeUnique<ServerGpuMemoryBufferManager>(gpu_internal_.get(),
217 1 /* client_id */),
217 image_factory, std::move(request), std::move(client)); 218 image_factory, std::move(request), std::move(client));
218 } 219 }
219 220
220 void GpuMain::TearDownOnCompositorThread() { 221 void GpuMain::TearDownOnCompositorThread() {
221 display_compositor_.reset(); 222 display_compositor_.reset();
222 gpu_internal_.reset(); 223 gpu_internal_.reset();
223 } 224 }
224 225
225 void GpuMain::TearDownOnGpuThread() { 226 void GpuMain::TearDownOnGpuThread() {
226 gpu_service_.reset(); 227 gpu_service_.reset();
(...skipping 27 matching lines...) Expand all
254 // TODO(sad): https://crbug.com/645602 255 // TODO(sad): https://crbug.com/645602
255 } 256 }
256 257
257 bool GpuMain::EnsureSandboxInitialized( 258 bool GpuMain::EnsureSandboxInitialized(
258 gpu::GpuWatchdogThread* watchdog_thread) { 259 gpu::GpuWatchdogThread* watchdog_thread) {
259 // TODO(sad): https://crbug.com/645602 260 // TODO(sad): https://crbug.com/645602
260 return true; 261 return true;
261 } 262 }
262 263
263 } // namespace ui 264 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/gpu/gpu_main.h ('k') | services/ui/surfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698