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-09-26 08:09:01 +0000
committervmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-26 08:09:01 +0000
commit92602aa45b86f34edd94d298967f4c33a39582f5 (patch)
treeecfb11b7e35c23630b30f8b6869f3ab1850859f0 /cc/test/fake_picture_layer_tiling_client.cc
parentcf4b78e7abf2a74a093cd1c4b4cabed55d1f6f90 (diff)
downloadchromium_src-92602aa45b86f34edd94d298967f4c33a39582f5.zip
chromium_src-92602aa45b86f34edd94d298967f4c33a39582f5.tar.gz
chromium_src-92602aa45b86f34edd94d298967f4c33a39582f5.tar.bz2
cc: Make tile manager responsible for tile's lifetime.
This patch is somewhat proof-of-concept to make ManageTiles be the only spot where tiles can be deleted. This allows all function calls between two ManageTiles calls to assume that the state has not changed. BUG= Review URL: https://codereview.chromium.org/24331009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@225389 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.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/cc/test/fake_picture_layer_tiling_client.cc b/cc/test/fake_picture_layer_tiling_client.cc
index 4127b01..2117618 100644
--- a/cc/test/fake_picture_layer_tiling_client.cc
+++ b/cc/test/fake_picture_layer_tiling_client.cc
@@ -36,16 +36,9 @@ scoped_refptr<Tile> FakePictureLayerTilingClient::CreateTile(
PictureLayerTiling*,
gfx::Rect rect) {
if (!allow_create_tile_)
- return NULL;
- return new Tile(tile_manager_.get(),
- pile_.get(),
- tile_size_,
- rect,
- gfx::Rect(),
- 1,
- 0,
- 0,
- true);
+ return scoped_refptr<Tile>();
+ return tile_manager_->CreateTile(
+ pile_.get(), tile_size_, rect, gfx::Rect(), 1, 0, 0, true);
}
void FakePictureLayerTilingClient::SetTileSize(gfx::Size tile_size) {