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

Unified Diff: cc/trees/thread_proxy.h

Issue 12674030: cc: Hook vsync time source to output surface (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Review tweaks. Created 7 years, 9 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/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/thread_proxy.h
diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h
index 67084a65ea11547b6885815671fc9afa9a47d929..73193aa1eacaae81f32531a1acb6d070ed00b0af 100644
--- a/cc/trees/thread_proxy.h
+++ b/cc/trees/thread_proxy.h
@@ -12,6 +12,7 @@
#include "cc/base/completion_event.h"
#include "cc/resources/resource_update_controller.h"
#include "cc/scheduler/scheduler.h"
+#include "cc/scheduler/vsync_time_source.h"
#include "cc/trees/layer_tree_host_impl.h"
#include "cc/trees/proxy.h"
@@ -28,7 +29,8 @@ class Thread;
class ThreadProxy : public Proxy,
LayerTreeHostImplClient,
SchedulerClient,
- ResourceUpdateControllerClient {
+ ResourceUpdateControllerClient,
+ VSyncProvider {
public:
static scoped_ptr<Proxy> Create(LayerTreeHost* layer_tree_host,
scoped_ptr<Thread> impl_thread);
@@ -69,6 +71,7 @@ class ThreadProxy : public Proxy,
virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE;
virtual void OnVSyncParametersChanged(base::TimeTicks timebase,
base::TimeDelta interval) OVERRIDE;
+ virtual void DidVSync(base::TimeTicks frame_time) OVERRIDE;
virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE;
virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE;
virtual void SetNeedsRedrawOnImplThread() OVERRIDE;
@@ -104,6 +107,9 @@ class ThreadProxy : public Proxy,
// ResourceUpdateControllerClient implementation
virtual void ReadyToFinalizeTextureUpdates() OVERRIDE;
+ // VSyncProvider implementation
+ virtual void RequestVSyncNotification(VSyncClient* client) OVERRIDE;
+
int MaxFramesPendingForTesting() const {
return scheduler_on_impl_thread_->MaxFramesPending();
}
@@ -248,6 +254,8 @@ class ThreadProxy : public Proxy,
bool next_frame_is_newly_committed_frame_on_impl_thread_;
bool render_vsync_enabled_;
+ bool render_vsync_notification_enabled_;
+ VSyncClient* vsync_client_;
bool inside_draw_;
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698