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

Unified Diff: components/display_compositor/gpu_compositor_frame_sink.cc

Issue 2683583005: Move display_ From CompositorFrameSinkSupport To GpuDisplayCompositorFrameSink (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
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 9e98a3b76af42dd16277bcf65b51c428e2afc9d6..ac1584bc911155da467f1ed27e6918a6d92d9ab5 100644
--- a/components/display_compositor/gpu_compositor_frame_sink.cc
+++ b/components/display_compositor/gpu_compositor_frame_sink.cc
@@ -10,20 +10,12 @@ namespace display_compositor {
GpuCompositorFrameSink::GpuCompositorFrameSink(
GpuCompositorFrameSinkDelegate* delegate,
- cc::SurfaceManager* surface_manager,
- const cc::FrameSinkId& frame_sink_id,
- std::unique_ptr<cc::Display> display,
- std::unique_ptr<cc::BeginFrameSource> begin_frame_source,
+ 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,
- std::move(display),
- std::move(begin_frame_source)),
- surface_manager_(surface_manager),
+ support_(std::move(support)),
client_(std::move(client)),
compositor_frame_sink_private_binding_(
this,
@@ -36,26 +28,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 +57,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 +84,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_);
}

Powered by Google App Engine
This is Rietveld 408576698