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

Unified Diff: cc/surfaces/surface_factory.h

Issue 465673003: Add callback when queueing frame on Surface to create backpressure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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_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 c74f973d31e0d91bf96f8249b652abb3b3bf8eb2..fafa53c540f47073c59189d1a25e062d3dfa3329 100644
--- a/cc/surfaces/surface_factory.h
+++ b/cc/surfaces/surface_factory.h
@@ -5,6 +5,7 @@
#ifndef CC_SURFACES_SURFACE_FACTORY_H_
#define CC_SURFACES_SURFACE_FACTORY_H_
+#include "base/callback_forward.h"
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -37,7 +38,10 @@ class CC_SURFACES_EXPORT SurfaceFactory
void Destroy(SurfaceId surface_id);
// A frame can only be submitted to a surface created by this factory,
// although the frame may reference surfaces created by other factories.
- void SubmitFrame(SurfaceId surface_id, scoped_ptr<CompositorFrame> frame);
+ // The callback is called the first time this frame is used to draw.
+ void SubmitFrame(SurfaceId surface_id,
+ scoped_ptr<CompositorFrame> frame,
+ const base::Closure& callback);
SurfaceFactoryClient* client() { return client_; }
« 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