Chromium Code Reviews| 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(); |