summaryrefslogtreecommitdiffstats
path: root/cc/surfaces/surface_factory.h
diff options
context:
space:
mode:
authorjbauman <jbauman@chromium.org>2015-01-26 18:53:00 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-27 02:53:41 +0000
commitc247da12fcca15fdcc948024287b94d6e63e9784 (patch)
treea70d6b32500dab15367155ce8ffe428a86a6fb85 /cc/surfaces/surface_factory.h
parent474ba4f54ed0c050a74c35ec7ec73d849bc9f6ee (diff)
downloadchromium_src-c247da12fcca15fdcc948024287b94d6e63e9784.zip
chromium_src-c247da12fcca15fdcc948024287b94d6e63e9784.tar.gz
chromium_src-c247da12fcca15fdcc948024287b94d6e63e9784.tar.bz2
Run draw callback immediately if no Display is damaged.
This may cause the draw callback to be run earlier than before if the Surface would later be added to a Display, but prevents it ensures that the callback runs if the Surface wouldn't be drawn at all BUG=440269 Review URL: https://codereview.chromium.org/792383004 Cr-Commit-Position: refs/heads/master@{#313212}
Diffstat (limited to 'cc/surfaces/surface_factory.h')
-rw-r--r--cc/surfaces/surface_factory.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/cc/surfaces/surface_factory.h b/cc/surfaces/surface_factory.h
index 7abd929..b6b627f 100644
--- a/cc/surfaces/surface_factory.h
+++ b/cc/surfaces/surface_factory.h
@@ -27,6 +27,8 @@ class Surface;
class SurfaceFactoryClient;
class SurfaceManager;
+enum class SurfaceDrawStatus { DRAW_SKIPPED, DRAWN };
+
// A SurfaceFactory is used to create surfaces that may share resources and
// receive returned resources for frames submitted to those surfaces. Resources
// submitted to frames created by a particular factory will be returned to that
@@ -35,9 +37,7 @@ 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)>;
+ using DrawCallback = base::Callback<void(SurfaceDrawStatus)>;
SurfaceFactory(SurfaceManager* manager, SurfaceFactoryClient* client);
~SurfaceFactory();