Index: cc/single_thread_proxy.cc |
diff --git a/cc/single_thread_proxy.cc b/cc/single_thread_proxy.cc |
index c5a07f097d59d9c90df0a2e3d77f1a17e42f9e2c..e0234fedf96907a44307e62aa177ac1bc9580187 100644 |
--- a/cc/single_thread_proxy.cc |
+++ b/cc/single_thread_proxy.cc |
@@ -7,6 +7,7 @@ |
#include "CCSingleThreadProxy.h" |
#include "CCDrawQuad.h" |
+#include "CCFrameRateCounter.h" |
#include "CCGraphicsContext.h" |
#include "CCLayerTreeHost.h" |
#include "CCTextureUpdateController.h" |
@@ -117,6 +118,7 @@ bool CCSingleThreadProxy::initializeRenderer() |
if (ok) { |
m_rendererInitialized = true; |
m_RendererCapabilitiesForMainThread = m_layerTreeHostImpl->rendererCapabilities(); |
+ onVSyncParametersChanged(0, 1.0/60.0); |
} |
return ok; |
@@ -312,6 +314,14 @@ void CCSingleThreadProxy::onSwapBuffersCompleteOnImplThread() |
ASSERT_NOT_REACHED(); |
} |
+void CCSingleThreadProxy::onVSyncParametersChanged(double monotonicTimebase, double intervalInSeconds) |
+{ |
+ TRACE_EVENT2("cc", "CCSingleThreadProxy::onVSyncParametersChanged", "monotonicTimebase", monotonicTimebase, "intervalInSeconds", intervalInSeconds); |
+ base::TimeTicks timebase = base::TimeTicks::FromInternalValue(monotonicTimebase * base::Time::kMicrosecondsPerSecond); |
+ base::TimeDelta interval = base::TimeDelta::FromMicroseconds(intervalInSeconds * base::Time::kMicrosecondsPerSecond); |
+ m_layerTreeHostImpl->fpsCounter()->setTimebaseAndInterval(timebase, interval); |
+} |
+ |
bool CCSingleThreadProxy::commitAndComposite() |
{ |
ASSERT(CCProxy::isMainThread()); |