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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1906523002: cc: Add UMA histogram for the number of render surfaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments Created 4 years, 8 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
« no previous file with comments | « no previous file | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 5bfb96ab4261a7a34b372078d5e78b583056821b..4f2f1e429c6cde3cb8ab2294d439a1aca74f5138 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1054,10 +1054,6 @@ DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) {
if (input_handler_client_)
input_handler_client_->ReconcileElasticOverscrollAndRootScroll();
- UMA_HISTOGRAM_CUSTOM_COUNTS(
- "Compositing.NumActiveLayers",
- base::saturated_cast<int>(active_tree_->NumLayers()), 1, 400, 20);
-
if (const char* client_name = GetClientNameForMetrics()) {
size_t total_picture_memory = 0;
for (const PictureLayerImpl* layer : active_tree()->picture_layers())
@@ -1070,6 +1066,11 @@ DrawResult LayerTreeHostImpl::PrepareToDraw(FrameData* frame) {
client_name),
base::saturated_cast<int>(total_picture_memory / 1024));
}
+ // GetClientNameForMetrics only returns one non-null value over the lifetime
+ // of the process, so this histogram name is runtime constant.
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ base::StringPrintf("Compositing.%s.NumActiveLayers", client_name),
+ base::saturated_cast<int>(active_tree_->NumLayers()), 1, 400, 20);
}
bool update_lcd_text = false;
« no previous file with comments | « no previous file | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698