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

Unified Diff: cc/surfaces/surface_observer.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_manager.cc ('k') | cc/surfaces/surface_synchronization_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_observer.h
diff --git a/cc/surfaces/surface_observer.h b/cc/surfaces/surface_observer.h
index 9b2fc1c57f620fa11ca43813e65c74ef5fcc361e..c57f07e5f2583e6c8103672db1aac9db4cd125ff 100644
--- a/cc/surfaces/surface_observer.h
+++ b/cc/surfaces/surface_observer.h
@@ -7,20 +7,37 @@
namespace cc {
+struct BeginFrameAck;
+struct BeginFrameArgs;
+class SurfaceId;
class SurfaceInfo;
class SurfaceObserver {
public:
- // Runs when a CompositorFrame is received for the given SurfaceInfo for the
+ // Runs when a CompositorFrame is activated for the given SurfaceInfo for the
// first time.
virtual void OnSurfaceCreated(const SurfaceInfo& surface_info) = 0;
- // Runs when a Surface is damaged. *changed should be set to true if this
- // causes a Display to be damaged.
- virtual void OnSurfaceDamaged(const SurfaceId& surface_id, bool* changed) = 0;
+ // Runs when a Surface was marked to be destroyed.
+ virtual void OnSurfaceDestroyed(const SurfaceId& surface_id) = 0;
+
+ // Runs 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.
+ // |*changed| should be set to true if this causes a Display to be damaged.
+ virtual void OnSurfaceDamaged(const SurfaceId& surface_id,
+ const BeginFrameAck& ack,
+ bool* changed) = 0;
// Called when a surface is garbage-collected.
virtual void OnSurfaceDiscarded(const SurfaceId& surface_id) = 0;
+
+ // Runs when a Surface's CompositorFrame producer has received a BeginFrame
+ // and, thus, is expected to produce damage soon.
+ virtual void OnSurfaceDamageExpected(const SurfaceId& surface_id,
+ const BeginFrameArgs& args) = 0;
};
} // namespace cc
« no previous file with comments | « cc/surfaces/surface_manager.cc ('k') | cc/surfaces/surface_synchronization_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698