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

Side by Side Diff: services/ui/surfaces/display_compositor.cc

Issue 2525213002: Mus: Avoid deadlock during teardown (Closed)
Patch Set: Address Sadrul's comment 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/ui/surfaces/display_compositor.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/surfaces/display_compositor.h" 5 #include "services/ui/surfaces/display_compositor.h"
6 6
7 #include "cc/output/in_process_context_provider.h" 7 #include "cc/output/in_process_context_provider.h"
8 #include "cc/surfaces/surface.h" 8 #include "cc/surfaces/surface.h"
9 #include "gpu/command_buffer/client/shared_memory_limits.h" 9 #include "gpu/command_buffer/client/shared_memory_limits.h"
10 #include "gpu/ipc/gpu_in_process_thread_service.h" 10 #include "gpu/ipc/gpu_in_process_thread_service.h"
11 #include "mojo/public/cpp/bindings/strong_binding.h" 11 #include "mojo/public/cpp/bindings/strong_binding.h"
12 #include "services/ui/surfaces/gpu_compositor_frame_sink.h" 12 #include "services/ui/surfaces/gpu_compositor_frame_sink.h"
13 13
14 namespace ui { 14 namespace ui {
15 15
16 DisplayCompositor::DisplayCompositor( 16 DisplayCompositor::DisplayCompositor(
17 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service, 17 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service,
18 std::unique_ptr<MusGpuMemoryBufferManager> gpu_memory_buffer_manager, 18 std::unique_ptr<MusGpuMemoryBufferManager> gpu_memory_buffer_manager,
19 gpu::ImageFactory* image_factory, 19 gpu::ImageFactory* image_factory,
20 cc::mojom::DisplayCompositorRequest request,
20 cc::mojom::DisplayCompositorClientPtr client) 21 cc::mojom::DisplayCompositorClientPtr client)
21 : gpu_service_(std::move(gpu_service)), 22 : gpu_service_(std::move(gpu_service)),
22 gpu_memory_buffer_manager_(std::move(gpu_memory_buffer_manager)), 23 gpu_memory_buffer_manager_(std::move(gpu_memory_buffer_manager)),
23 image_factory_(image_factory), 24 image_factory_(image_factory),
24 client_(std::move(client)) { 25 client_(std::move(client)),
26 binding_(this, std::move(request)) {
25 manager_.AddObserver(this); 27 manager_.AddObserver(this);
26 } 28 }
27 29
28 void DisplayCompositor::CreateCompositorFrameSink( 30 void DisplayCompositor::CreateCompositorFrameSink(
29 const cc::FrameSinkId& frame_sink_id, 31 const cc::FrameSinkId& frame_sink_id,
30 gpu::SurfaceHandle surface_handle, 32 gpu::SurfaceHandle surface_handle,
31 cc::mojom::MojoCompositorFrameSinkRequest request, 33 cc::mojom::MojoCompositorFrameSinkRequest request,
32 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request, 34 cc::mojom::MojoCompositorFrameSinkPrivateRequest private_request,
33 cc::mojom::MojoCompositorFrameSinkClientPtr client) { 35 cc::mojom::MojoCompositorFrameSinkClientPtr client) {
34 // We cannot create more than one CompositorFrameSink with a given 36 // We cannot create more than one CompositorFrameSink with a given
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 surface_id.local_frame_id()); 160 surface_id.local_frame_id());
159 161
160 if (client_) 162 if (client_)
161 client_->OnSurfaceCreated(surface_id, frame_size, device_scale_factor); 163 client_->OnSurfaceCreated(surface_id, frame_size, device_scale_factor);
162 } 164 }
163 165
164 void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id, 166 void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id,
165 bool* changed) {} 167 bool* changed) {}
166 168
167 } // namespace ui 169 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/surfaces/display_compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698