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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 375093002: Initial attempt at counting layers in the compositor thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comment in histograms.xml to say the stat is collected once per frame, before the frame is d… Created 6 years, 5 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 | « cc/trees/layer_tree_impl.h ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 908e993d3ba845fcc3673c3538464f88f73a038a..bf0a99630d1a982253bd76b98c0b044c2f876973 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -561,6 +561,10 @@ void LayerTreeImpl::UnregisterLayer(LayerImpl* layer) {
layer_id_map_.erase(layer->id());
}
+size_t LayerTreeImpl::NumLayers() {
+ return layer_id_map_.size();
+}
+
void LayerTreeImpl::PushPersistedState(LayerTreeImpl* pending_tree) {
pending_tree->SetCurrentlyScrollingLayer(
LayerTreeHostCommon::FindLayerInSubtree(pending_tree->root_layer(),
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698