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

Unified Diff: cc/layer_tree_host.cc

Issue 11189037: toggle FPS counter in compositor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: added check for accelerated compositing, removed 'showFPSCounter' from settings, command-line flag … 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.cc
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
index a15713666c6f423c2103ca1cb098426c87a31e58..56219f473cfe88081717235336bdb829548c3c83 100644
--- a/cc/layer_tree_host.cc
+++ b/cc/layer_tree_host.cc
@@ -38,7 +38,6 @@ bool CCLayerTreeHost::s_needsFilterContext = false;
CCLayerTreeSettings::CCLayerTreeSettings()
: acceleratePainting(false)
- , showFPSCounter(false)
, showPlatformLayerTree(false)
, showPaintRects(false)
, showPropertyChangedRects(false)
@@ -110,6 +109,7 @@ CCLayerTreeHost::CCLayerTreeHost(CCLayerTreeHostClient* client, const CCLayerTre
, m_backgroundColor(SK_ColorWHITE)
, m_hasTransparentBackground(false)
, m_partialTextureUpdateRequests(0)
+ , m_showFPSCounter(false)
{
ASSERT(CCProxy::isMainThread());
numLayerTreeInstances++;
@@ -277,6 +277,12 @@ void CCLayerTreeHost::finishCommitOnImplThread(CCLayerTreeHostImpl* hostImpl)
m_commitNumber++;
}
+void CCLayerTreeHost::setShowFPSCounter(bool show)
+{
+ m_showFPSCounter = show;
+ m_proxy->setShowFPSCounter(show);
nduca 2012/10/20 19:49:41 so what happens if you set the atlas, then call se
+}
+
void CCLayerTreeHost::setFontAtlas(scoped_ptr<CCFontAtlas> fontAtlas)
{
m_fontAtlas = fontAtlas.Pass();
@@ -286,7 +292,7 @@ void CCLayerTreeHost::setFontAtlas(scoped_ptr<CCFontAtlas> fontAtlas)
void CCLayerTreeHost::willCommit()
{
m_client->willCommit();
- if (m_rootLayer && m_settings.showDebugInfo()) {
+ if (m_rootLayer && (m_settings.showDebugInfo() || m_showFPSCounter)) {
if (!m_hudLayer)
m_hudLayer = HeadsUpDisplayLayerChromium::create();

Powered by Google App Engine
This is Rietveld 408576698