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

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

Issue 2682943004: Revert of DirectCompositorFrameSink Uses CompositorFrameSinkSupport (Closed)
Patch Set: 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_reference.h" 7 #include "cc/surfaces/surface_reference.h"
8 8
9 namespace display_compositor { 9 namespace display_compositor {
10 10
11 GpuCompositorFrameSink::GpuCompositorFrameSink( 11 GpuCompositorFrameSink::GpuCompositorFrameSink(
12 GpuCompositorFrameSinkDelegate* delegate, 12 GpuCompositorFrameSinkDelegate* delegate,
13 cc::SurfaceManager* surface_manager, 13 cc::SurfaceManager* surface_manager,
14 const cc::FrameSinkId& frame_sink_id, 14 const cc::FrameSinkId& frame_sink_id,
15 cc::Display* display, 15 std::unique_ptr<cc::Display> display,
16 std::unique_ptr<cc::BeginFrameSource> begin_frame_source,
16 cc::mojom::MojoCompositorFrameSinkPrivateRequest 17 cc::mojom::MojoCompositorFrameSinkPrivateRequest
17 compositor_frame_sink_private_request, 18 compositor_frame_sink_private_request,
18 cc::mojom::MojoCompositorFrameSinkClientPtr client) 19 cc::mojom::MojoCompositorFrameSinkClientPtr client)
19 : delegate_(delegate), 20 : delegate_(delegate),
20 support_(this, 21 support_(this,
21 surface_manager, 22 surface_manager,
22 frame_sink_id, 23 frame_sink_id,
23 display, 24 std::move(display),
24 true /* handles_frame_sink_id_invalidation */, 25 std::move(begin_frame_source)),
25 true /* needs_sync_points */),
26 surface_manager_(surface_manager), 26 surface_manager_(surface_manager),
27 surface_tracker_(frame_sink_id), 27 surface_tracker_(frame_sink_id),
28 client_(std::move(client)), 28 client_(std::move(client)),
29 compositor_frame_sink_private_binding_( 29 compositor_frame_sink_private_binding_(
30 this, 30 this,
31 std::move(compositor_frame_sink_private_request)) { 31 std::move(compositor_frame_sink_private_request)) {
32 compositor_frame_sink_private_binding_.set_connection_error_handler( 32 compositor_frame_sink_private_binding_.set_connection_error_handler(
33 base::Bind(&GpuCompositorFrameSink::OnPrivateConnectionLost, 33 base::Bind(&GpuCompositorFrameSink::OnPrivateConnectionLost,
34 base::Unretained(this))); 34 base::Unretained(this)));
35 } 35 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 void GpuCompositorFrameSink::OnPrivateConnectionLost() { 146 void GpuCompositorFrameSink::OnPrivateConnectionLost() {
147 private_connection_lost_ = true; 147 private_connection_lost_ = true;
148 // Request destruction of |this| only if both connections are lost. 148 // Request destruction of |this| only if both connections are lost.
149 delegate_->OnPrivateConnectionLost(support_.frame_sink_id(), 149 delegate_->OnPrivateConnectionLost(support_.frame_sink_id(),
150 client_connection_lost_); 150 client_connection_lost_);
151 } 151 }
152 152
153 } // namespace display_compositor 153 } // namespace display_compositor
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698