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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 375093002: Initial attempt at counting layers in the compositor thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add UMA for number of layers in a compositor frame 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 | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 09449dd64ccede6c578b5f6d0c33b6b640ec4742..b2520339a4a1468b71970eb0ec37172b860bd93a 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -464,6 +464,9 @@ class CC_EXPORT LayerTreeHostImpl
void RegisterPictureLayerImpl(PictureLayerImpl* layer);
void UnregisterPictureLayerImpl(PictureLayerImpl* layer);
+ // Public only for for unit testing
danakj 2014/07/10 18:03:41 comments are full sentences with periods
+ size_t num_layers_for_testing() { return num_layers_; }
+
protected:
LayerTreeHostImpl(
const LayerTreeSettings& settings,
@@ -696,6 +699,11 @@ class CC_EXPORT LayerTreeHostImpl
std::vector<PictureLayerImpl*> picture_layers_;
+ // The number of layers on the most recent frame,
+ // whether or not they were drawn.
+ // Default value is 0.
+ size_t num_layers_;
dneto 2014/07/10 01:29:03 Not sure if size_t is appropriate here, or overkil
Ian Vollick 2014/07/10 03:16:23 I agree that this is overkill, but there's no harm
danakj 2014/07/10 18:03:41 "unsigned" is generally banned. You'd use an int o
dneto 2014/07/10 18:44:16 Acknowledged.
dneto 2014/07/10 18:44:17 Acknowledged.
+
DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
};
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.cc » ('j') | cc/trees/layer_tree_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698