summaryrefslogtreecommitdiffstats
path: root/cc/test
diff options
context:
space:
mode:
Diffstat (limited to 'cc/test')
-rw-r--r--cc/test/fake_layer_tree_host_impl.cc14
-rw-r--r--cc/test/fake_layer_tree_host_impl.h1
-rw-r--r--cc/test/fake_picture_layer_tiling_client.cc9
-rw-r--r--cc/test/fake_picture_layer_tiling_client.h1
-rw-r--r--cc/test/fake_proxy.h1
-rw-r--r--cc/test/layer_tree_test.cc31
6 files changed, 42 insertions, 15 deletions
diff --git a/cc/test/fake_layer_tree_host_impl.cc b/cc/test/fake_layer_tree_host_impl.cc
index 334ff9f..c1c3ddf 100644
--- a/cc/test/fake_layer_tree_host_impl.cc
+++ b/cc/test/fake_layer_tree_host_impl.cc
@@ -7,7 +7,12 @@
namespace cc {
FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(Proxy* proxy)
- : LayerTreeHostImpl(LayerTreeSettings(), &client_, proxy) {
+ : rendering_stats_instrumentation_(RenderingStatsInstrumentation::Create()),
+ LayerTreeHostImpl(LayerTreeSettings(),
+ &client_,
+ proxy,
+ rendering_stats_instrumentation_.get())
+{
// Explicitly clear all debug settings.
SetDebugState(LayerTreeDebugState());
}
@@ -15,7 +20,12 @@ FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(Proxy* proxy)
FakeLayerTreeHostImpl::FakeLayerTreeHostImpl(
const LayerTreeSettings& settings,
Proxy* proxy)
- : LayerTreeHostImpl(settings, &client_, proxy) {
+ : rendering_stats_instrumentation_(RenderingStatsInstrumentation::Create()),
+ LayerTreeHostImpl(settings,
+ &client_,
+ proxy,
+ rendering_stats_instrumentation_.get())
+{
// Explicitly clear all debug settings.
SetDebugState(LayerTreeDebugState());
}
diff --git a/cc/test/fake_layer_tree_host_impl.h b/cc/test/fake_layer_tree_host_impl.h
index 2023411..08b3874 100644
--- a/cc/test/fake_layer_tree_host_impl.h
+++ b/cc/test/fake_layer_tree_host_impl.h
@@ -26,6 +26,7 @@ class FakeLayerTreeHostImpl : public LayerTreeHostImpl {
using LayerTreeHostImpl::ActivatePendingTree;
private:
+ scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation_;
FakeLayerTreeHostImplClient client_;
};
diff --git a/cc/test/fake_picture_layer_tiling_client.cc b/cc/test/fake_picture_layer_tiling_client.cc
index 45c2640..1432aa4 100644
--- a/cc/test/fake_picture_layer_tiling_client.cc
+++ b/cc/test/fake_picture_layer_tiling_client.cc
@@ -20,7 +20,14 @@ class FakeInfinitePicturePileImpl : public PicturePileImpl {
};
FakePictureLayerTilingClient::FakePictureLayerTilingClient()
- : tile_manager_(&tile_manager_client_, NULL, 1, false, false, false),
+ : rendering_stats_instrumentation_(RenderingStatsInstrumentation::Create()),
+ tile_manager_(&tile_manager_client_,
+ NULL,
+ 1,
+ false,
+ false,
+ false,
+ rendering_stats_instrumentation_.get()),
pile_(new FakeInfinitePicturePileImpl()) {
}
diff --git a/cc/test/fake_picture_layer_tiling_client.h b/cc/test/fake_picture_layer_tiling_client.h
index 9f2e77d..25b653f 100644
--- a/cc/test/fake_picture_layer_tiling_client.h
+++ b/cc/test/fake_picture_layer_tiling_client.h
@@ -31,6 +31,7 @@ class FakePictureLayerTilingClient : public PictureLayerTilingClient {
gfx::Size TileSize() const { return tile_size_; }
protected:
+ scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation_;
FakeTileManagerClient tile_manager_client_;
TileManager tile_manager_;
scoped_refptr<PicturePileImpl> pile_;
diff --git a/cc/test/fake_proxy.h b/cc/test/fake_proxy.h
index 3b84723..3be3f46 100644
--- a/cc/test/fake_proxy.h
+++ b/cc/test/fake_proxy.h
@@ -28,7 +28,6 @@ class FakeProxy : public Proxy {
virtual void SetVisible(bool visible) OVERRIDE {}
virtual bool InitializeRenderer() OVERRIDE;
virtual bool RecreateOutputSurface() OVERRIDE;
- virtual void CollectRenderingStats(RenderingStats* stats) OVERRIDE {}
virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE;
virtual void SetNeedsAnimate() OVERRIDE {}
virtual void SetNeedsCommit() OVERRIDE {}
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index de550c6..e2782a5 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -69,19 +69,27 @@ class LayerTreeHostImplForTesting : public LayerTreeHostImpl {
TestHooks* test_hooks,
const LayerTreeSettings& settings,
LayerTreeHostImplClient* host_impl_client,
- Proxy* proxy) {
- return make_scoped_ptr(new LayerTreeHostImplForTesting(test_hooks,
- settings,
- host_impl_client,
- proxy));
+ Proxy* proxy,
+ RenderingStatsInstrumentation* stats_instrumentation) {
+ return make_scoped_ptr(
+ new LayerTreeHostImplForTesting(test_hooks,
+ settings,
+ host_impl_client,
+ proxy,
+ stats_instrumentation));
}
protected:
- LayerTreeHostImplForTesting(TestHooks* test_hooks,
- const LayerTreeSettings& settings,
- LayerTreeHostImplClient* host_impl_client,
- Proxy* proxy)
- : LayerTreeHostImpl(settings, host_impl_client, proxy),
+ LayerTreeHostImplForTesting(
+ TestHooks* test_hooks,
+ const LayerTreeSettings& settings,
+ LayerTreeHostImplClient* host_impl_client,
+ Proxy* proxy,
+ RenderingStatsInstrumentation* stats_instrumentation)
+ : LayerTreeHostImpl(settings,
+ host_impl_client,
+ proxy,
+ stats_instrumentation),
test_hooks_(test_hooks) {}
virtual void BeginCommit() OVERRIDE {
@@ -191,7 +199,8 @@ class LayerTreeHostForTesting : public cc::LayerTreeHost {
test_hooks_,
settings(),
host_impl_client,
- proxy()).PassAs<cc::LayerTreeHostImpl>();
+ proxy(),
+ rendering_stats_instrumentation()).PassAs<cc::LayerTreeHostImpl>();
}
virtual void SetNeedsCommit() OVERRIDE {