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 |