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

Unified Diff: webkit/compositor_bindings/web_layer_tree_view_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 | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/compositor_bindings/web_layer_tree_view_impl.cc
diff --git a/webkit/compositor_bindings/web_layer_tree_view_impl.cc b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
index 02aa48b76291c603bff929dafa82b2ad8ef6c32a..731001f26567937ee6bd0c305c295a7259c5e7a7 100644
--- a/webkit/compositor_bindings/web_layer_tree_view_impl.cc
+++ b/webkit/compositor_bindings/web_layer_tree_view_impl.cc
@@ -45,7 +45,6 @@ bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSetti
{
LayerTreeSettings settings;
settings.acceleratePainting = webSettings.acceleratePainting;
- settings.showFPSCounter = webSettings.showFPSCounter;
settings.showPlatformLayerTree = webSettings.showPlatformLayerTree;
settings.showPaintRects = webSettings.showPaintRects;
settings.renderVSyncEnabled = webSettings.renderVSyncEnabled;
@@ -55,6 +54,9 @@ bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSetti
m_layerTreeHost = LayerTreeHost::create(this, settings);
if (!m_layerTreeHost.get())
return false;
+
+ if (webSettings.showFPSCounter)
+ setShowFPSCounter(true);
return true;
}
@@ -192,6 +194,11 @@ void WebLayerTreeViewImpl::renderingStats(WebRenderingStats& stats) const
stats.numMainThreadScrolls = ccStats.numMainThreadScrolls;
}
+void WebLayerTreeViewImpl::setShowFPSCounter(bool show)
+{
+ m_layerTreeHost->setShowFPSCounter(show);
+}
+
void WebLayerTreeViewImpl::setFontAtlas(SkBitmap bitmap, WebRect asciiToWebRectTable[128], int fontHeight) {
setFontAtlas(asciiToWebRectTable, bitmap, fontHeight);
}
« no previous file with comments | « webkit/compositor_bindings/web_layer_tree_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698