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

Unified Diff: cc/thread_proxy.h

Issue 11833009: Provide a vsync notification to the renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 10 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/test/fake_output_surface.cc ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/thread_proxy.h
diff --git a/cc/thread_proxy.h b/cc/thread_proxy.h
index bf7d445eca781c3766daaa8dcf90210c2f296625..004cfbf89836fb913d9fff3ae9a92728b6345477 100644
--- a/cc/thread_proxy.h
+++ b/cc/thread_proxy.h
@@ -14,6 +14,7 @@
#include "cc/proxy.h"
#include "cc/resource_update_controller.h"
#include "cc/scheduler.h"
+#include "cc/vsync_time_source.h"
namespace cc {
@@ -24,7 +25,7 @@ class Scheduler;
class ScopedThreadProxy;
class Thread;
-class ThreadProxy : public Proxy, LayerTreeHostImplClient, SchedulerClient, ResourceUpdateControllerClient {
+class ThreadProxy : public Proxy, LayerTreeHostImplClient, SchedulerClient, ResourceUpdateControllerClient, VSyncProvider {
public:
static scoped_ptr<Proxy> create(LayerTreeHost*, scoped_ptr<Thread> implThread);
@@ -60,6 +61,7 @@ public:
virtual void didLoseOutputSurfaceOnImplThread() OVERRIDE;
virtual void onSwapBuffersCompleteOnImplThread() OVERRIDE;
virtual void onVSyncParametersChanged(base::TimeTicks timebase, base::TimeDelta interval) OVERRIDE;
+ virtual void didVSync(base::TimeTicks frameTime) OVERRIDE;
virtual void onCanDrawStateChanged(bool canDraw) OVERRIDE;
virtual void onHasPendingTreeStateChanged(bool hasPendingTree) OVERRIDE;
virtual void setNeedsRedrawOnImplThread() OVERRIDE;
@@ -87,6 +89,9 @@ public:
// ResourceUpdateControllerClient implementation
virtual void readyToFinalizeTextureUpdates() OVERRIDE;
+ // VSyncProvider implementation
+ virtual void RequestVSyncNotification(VSyncClient* client) OVERRIDE;
+
int maxFramesPendingForTesting() const { return m_schedulerOnImplThread->maxFramesPending(); }
private:
@@ -198,6 +203,8 @@ private:
bool m_nextFrameIsNewlyCommittedFrameOnImplThread;
bool m_renderVSyncEnabled;
+ bool m_renderVSyncNotificationEnabled;
+ VSyncClient* m_vsyncClient;
bool m_insideDraw;
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698