Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Unified Diff: cc/resources/picture_layer_tiling.cc

Issue 397303003: cc: Remove invalidated recycle tree tiles on activation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling.cc
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index 3076489afa00049a33c0b7804b502ff0775249b7..ac10c8faa7355e1ee06736b06e4ac1c8b0f29fe6 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -168,7 +168,18 @@ void PictureLayerTiling::UpdateTilesToCurrentPile(
it->second->set_picture_pile(pile);
}
+void PictureLayerTiling::RemoveTilesInRegion(const Region& layer_region) {
+ bool recreate_invalidated_tiles = false;
+ DoInvalidate(layer_region, recreate_invalidated_tiles);
+}
+
void PictureLayerTiling::Invalidate(const Region& layer_region) {
+ bool recreate_invalidated_tiles = true;
+ DoInvalidate(layer_region, recreate_invalidated_tiles);
+}
+
+void PictureLayerTiling::DoInvalidate(const Region& layer_region,
+ bool recreate_invalidated_tiles) {
std::vector<TileMapKey> new_tile_keys;
gfx::Rect expanded_live_tiles_rect =
tiling_data_.ExpandRectIgnoringBordersToTileBoundsWithBorders(
@@ -196,14 +207,11 @@ void PictureLayerTiling::Invalidate(const Region& layer_region) {
}
}
- if (!new_tile_keys.empty()) {
- const PictureLayerTiling* twin_tiling = client_->GetTwinTiling(this);
+ if (recreate_invalidated_tiles && !new_tile_keys.empty()) {
for (size_t i = 0; i < new_tile_keys.size(); ++i) {
// Don't try to share a tile with the twin layer, it's been invalidated so
// we have to make our own tile here.
- // TODO(danakj): Because we have two frames of invalidation during sync
- // this isn't always true. When sync is gone we can do this again.
- // PictureLayerTiling* twin_tiling = NULL;
+ const PictureLayerTiling* twin_tiling = NULL;
CreateTile(new_tile_keys[i].first, new_tile_keys[i].second, twin_tiling);
}
}
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698