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

Unified Diff: cc/tiles/picture_layer_tiling.cc

Issue 2612413003: Clean up tile deletion (Closed)
Patch Set: "Fix Tile* comparison in tests" Created 3 years, 11 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/tiles/picture_layer_tiling.h ('k') | cc/tiles/tile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/picture_layer_tiling.cc
diff --git a/cc/tiles/picture_layer_tiling.cc b/cc/tiles/picture_layer_tiling.cc
index d582cb86e8319599c2a480acd04325f8f8afbcae..8050a8bdc3d798495cd6f8fb9746689bd73660c3 100644
--- a/cc/tiles/picture_layer_tiling.cc
+++ b/cc/tiles/picture_layer_tiling.cc
@@ -90,7 +90,7 @@ Tile* PictureLayerTiling::CreateTile(const Tile::CreateInfo& info) {
return nullptr;
all_tiles_done_ = false;
- ScopedTilePtr tile = client_->CreateTile(info);
+ std::unique_ptr<Tile> tile = client_->CreateTile(info);
Tile* raw_ptr = tile.get();
tiles_[key] = std::move(tile);
return raw_ptr;
@@ -306,7 +306,7 @@ void PictureLayerTiling::RemoveTilesInRegion(const Region& layer_invalidation,
// TODO(danakj): This old_tile will not exist if we are committing to a
// pending tree since there is no tile there to remove, which prevents
// tiles from knowing the invalidation rect and content id. crbug.com/490847
- ScopedTilePtr old_tile = TakeTileAt(key.index_x, key.index_y);
+ std::unique_ptr<Tile> old_tile = TakeTileAt(key.index_x, key.index_y);
if (recreate_tiles && old_tile) {
Tile::CreateInfo info = CreateInfoForTile(key.index_x, key.index_y);
if (Tile* tile = CreateTile(info))
@@ -565,11 +565,11 @@ gfx::RectF PictureLayerTiling::CoverageIterator::texture_rect() const {
return texture_rect;
}
-ScopedTilePtr PictureLayerTiling::TakeTileAt(int i, int j) {
+std::unique_ptr<Tile> PictureLayerTiling::TakeTileAt(int i, int j) {
TileMap::iterator found = tiles_.find(TileMapKey(i, j));
if (found == tiles_.end())
return nullptr;
- ScopedTilePtr result = std::move(found->second);
+ std::unique_ptr<Tile> result = std::move(found->second);
tiles_.erase(found);
return result;
}
« no previous file with comments | « cc/tiles/picture_layer_tiling.h ('k') | cc/tiles/tile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698