Index: cc/surfaces/surface_factory.h |
diff --git a/cc/surfaces/surface_factory.h b/cc/surfaces/surface_factory.h |
index eba32d27fe21e48a7aca1a157e45d4303f3ce7a1..7abd9292d3f4770483f776ff75e16471a55f44cf 100644 |
--- a/cc/surfaces/surface_factory.h |
+++ b/cc/surfaces/surface_factory.h |
@@ -35,6 +35,10 @@ class SurfaceManager; |
class CC_SURFACES_EXPORT SurfaceFactory |
: public base::SupportsWeakPtr<SurfaceFactory> { |
public: |
+ // This callback is called with true if the frame was drawn, or false if it |
+ // was discarded. |
+ using DrawCallback = base::Callback<void(bool)>; |
+ |
SurfaceFactory(SurfaceManager* manager, SurfaceFactoryClient* client); |
~SurfaceFactory(); |
@@ -43,10 +47,11 @@ class CC_SURFACES_EXPORT SurfaceFactory |
void DestroyAll(); |
// A frame can only be submitted to a surface created by this factory, |
// although the frame may reference surfaces created by other factories. |
- // The callback is called the first time this frame is used to draw. |
+ // The callback is called the first time this frame is used to draw, or if |
+ // the frame is discarded. |
void SubmitFrame(SurfaceId surface_id, |
scoped_ptr<CompositorFrame> frame, |
- const base::Closure& callback); |
+ const DrawCallback& callback); |
void RequestCopyOfSurface(SurfaceId surface_id, |
scoped_ptr<CopyOutputRequest> copy_request); |