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

Unified Diff: cc/picture_layer_tiling.cc

Issue 11953005: cc: Update picture pile on tiles to prevent memory leak (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/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/picture_layer_tiling.cc
diff --git a/cc/picture_layer_tiling.cc b/cc/picture_layer_tiling.cc
index 1b2668c00d1a6601a5b9e4e99a4fe638492f6712..ff3afcba938d97dfaef10eb76e30ada2d77663e2 100644
--- a/cc/picture_layer_tiling.cc
+++ b/cc/picture_layer_tiling.cc
@@ -321,6 +321,13 @@ void PictureLayerTiling::MoveTilePriorities(WhichTree src_tree,
for (TileMap::const_iterator it = tiles_.begin(); it != tiles_.end(); ++it) {
it->second->set_priority(dst_tree, it->second->priority(src_tree));
it->second->set_priority(src_tree, TilePriority());
+ // Tile holds a ref onto a picture pile. If the tile never gets invalidated
+ // and recreated, then that picture pile ref could exist indefinitely. To
+ // prevent this, ask the client to update the pile to its own ref. This
+ // will cause PicturePileImpls and their clones to get deleted once the
+ // corresponding PictureLayerImpl and any in flight raster jobs go out of
+ // scope.
+ client_->UpdatePile(it->second);
}
}
« no previous file with comments | « cc/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