diff options
author | vmpstr <vmpstr@chromium.org> | 2014-08-26 11:51:52 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-26 18:59:35 +0000 |
commit | 7fceb77977afd9af22215eb9cd28ab667567668e (patch) | |
tree | aa487b33e9a6b81dd5d2c5c2b0287eef5bf4278e /cc/test/fake_picture_layer_tiling_client.cc | |
parent | aa7e9b61d69dfa8e0a1557d900037bfb8b1e6e78 (diff) | |
download | chromium_src-7fceb77977afd9af22215eb9cd28ab667567668e.zip chromium_src-7fceb77977afd9af22215eb9cd28ab667567668e.tar.gz chromium_src-7fceb77977afd9af22215eb9cd28ab667567668e.tar.bz2 |
cc: Remove tiles from recycle tree that were deleted on active.
This patch removes tiles from the recycle tree that were deleted from
the active tree as a result of a shifting live tiles rect. It is
important to do this, since if the active tree then would recreate
the deleted tile (ie, live tiles rect shift back), we have to ensure
that this tile will be shared when the next pending tree is created.
If we don't do it, we can run into a situation in which we will
continuously raster the same tile.
The patch does the following:
- Adds a way to get a recycled tree twin tiling.
- During LiveTilesRect tile deletion, deletes tiles from the same
location from the recycle twin (if one exists).
R=danakj, enne
Review URL: https://codereview.chromium.org/502453003
Cr-Commit-Position: refs/heads/master@{#291949}
Diffstat (limited to 'cc/test/fake_picture_layer_tiling_client.cc')
-rw-r--r-- | cc/test/fake_picture_layer_tiling_client.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/cc/test/fake_picture_layer_tiling_client.cc b/cc/test/fake_picture_layer_tiling_client.cc index 2bd756d..0503d22a 100644 --- a/cc/test/fake_picture_layer_tiling_client.cc +++ b/cc/test/fake_picture_layer_tiling_client.cc @@ -15,10 +15,12 @@ FakePictureLayerTilingClient::FakePictureLayerTilingClient() : tile_manager_(new FakeTileManager(&tile_manager_client_)), pile_(FakePicturePileImpl::CreateInfiniteFilledPile()), twin_tiling_(NULL), + recycled_twin_tiling_(NULL), allow_create_tile_(true), max_tiles_for_interest_area_(10000), skewport_target_time_in_seconds_(1.0f), - skewport_extrapolation_limit_in_content_pixels_(2000) {} + skewport_extrapolation_limit_in_content_pixels_(2000) { +} FakePictureLayerTilingClient::FakePictureLayerTilingClient( ResourceProvider* resource_provider) @@ -28,9 +30,11 @@ FakePictureLayerTilingClient::FakePictureLayerTilingClient( new FakeTileManager(&tile_manager_client_, resource_pool_.get())), pile_(FakePicturePileImpl::CreateInfiniteFilledPile()), twin_tiling_(NULL), + recycled_twin_tiling_(NULL), allow_create_tile_(true), max_tiles_for_interest_area_(10000), - skewport_target_time_in_seconds_(1.0f) {} + skewport_target_time_in_seconds_(1.0f) { +} FakePictureLayerTilingClient::~FakePictureLayerTilingClient() { } @@ -79,6 +83,11 @@ const PictureLayerTiling* FakePictureLayerTilingClient::GetTwinTiling( return twin_tiling_; } +PictureLayerTiling* FakePictureLayerTilingClient::GetRecycledTwinTiling( + const PictureLayerTiling* tiling) { + return recycled_twin_tiling_; +} + WhichTree FakePictureLayerTilingClient::GetTree() const { return tree_; } |