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

Unified Diff: cc/surfaces/surface_dependency_tracker.h

Issue 2789163002: [cc] Acknowledge BeginFrames in SurfaceDependencyTracker. (Closed)
Patch Set: fix nits 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
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support.cc ('k') | cc/surfaces/surface_dependency_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_dependency_tracker.h
diff --git a/cc/surfaces/surface_dependency_tracker.h b/cc/surfaces/surface_dependency_tracker.h
index 193eb31a22f8e13797abeb71ef30cc37cbe537e8..e5d2b13615b8afaa39bb55f11514e0dd34c1e335 100644
--- a/cc/surfaces/surface_dependency_tracker.h
+++ b/cc/surfaces/surface_dependency_tracker.h
@@ -71,6 +71,14 @@ class CC_SURFACES_EXPORT SurfaceDependencyTracker : public BeginFrameObserver,
// corresponding to |surface_id|.
void NotifySurfaceIdAvailable(const SurfaceId& surface_id);
+ // Determines whether we should be observing the BeginFrameSource and
+ // starts/stops observing as necessary.
+ void UpdateNeedsBeginFrames();
+
+ // Acknowledge and confirm the last BeginFrame we received after we have
+ // activated all previously pending frames.
+ void AcknowledgeLastBeginFrame();
+
SurfaceManager* const surface_manager_;
// The last begin frame args generated by the begin frame source.
@@ -89,6 +97,9 @@ class CC_SURFACES_EXPORT SurfaceDependencyTracker : public BeginFrameObserver,
PendingSurfaceSet pending_surfaces_;
+ // Whether we are currently observing the BeginFrameSource.
+ bool needs_begin_frames_ = false;
+
DISALLOW_COPY_AND_ASSIGN(SurfaceDependencyTracker);
};
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support.cc ('k') | cc/surfaces/surface_dependency_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698