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

Unified Diff: cc/scheduler/vsync_time_source.h

Issue 14898002: Add LayerTreeHostSettings for synchronous compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 8 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 | « no previous file | cc/scheduler/vsync_time_source.cc » ('j') | cc/scheduler/vsync_time_source.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/vsync_time_source.h
diff --git a/cc/scheduler/vsync_time_source.h b/cc/scheduler/vsync_time_source.h
index 910168f26bdc315c9d3b428bd0634d28b1539078..4cd044192c1181ba8bec188b7c5dc72d8b2d011a 100644
--- a/cc/scheduler/vsync_time_source.h
+++ b/cc/scheduler/vsync_time_source.h
@@ -33,7 +33,16 @@ class VSyncProvider {
// external vsync signal.
class CC_EXPORT VSyncTimeSource : public TimeSource, public VSyncClient {
public:
- static scoped_refptr<VSyncTimeSource> Create(VSyncProvider* vsync_provider);
+ enum NotificationDisableOption {
+ // The notification will be lazily disabled in the callback to ensure
+ // we get notified of the frame immediately following a quick on-off-on
+ // transition.
+ DISABLE_ON_NEXT_TICK,
+ DISABLE_SYNCHRONOUSLY
+ };
+
+ static scoped_refptr<VSyncTimeSource> Create(
+ VSyncProvider* vsync_provider, NotificationDisableOption option);
// TimeSource implementation
virtual void SetClient(TimeSourceClient* client) OVERRIDE;
@@ -48,7 +57,8 @@ class CC_EXPORT VSyncTimeSource : public TimeSource, public VSyncClient {
virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE;
protected:
- explicit VSyncTimeSource(VSyncProvider* vsync_provider);
+ explicit VSyncTimeSource(VSyncProvider* vsync_provider,
+ NotificationDisableOption option);
virtual ~VSyncTimeSource();
base::TimeTicks last_tick_time_;
@@ -58,6 +68,7 @@ class CC_EXPORT VSyncTimeSource : public TimeSource, public VSyncClient {
VSyncProvider* vsync_provider_;
TimeSourceClient* client_;
+ NotificationDisableOption disable_option_;
DISALLOW_COPY_AND_ASSIGN(VSyncTimeSource);
};
« no previous file with comments | « no previous file | cc/scheduler/vsync_time_source.cc » ('j') | cc/scheduler/vsync_time_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698