summaryrefslogtreecommitdiffstats
path: root/cc/trees/thread_proxy.h
diff options
context:
space:
mode:
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-26 22:28:45 +0000
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-26 22:28:45 +0000
commit7ed4751b7860f7248ae7042465d3051867632c56 (patch)
tree4d2fc3b6525453b48461ceeae0611e21c4759648 /cc/trees/thread_proxy.h
parent5b409ba35802ce8eba4b3056c5787cf73f81c745 (diff)
downloadchromium_src-7ed4751b7860f7248ae7042465d3051867632c56.zip
chromium_src-7ed4751b7860f7248ae7042465d3051867632c56.tar.gz
chromium_src-7ed4751b7860f7248ae7042465d3051867632c56.tar.bz2
cc: Hook vsync time source to output surface
Let the output surface generate a vsync signal for the vsync time source. This will be used to drive rendering based on a vsync notification from the browser process. BUG=149227 TEST=LayerTreeHostTestVSyncNotification Review URL: https://chromiumcodereview.appspot.com/12674030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190780 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/thread_proxy.h')
-rw-r--r--cc/trees/thread_proxy.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h
index 67084a6..73193aa 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_;