summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_layer_tree_host_impl.cc
diff options
context:
space:
mode:
authoregraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-21 16:38:43 +0000
committeregraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-21 16:38:43 +0000
commit372bad5f74bce22b5a09ecba66744079e64dc477 (patch)
tree28131cc00e2a26dd6c906448803f67b271bfaed6 /cc/test/fake_layer_tree_host_impl.cc
parentd4062c83ab5f22fad6a3ffc3f1945373106bf517 (diff)
downloadchromium_src-372bad5f74bce22b5a09ecba66744079e64dc477.zip
chromium_src-372bad5f74bce22b5a09ecba66744079e64dc477.tar.gz
chromium_src-372bad5f74bce22b5a09ecba66744079e64dc477.tar.bz2
cc:: Add RenderingStatsInstrumentation to manage collection of RenderingStats
This change adds the class RenderingStatsInstrumentation that manages conditional saving and thread-specific access to a private RenderingStats instance. An instance of RenderingStatsRecorder is created on LayerTreeHost, which passes references to LayerTreeHostImpl and TileManager. Access to reading and writing on the internal RenderingStats instance is guarded by a lock. All rendering stats saving in LayerTreeHost, Single-/ThreadProxy, LayerTreeHostImpl and TileManager has been switched to use the RenderingStatsInstrumentation. Stats collection within Layer::update() still follows the original structure to keep this change small. BUG=181319 NOTRY=true Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=189475 Review URL: https://chromiumcodereview.appspot.com/12519006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_layer_tree_host_impl.cc')
-rw-r--r--cc/test/fake_layer_tree_host_impl.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/cc/test/fake_layer_tree_host_impl.cc b/cc/test/fake_layer_tree_host_impl.cc
index 334ff9f..f393f1d 100644
--- a/cc/test/fake_layer_tree_host_impl.cc
+++ b/cc/test/fake_layer_tree_host_impl.cc
@@ -7,7 +7,11 @@
namespace cc {
FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(Proxy* proxy)
- : LayerTreeHostImpl(LayerTreeSettings(), &client_, proxy) {
+ : LayerTreeHostImpl(LayerTreeSettings(),
+ &client_,
+ proxy,
+ &stats_instrumentation_)
+{
// Explicitly clear all debug settings.
SetDebugState(LayerTreeDebugState());
}
@@ -15,7 +19,11 @@ FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(Proxy* proxy)
FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(
const LayerTreeSettings& settings,
Proxy* proxy)
- : LayerTreeHostImpl(settings, &client_, proxy) {
+ : LayerTreeHostImpl(settings,
+ &client_,
+ proxy,
+ &stats_instrumentation_)
+{
// Explicitly clear all debug settings.
SetDebugState(LayerTreeDebugState());
}