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

Unified Diff: cc/vsync_time_source.h

Issue 11854013: Use input events to improve vsync scheduling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't set last-input-for-vsync bit on pages with touch handlers. Created 7 years, 11 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
Index: cc/vsync_time_source.h
diff --git a/cc/vsync_time_source.h b/cc/vsync_time_source.h
index ad412c0f289631e7d46b984a26622b3d4b623e37..7b9e57d8567d0b7cc8356dc0c7adbf8cff893f6e 100644
--- a/cc/vsync_time_source.h
+++ b/cc/vsync_time_source.h
@@ -13,6 +13,7 @@ namespace cc {
class CC_EXPORT VSyncClient {
public:
virtual void DidVSync(base::TimeTicks frame_time) = 0;
+ virtual void DidReceiveLastInputEventForVSync() = 0;
protected:
virtual ~VSyncClient() {}
@@ -46,6 +47,10 @@ class CC_EXPORT VSyncTimeSource : public TimeSource, public VSyncClient {
// VSyncClient implementation
virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE;
+ virtual void DidReceiveLastInputEventForVSync() OVERRIDE;
+
+ // Virtual for testing.
+ virtual base::TimeTicks Now() const;
protected:
explicit VSyncTimeSource(VSyncProvider* vsync_provider);
@@ -55,6 +60,7 @@ class CC_EXPORT VSyncTimeSource : public TimeSource, public VSyncClient {
base::TimeDelta interval_;
bool active_;
bool notification_requested_;
+ bool did_synthesize_last_vsync_;
VSyncProvider* vsync_provider_;
TimeSourceClient* client_;
« no previous file with comments | « cc/thread_proxy.cc ('k') | cc/vsync_time_source.cc » ('j') | cc/vsync_time_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698