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

Unified Diff: cc/resources/picture_layer_tiling.cc

Issue 18581004: cc: Remove tile ref counting in tile manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ut compile fix Created 7 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/tile.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 c9bc7b3eeb03ac5dde978d3940b75b8c49066ac7..f4433a5efc0ff854ee5e49f8ba8715c6f04da5e5 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -49,8 +49,6 @@ PictureLayerTiling::PictureLayerTiling(float contents_scale,
}
PictureLayerTiling::~PictureLayerTiling() {
- for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it)
- client_->DestroyTile(it->second.get());
}
void PictureLayerTiling::SetClient(PictureLayerTilingClient* client) {
@@ -337,8 +335,6 @@ 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.get());
tiles_.clear();
}
@@ -508,10 +504,8 @@ void PictureLayerTiling::SetLiveTilesRect(
TileMap::iterator found = tiles_.find(key);
// If the tile was outside of the recorded region, it won't exist even
// though it was in the live rect.
- if (found == tiles_.end())
- continue;
- client_->DestroyTile(found->second.get());
- tiles_.erase(found);
+ if (found != tiles_.end())
+ tiles_.erase(found);
}
const PictureLayerTiling* twin_tiling = client_->GetTwinTiling(this);
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/tile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698