| Index: cc/layer_tree_host.cc
|
| diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
|
| index a15713666c6f423c2103ca1cb098426c87a31e58..8729fee84c89506eb49799211d340fe6801ae593 100644
|
| --- a/cc/layer_tree_host.cc
|
| +++ b/cc/layer_tree_host.cc
|
| @@ -110,6 +110,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 +278,12 @@ void CCLayerTreeHost::finishCommitOnImplThread(CCLayerTreeHostImpl* hostImpl)
|
| m_commitNumber++;
|
| }
|
|
|
| +void CCLayerTreeHost::setShowFPSCounter(bool show)
|
| +{
|
| + m_showFPSCounter = show;
|
| + m_proxy->setShowFPSCounter(show);
|
| +}
|
| +
|
| void CCLayerTreeHost::setFontAtlas(scoped_ptr<CCFontAtlas> fontAtlas)
|
| {
|
| m_fontAtlas = fontAtlas.Pass();
|
| @@ -286,7 +293,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();
|
|
|
|
|