From 762190afe1ba4257d3f5b39fd24b4e43f5ba9f3e Mon Sep 17 00:00:00 2001 From: "vmpstr@chromium.org" Date: Mon, 20 May 2013 19:20:45 +0000 Subject: 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 --- cc/test/fake_picture_layer_tiling_client.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'cc/test/fake_picture_layer_tiling_client.cc') 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 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, -- cgit v1.1