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

Unified Diff: cc/surfaces/direct_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: cc/surfaces/direct_compositor_frame_sink.cc
diff --git a/cc/surfaces/direct_compositor_frame_sink.cc b/cc/surfaces/direct_compositor_frame_sink.cc
index 1fa4d8d150a4ebf01d2b1cd59053a630aedf1842..68eae9579449bfe81c3450c54ef1b2d45a1d2aca 100644
--- a/cc/surfaces/direct_compositor_frame_sink.cc
+++ b/cc/surfaces/direct_compositor_frame_sink.cc
@@ -68,13 +68,15 @@ bool DirectCompositorFrameSink::BindToClient(
cp->SetLostContextCallback(base::Closure());
support_ = base::MakeUnique<CompositorFrameSinkSupport>(
- this, surface_manager_, frame_sink_id_, display_, false,
- capabilities_.delegated_sync_points_required);
+ this, surface_manager_, frame_sink_id_, false,
+ capabilities_.delegated_sync_points_required, true /* has_display */);
begin_frame_source_ = base::MakeUnique<ExternalBeginFrameSource>(this);
client_->SetBeginFrameSource(begin_frame_source_.get());
+
// Avoid initializing GL context here, as this should be sharing the
// Display's context.
+ display_->Initialize(this, surface_manager_);
return true;
}
@@ -92,6 +94,8 @@ void DirectCompositorFrameSink::SubmitCompositorFrame(CompositorFrame frame) {
delegated_local_surface_id_ = surface_id_allocator_.GenerateId();
last_swap_frame_size_ = frame_size;
}
+ display_->SetLocalSurfaceId(delegated_local_surface_id_,
+ frame.metadata.device_scale_factor);
support_->SubmitCompositorFrame(delegated_local_surface_id_,
std::move(frame));
}

Powered by Google App Engine
This is Rietveld 408576698