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

Unified Diff: cc/surfaces/compositor_frame_sink_support.cc

Issue 2807653003: Move Work From CompositorFrameSinkSupport() To Init() (Closed)
Patch Set: More Init Created 3 years, 8 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/compositor_frame_sink_support.cc
diff --git a/cc/surfaces/compositor_frame_sink_support.cc b/cc/surfaces/compositor_frame_sink_support.cc
index b0d7dc28df3399d40605455d89aabe40abf9d80e..172a46ba043b5731efbd704b396eced0b60090e8 100644
--- a/cc/surfaces/compositor_frame_sink_support.cc
+++ b/cc/surfaces/compositor_frame_sink_support.cc
@@ -33,9 +33,6 @@ CompositorFrameSinkSupport::CompositorFrameSinkSupport(
handles_frame_sink_id_invalidation_(handles_frame_sink_id_invalidation),
weak_factory_(this) {
surface_factory_.set_needs_sync_points(needs_sync_points);
- if (handles_frame_sink_id_invalidation_)
- surface_manager_->RegisterFrameSinkId(frame_sink_id_);
- surface_manager_->RegisterSurfaceFactoryClient(frame_sink_id_, this);
}
CompositorFrameSinkSupport::~CompositorFrameSinkSupport() {
@@ -58,6 +55,12 @@ CompositorFrameSinkSupport::~CompositorFrameSinkSupport() {
surface_manager_->InvalidateFrameSinkId(frame_sink_id_);
}
+void CompositorFrameSinkSupport::Init() {
+ if (handles_frame_sink_id_invalidation_)
+ surface_manager_->RegisterFrameSinkId(frame_sink_id_);
+ surface_manager_->RegisterSurfaceFactoryClient(frame_sink_id_, this);
+}
+
void CompositorFrameSinkSupport::EvictFrame() {
surface_factory_.EvictSurface();
}

Powered by Google App Engine
This is Rietveld 408576698