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

Unified Diff: cc/surfaces/surface_manager.h

Issue 2854163003: [cc] Plumb BeginFrameAcks through SurfaceManager to DisplayScheduler. (Closed)
Patch Set: fix clang compile error Created 3 years, 7 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/surface.cc ('k') | cc/surfaces/surface_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_manager.h
diff --git a/cc/surfaces/surface_manager.h b/cc/surfaces/surface_manager.h
index 4a45f2c34c2b60f871d125c56c35bfbb9c513c12..73b1b25040b922a530d439b296e421eb6e541aa3 100644
--- a/cc/surfaces/surface_manager.h
+++ b/cc/surfaces/surface_manager.h
@@ -35,6 +35,9 @@
#endif
namespace cc {
+
+struct BeginFrameAck;
+struct BeginFrameArgs;
class BeginFrameSource;
class CompositorFrame;
class FrameSinkManagerClient;
@@ -79,7 +82,12 @@ class CC_SURFACES_EXPORT SurfaceManager {
observer_list_.RemoveObserver(obs);
}
- bool SurfaceModified(const SurfaceId& surface_id);
+ // Called when a Surface is modified, e.g. when a CompositorFrame is
+ // activated, its producer confirms that no CompositorFrame will be submitted
+ // in response to a BeginFrame, or a CopyOutputRequest is issued.
+ //
+ // |ack.sequence_number| is only valid if called in response to a BeginFrame.
+ bool SurfaceModified(const SurfaceId& surface_id, const BeginFrameAck& ack);
// Called when a CompositorFrame is submitted to a CompositorFrameSinkSupport
// for a given |surface_id| for the first time.
@@ -98,6 +106,11 @@ class CC_SURFACES_EXPORT SurfaceManager {
// Called when |surface| is being destroyed.
void SurfaceDiscarded(Surface* surface);
+ // Called when a Surface's CompositorFrame producer has received a BeginFrame
+ // and, thus, is expected to produce damage soon.
+ void SurfaceDamageExpected(const SurfaceId& surface_id,
+ const BeginFrameArgs& args);
+
// Require that the given sequence number must be satisfied (using
// SatisfySequence) before the given surface can be destroyed.
void RequireSequence(const SurfaceId& surface_id,
« no previous file with comments | « cc/surfaces/surface.cc ('k') | cc/surfaces/surface_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698