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

Unified Diff: cc/trees/layer_tree.cc

Issue 2484743002: UMA metric for LayerUpdateTimes (Closed)
Patch Set: UMA metric for LayerUpdateTimes and understand the impact of number of layers on it Created 4 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
Index: cc/trees/layer_tree.cc
diff --git a/cc/trees/layer_tree.cc b/cc/trees/layer_tree.cc
index 3d46e3fae10b4ccb39fac6c7b0116a0f9f1cd40c..38926f657107bad09e88664b53be24257d083c6c 100644
--- a/cc/trees/layer_tree.cc
+++ b/cc/trees/layer_tree.cc
@@ -264,6 +264,10 @@ Layer* LayerTree::LayerById(int id) const {
return iter != layer_id_map_.end() ? iter->second : nullptr;
}
+size_t LayerTree::NumLayers() const {
+ return layer_id_map_.size();
+}
+
bool LayerTree::UpdateLayers(const LayerList& update_layer_list,
bool* content_is_suitable_for_gpu) {
base::AutoReset<bool> painting(&in_paint_layer_contents_, true);

Powered by Google App Engine
This is Rietveld 408576698