summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_picture_layer_tiling_client.cc
diff options
context:
space:
mode:
authorvmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-20 19:20:45 +0000
committervmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-20 19:20:45 +0000
commit762190afe1ba4257d3f5b39fd24b4e43f5ba9f3e (patch)
tree36cad72a82da0041b6fdf94d46ce6a781a3214d2 /cc/test/fake_picture_layer_tiling_client.cc
parentc29df3e9feb8309d1b12a133c66a49b416f167f1 (diff)
downloadchromium_src-762190afe1ba4257d3f5b39fd24b4e43f5ba9f3e.zip
chromium_src-762190afe1ba4257d3f5b39fd24b4e43f5ba9f3e.tar.gz
chromium_src-762190afe1ba4257d3f5b39fd24b4e43f5ba9f3e.tar.bz2
cc: Decouple tile manager from raster worker pool
In order to unittest tile manager, it would be nice if we can fake raster worker pool (and possibly other components) that tile manager currently creates in its constructor. This should be a small step towards making tile manager more testable. Review URL: https://chromiumcodereview.appspot.com/14803016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_picture_layer_tiling_client.cc')
-rw-r--r--cc/test/fake_picture_layer_tiling_client.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/cc/test/fake_picture_layer_tiling_client.cc b/cc/test/fake_picture_layer_tiling_client.cc
index 7c18d35..3a838dd 100644
--- a/cc/test/fake_picture_layer_tiling_client.cc
+++ b/cc/test/fake_picture_layer_tiling_client.cc
@@ -23,15 +23,14 @@ class FakeInfinitePicturePileImpl : public PicturePileImpl {
};
FakePictureLayerTilingClient::FakePictureLayerTilingClient()
- : tile_manager_(&tile_manager_client_,
- NULL,
- 1,
- false,
- &stats_instrumentation_),
+ : tile_manager_(TileManager::Create(&tile_manager_client_,
+ NULL,
+ 1,
+ false,
+ &stats_instrumentation_)),
pile_(new FakeInfinitePicturePileImpl()),
twin_tiling_(NULL),
- allow_create_tile_(true) {
-}
+ allow_create_tile_(true) {}
FakePictureLayerTilingClient::~FakePictureLayerTilingClient() {
}
@@ -41,7 +40,7 @@ scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile(
gfx::Rect rect) {
if (!allow_create_tile_)
return NULL;
- return new Tile(&tile_manager_,
+ return new Tile(tile_manager_.get(),
pile_.get(),
tile_size_,
rect,