Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 cc::FrameSinkManager* framesink_manager, | |
| 14 const cc::FrameSinkId& frame_sink_id, | 15 const cc::FrameSinkId& frame_sink_id, |
| 15 std::unique_ptr<cc::Display> display, | 16 std::unique_ptr<cc::Display> display, |
| 16 std::unique_ptr<cc::BeginFrameSource> begin_frame_source, | 17 std::unique_ptr<cc::BeginFrameSource> begin_frame_source, |
| 17 cc::mojom::MojoCompositorFrameSinkPrivateRequest | 18 cc::mojom::MojoCompositorFrameSinkPrivateRequest |
| 18 compositor_frame_sink_private_request, | 19 compositor_frame_sink_private_request, |
| 19 cc::mojom::MojoCompositorFrameSinkClientPtr client) | 20 cc::mojom::MojoCompositorFrameSinkClientPtr client) |
| 20 : delegate_(delegate), | 21 : delegate_(delegate), |
| 21 support_(this, | 22 support_(this, |
| 22 surface_manager, | 23 surface_manager, |
| 24 framesink_manager, | |
| 23 frame_sink_id, | 25 frame_sink_id, |
| 24 std::move(display), | 26 std::move(display), |
| 25 std::move(begin_frame_source)), | 27 std::move(begin_frame_source)), |
| 26 surface_manager_(surface_manager), | 28 surface_manager_(surface_manager), |
| 29 framesink_manager_(framesink_manager), | |
|
Fady Samuel
2017/02/12 19:04:08
What's the point of this member variable?
k.devara
2017/02/13 06:52:00
You are right- the argument is just a pass-thru I
| |
| 27 surface_tracker_(frame_sink_id), | 30 surface_tracker_(frame_sink_id), |
| 28 client_(std::move(client)), | 31 client_(std::move(client)), |
| 29 compositor_frame_sink_private_binding_( | 32 compositor_frame_sink_private_binding_( |
| 30 this, | 33 this, |
| 31 std::move(compositor_frame_sink_private_request)) { | 34 std::move(compositor_frame_sink_private_request)) { |
| 32 compositor_frame_sink_private_binding_.set_connection_error_handler( | 35 compositor_frame_sink_private_binding_.set_connection_error_handler( |
| 33 base::Bind(&GpuCompositorFrameSink::OnPrivateConnectionLost, | 36 base::Bind(&GpuCompositorFrameSink::OnPrivateConnectionLost, |
| 34 base::Unretained(this))); | 37 base::Unretained(this))); |
| 35 } | 38 } |
| 36 | 39 |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 144 } | 147 } |
| 145 | 148 |
| 146 void GpuCompositorFrameSink::OnPrivateConnectionLost() { | 149 void GpuCompositorFrameSink::OnPrivateConnectionLost() { |
| 147 private_connection_lost_ = true; | 150 private_connection_lost_ = true; |
| 148 // Request destruction of |this| only if both connections are lost. | 151 // Request destruction of |this| only if both connections are lost. |
| 149 delegate_->OnPrivateConnectionLost(support_.frame_sink_id(), | 152 delegate_->OnPrivateConnectionLost(support_.frame_sink_id(), |
| 150 client_connection_lost_); | 153 client_connection_lost_); |
| 151 } | 154 } |
| 152 | 155 |
| 153 } // namespace display_compositor | 156 } // namespace display_compositor |
| OLD | NEW |