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

Unified Diff: cc/thread_proxy.cc

Issue 11028021: cc: Improve frame/commit accounting (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make it work in single tread mode. Get rid of active concept. 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/thread_proxy.cc
diff --git a/cc/thread_proxy.cc b/cc/thread_proxy.cc
index 2e1e74d3bd4e3353c6b7d3007b7b60938afb1e10..fa8748b411c312b232316c97742756f1f19bd12c 100644
--- a/cc/thread_proxy.cc
+++ b/cc/thread_proxy.cc
@@ -9,6 +9,7 @@
#include "CCDelayBasedTimeSource.h"
#include "CCDrawQuad.h"
#include "CCFrameRateController.h"
+#include "CCFrameRateCounter.h"
#include "CCGraphicsContext.h"
#include "CCInputHandler.h"
#include "CCLayerTreeHost.h"
@@ -318,6 +319,7 @@ void CCThreadProxy::onVSyncParametersChanged(double monotonicTimebase, double in
base::TimeTicks timebase = base::TimeTicks::FromInternalValue(monotonicTimebase * base::Time::kMicrosecondsPerSecond);
base::TimeDelta interval = base::TimeDelta::FromMicroseconds(intervalInSeconds * base::Time::kMicrosecondsPerSecond);
m_schedulerOnImplThread->setTimebaseAndInterval(timebase, interval);
+ m_layerTreeHostImpl->fpsCounter()->setTimebaseAndInterval(timebase, interval);
}
void CCThreadProxy::onCanDrawStateChanged(bool canDraw)
@@ -895,6 +897,7 @@ void CCThreadProxy::initializeRendererOnImplThread(CCCompletionEvent* completion
*capabilities = m_layerTreeHostImpl->rendererCapabilities();
m_schedulerOnImplThread->setSwapBuffersCompleteSupported(
capabilities->usingSwapCompleteCallback);
+ onVSyncParametersChanged(0, 1/60.0);
}
completion->signal();

Powered by Google App Engine
This is Rietveld 408576698