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

Unified Diff: cc/gl_renderer.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/gl_renderer.cc
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc
index f5736071cdf739a0247397b7c87359da6f7f4a98..4c439bc4b4ca27b048ce926ba68701d805d75b3b 100644
--- a/cc/gl_renderer.cc
+++ b/cc/gl_renderer.cc
@@ -107,8 +107,10 @@ bool CCRendererGL::initialize()
m_capabilities.usingPartialSwap = CCSettings::partialSwapEnabled() && extensions.count("GL_CHROMIUM_post_sub_buffer");
// Use the swapBuffers callback only with the threaded proxy.
- if (CCProxy::hasImplThread())
+ if (CCProxy::hasImplThread()) {
m_capabilities.usingSwapCompleteCallback = extensions.count("GL_CHROMIUM_swapbuffers_complete_callback");
+ m_context->setUpdateVSyncTimeCallbackCHROMIUM(this);
+ }
if (m_capabilities.usingSwapCompleteCallback)
m_context->setSwapBuffersCompleteCallbackCHROMIUM(this);
@@ -1109,6 +1111,11 @@ void CCRendererGL::ensureFramebuffer()
m_isFramebufferDiscarded = false;
}
+void CCRendererGL::onUpdateVSyncTime(int64 time)
+{
+ m_client->onUpdateVSyncTime(time);
+}
+
void CCRendererGL::onContextLost()
{
m_client->didLoseContext();

Powered by Google App Engine
This is Rietveld 408576698