Index: cc/surfaces/surface_observer.h |
diff --git a/cc/surfaces/surface_observer.h b/cc/surfaces/surface_observer.h |
index e1c182a45c50d99b91c1a6940dd96f160d95b42f..cafcd25047b4a50396c748165e47b34387f3cebb 100644 |
--- a/cc/surfaces/surface_observer.h |
+++ b/cc/surfaces/surface_observer.h |
@@ -7,17 +7,33 @@ |
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; |
+ virtual void OnSurfaceCreated(const SurfaceInfo& surface_info) {} |
sunnyps
2017/05/22 06:46:38
This should be a pure abstract class otherwise we
sunnyps
2017/05/22 06:46:38
Should we add the begin frame args and ack to Surf
Eric Seckler
2017/05/22 15:32:15
Done.
Eric Seckler
2017/05/22 15:32:15
We could, but it's not really relevant in that sit
|
- // 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) {} |
+ |
+ // Runs when a Surface is damaged (a new CompositorFrame is activated). |
+ // *changed should be set to true if this causes a Display to be damaged. |
+ virtual void OnSurfaceDamaged(const SurfaceId& surface_id, bool* changed) {} |
+ |
+ // Runs when a Surface's CompositorFrame producer has received a BeginFrame. |
+ virtual void OnSurfaceReceivedBeginFrame(const SurfaceId& surface_id, |
sunnyps
2017/05/22 06:46:38
bikeshed nit: OnSurfaceBeginFrame
Eric Seckler
2017/05/22 15:32:15
Done.
|
+ const BeginFrameArgs& args) {} |
+ |
+ // Runs when a Surface's CompositorFrame producer has completed a BeginFrame |
+ // either by submitting a CompositorFrame or confirming that it will not |
+ // submit one. |
+ virtual void OnSurfaceFinishedBeginFrame(const SurfaceId& surface_id, |
sunnyps
2017/05/22 06:46:38
bikeshed nit: OnSurfaceBeginFrameAck
Eric Seckler
2017/05/22 15:32:15
Done.
|
+ const BeginFrameAck& ack) {} |
}; |
} // namespace cc |