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

Side by Side Diff: components/display_compositor/gpu_compositor_frame_sink.cc

Issue 2683583005: Move display_ From CompositorFrameSinkSupport To GpuDisplayCompositorFrameSink (Closed)
Patch Set: addressed comments Created 3 years, 10 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
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 "components/display_compositor/gpu_compositor_frame_sink.h" 5 #include "components/display_compositor/gpu_compositor_frame_sink.h"
6 6
7 #include "cc/surfaces/surface_manager.h"
7 #include "cc/surfaces/surface_reference.h" 8 #include "cc/surfaces/surface_reference.h"
8 9
9 namespace display_compositor { 10 namespace display_compositor {
10 11
11 GpuCompositorFrameSink::GpuCompositorFrameSink( 12 GpuCompositorFrameSink::GpuCompositorFrameSink(
12 GpuCompositorFrameSinkDelegate* delegate, 13 GpuCompositorFrameSinkDelegate* delegate,
13 cc::SurfaceManager* surface_manager, 14 cc::SurfaceManager* surface_manager,
14 const cc::FrameSinkId& frame_sink_id, 15 const cc::FrameSinkId& frame_sink_id,
15 cc::Display* display,
16 cc::mojom::MojoCompositorFrameSinkPrivateRequest 16 cc::mojom::MojoCompositorFrameSinkPrivateRequest
17 compositor_frame_sink_private_request, 17 compositor_frame_sink_private_request,
18 cc::mojom::MojoCompositorFrameSinkClientPtr client) 18 cc::mojom::MojoCompositorFrameSinkClientPtr client,
19 bool has_display)
19 : delegate_(delegate), 20 : delegate_(delegate),
20 support_(this, 21 support_(this,
21 surface_manager, 22 surface_manager,
danakj 2017/02/08 19:23:38 Pointing out that this class has a lot of construc
Alex Z. 2017/02/08 21:26:47 Done.
22 frame_sink_id, 23 frame_sink_id,
23 display,
24 true /* handles_frame_sink_id_invalidation */, 24 true /* handles_frame_sink_id_invalidation */,
25 true /* needs_sync_points */), 25 true /* needs_sync_points */,
26 has_display),
26 surface_manager_(surface_manager), 27 surface_manager_(surface_manager),
27 client_(std::move(client)), 28 client_(std::move(client)),
28 compositor_frame_sink_private_binding_( 29 compositor_frame_sink_private_binding_(
29 this, 30 this,
30 std::move(compositor_frame_sink_private_request)) { 31 std::move(compositor_frame_sink_private_request)) {
31 compositor_frame_sink_private_binding_.set_connection_error_handler( 32 compositor_frame_sink_private_binding_.set_connection_error_handler(
32 base::Bind(&GpuCompositorFrameSink::OnPrivateConnectionLost, 33 base::Bind(&GpuCompositorFrameSink::OnPrivateConnectionLost,
33 base::Unretained(this))); 34 base::Unretained(this)));
34 } 35 }
35 36
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 98 }
98 99
99 void GpuCompositorFrameSink::OnPrivateConnectionLost() { 100 void GpuCompositorFrameSink::OnPrivateConnectionLost() {
100 private_connection_lost_ = true; 101 private_connection_lost_ = true;
101 // Request destruction of |this| only if both connections are lost. 102 // Request destruction of |this| only if both connections are lost.
102 delegate_->OnPrivateConnectionLost(support_.frame_sink_id(), 103 delegate_->OnPrivateConnectionLost(support_.frame_sink_id(),
103 client_connection_lost_); 104 client_connection_lost_);
104 } 105 }
105 106
106 } // namespace display_compositor 107 } // namespace display_compositor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698