| Index: components/display_compositor/gpu_compositor_frame_sink.cc
|
| diff --git a/components/display_compositor/gpu_compositor_frame_sink.cc b/components/display_compositor/gpu_compositor_frame_sink.cc
|
| index 9c1a4df2f8a94af97d71e9e5943ad8dd52f324f5..a21aa415f1de56f93158560e6d89586705ab701e 100644
|
| --- a/components/display_compositor/gpu_compositor_frame_sink.cc
|
| +++ b/components/display_compositor/gpu_compositor_frame_sink.cc
|
| @@ -4,26 +4,19 @@
|
|
|
| #include "components/display_compositor/gpu_compositor_frame_sink.h"
|
|
|
| +#include "cc/surfaces/surface_manager.h"
|
| #include "cc/surfaces/surface_reference.h"
|
|
|
| namespace display_compositor {
|
|
|
| GpuCompositorFrameSink::GpuCompositorFrameSink(
|
| GpuCompositorFrameSinkDelegate* delegate,
|
| - cc::SurfaceManager* surface_manager,
|
| - const cc::FrameSinkId& frame_sink_id,
|
| - cc::Display* display,
|
| + std::unique_ptr<cc::CompositorFrameSinkSupport> support,
|
| cc::mojom::MojoCompositorFrameSinkPrivateRequest
|
| compositor_frame_sink_private_request,
|
| cc::mojom::MojoCompositorFrameSinkClientPtr client)
|
| : delegate_(delegate),
|
| - support_(this,
|
| - surface_manager,
|
| - frame_sink_id,
|
| - display,
|
| - true /* handles_frame_sink_id_invalidation */,
|
| - true /* needs_sync_points */),
|
| - surface_manager_(surface_manager),
|
| + support_(std::move(support)),
|
| client_(std::move(client)),
|
| compositor_frame_sink_private_binding_(
|
| this,
|
| @@ -36,26 +29,26 @@ GpuCompositorFrameSink::GpuCompositorFrameSink(
|
| GpuCompositorFrameSink::~GpuCompositorFrameSink() {}
|
|
|
| void GpuCompositorFrameSink::EvictFrame() {
|
| - support_.EvictFrame();
|
| + support_->EvictFrame();
|
| }
|
|
|
| void GpuCompositorFrameSink::SetNeedsBeginFrame(bool needs_begin_frame) {
|
| - support_.SetNeedsBeginFrame(needs_begin_frame);
|
| + support_->SetNeedsBeginFrame(needs_begin_frame);
|
| }
|
|
|
| void GpuCompositorFrameSink::SubmitCompositorFrame(
|
| const cc::LocalSurfaceId& local_surface_id,
|
| cc::CompositorFrame frame) {
|
| - support_.SubmitCompositorFrame(local_surface_id, std::move(frame));
|
| + support_->SubmitCompositorFrame(local_surface_id, std::move(frame));
|
| }
|
|
|
| void GpuCompositorFrameSink::Require(const cc::LocalSurfaceId& local_surface_id,
|
| const cc::SurfaceSequence& sequence) {
|
| - support_.Require(local_surface_id, sequence);
|
| + support_->Require(local_surface_id, sequence);
|
| }
|
|
|
| void GpuCompositorFrameSink::Satisfy(const cc::SurfaceSequence& sequence) {
|
| - support_.Satisfy(sequence);
|
| + support_->Satisfy(sequence);
|
| }
|
|
|
| void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() {
|
| @@ -65,12 +58,12 @@ void GpuCompositorFrameSink::DidReceiveCompositorFrameAck() {
|
|
|
| void GpuCompositorFrameSink::AddChildFrameSink(
|
| const cc::FrameSinkId& child_frame_sink_id) {
|
| - support_.AddChildFrameSink(child_frame_sink_id);
|
| + support_->AddChildFrameSink(child_frame_sink_id);
|
| }
|
|
|
| void GpuCompositorFrameSink::RemoveChildFrameSink(
|
| const cc::FrameSinkId& child_frame_sink_id) {
|
| - support_.RemoveChildFrameSink(child_frame_sink_id);
|
| + support_->RemoveChildFrameSink(child_frame_sink_id);
|
| }
|
|
|
| void GpuCompositorFrameSink::OnBeginFrame(const cc::BeginFrameArgs& args) {
|
| @@ -92,14 +85,14 @@ void GpuCompositorFrameSink::WillDrawSurface() {
|
| void GpuCompositorFrameSink::OnClientConnectionLost() {
|
| client_connection_lost_ = true;
|
| // Request destruction of |this| only if both connections are lost.
|
| - delegate_->OnClientConnectionLost(support_.frame_sink_id(),
|
| + delegate_->OnClientConnectionLost(support_->frame_sink_id(),
|
| private_connection_lost_);
|
| }
|
|
|
| void GpuCompositorFrameSink::OnPrivateConnectionLost() {
|
| private_connection_lost_ = true;
|
| // Request destruction of |this| only if both connections are lost.
|
| - delegate_->OnPrivateConnectionLost(support_.frame_sink_id(),
|
| + delegate_->OnPrivateConnectionLost(support_->frame_sink_id(),
|
| client_connection_lost_);
|
| }
|
|
|
|
|