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

Unified Diff: cc/heads_up_display_layer_impl.cc

Issue 11189037: toggle FPS counter in compositor (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 166046 Created 8 years, 1 month 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
« no previous file with comments | « cc/heads_up_display_layer_impl.h ('k') | cc/layer_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/heads_up_display_layer_impl.cc
diff --git a/cc/heads_up_display_layer_impl.cc b/cc/heads_up_display_layer_impl.cc
index 4444c9b0306ce2317fd395bc429954b8efc8e3fa..1c0c5fec66d83b407e486e4ce0c6abb4207bba07 100644
--- a/cc/heads_up_display_layer_impl.cc
+++ b/cc/heads_up_display_layer_impl.cc
@@ -46,6 +46,7 @@ HeadsUpDisplayLayerImpl::HeadsUpDisplayLayerImpl(int id)
: LayerImpl(id)
, m_averageFPS(0)
, m_stdDeviation(0)
+ , m_showFPSCounter(false)
{
}
@@ -58,6 +59,11 @@ void HeadsUpDisplayLayerImpl::setFontAtlas(scoped_ptr<FontAtlas> fontAtlas)
m_fontAtlas = fontAtlas.Pass();
}
+void HeadsUpDisplayLayerImpl::setShowFPSCounter(bool show)
+{
+ m_showFPSCounter = show;
+}
+
void HeadsUpDisplayLayerImpl::willDraw(ResourceProvider* resourceProvider)
{
LayerImpl::willDraw(resourceProvider);
@@ -148,7 +154,7 @@ void HeadsUpDisplayLayerImpl::drawHudContents(SkCanvas* canvas)
int platformLayerTreeTop = 0;
- if (settings.showFPSCounter)
+ if (m_showFPSCounter)
platformLayerTreeTop = drawFPSCounter(canvas, layerTreeHostImpl()->fpsCounter());
if (settings.showPlatformLayerTree && m_fontAtlas.get()) {
« no previous file with comments | « cc/heads_up_display_layer_impl.h ('k') | cc/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698