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

Unified Diff: cc/resources/picture_layer_tiling.cc

Issue 17891002: cc: Reset tile priority before deleting tiling. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 7 years, 6 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/test/fake_picture_layer_tiling_client.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 40ac4d55a03228d7c55d42ae793479757e9209a4..b11e4569e2ec4097525708e50d86cc128e4740e2 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -49,6 +49,8 @@ PictureLayerTiling::PictureLayerTiling(float contents_scale,
}
PictureLayerTiling::~PictureLayerTiling() {
+ for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
+ client_->DestroyTile(it->second);
}
void PictureLayerTiling::SetClient(PictureLayerTilingClient* client) {
@@ -267,6 +269,8 @@ gfx::Size PictureLayerTiling::CoverageIterator::texture_size() const {
void PictureLayerTiling::Reset() {
live_tiles_rect_ = gfx::Rect();
+ for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
+ client_->DestroyTile(it->second);
tiles_.clear();
}
@@ -438,6 +442,7 @@ void PictureLayerTiling::SetLiveTilesRect(
// though it was in the live rect.
if (found == tiles_.end())
continue;
+ client_->DestroyTile(found->second);
tiles_.erase(found);
}
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/test/fake_picture_layer_tiling_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698