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

Unified Diff: cc/surfaces/surface_factory.h

Issue 812543002: Update from https://crrev.com/308331 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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_aggregator_unittest.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « cc/surfaces/surface_aggregator_unittest.cc ('k') | cc/surfaces/surface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698