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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 11195011: Send vsync timebase updates to the browser compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Send vsync timebase updates to the browser compositor Created 8 years, 2 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/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index 7c23e0ac64e4711192bc3c62ad80789ac3df3a23..8c4dbb65a8ffa4f43918c151bbea216ee486300c 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -745,6 +745,17 @@ void CCLayerTreeHostImpl::onSwapBuffersComplete()
m_client->onSwapBuffersCompleteOnImplThread();
}
+void CCLayerTreeHostImpl::onUpdateVSyncTime(int64 time)
+{
+ // TODO(ajuma): Instead of assuming a constant 60 fps, we should adjust when
+ // we clock down.
+ const double intervalInSeconds = 0.01667;
+
+ m_client->onVSyncParametersChanged(
+ time/((double) base::Time::kMicrosecondsPerSecond),
+ intervalInSeconds);
+}
+
void CCLayerTreeHostImpl::readback(void* pixels, const IntRect& rect)
{
ASSERT(m_renderer);

Powered by Google App Engine
This is Rietveld 408576698