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

Unified Diff: cc/resources/tile_manager.cc

Issue 43753002: cc: Keep track of busy resources in ResourcePool (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc: Keep track of busy resources in ResourcePool Created 7 years, 1 month 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/resource_pool.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/tile_manager.cc
diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
index df69f700be727934fb2d017a5a81f72d0d4744e9..6621b6fbc16f400bd48360f6ecb75bce2e908a41 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -595,6 +595,13 @@ void TileManager::AssignGpuMemoryToTiles(
TileVector* tiles_that_need_to_be_rasterized) {
TRACE_EVENT0("cc", "TileManager::AssignGpuMemoryToTiles");
+ // Maintain the list of released resources that can potentially be re-used
+ // or deleted.
+ // If this operation becomes expensive too, only do this after some
+ // resource(s) was returned. Note that in that case, one also need to
+ // invalidate when releasing some resource from the pool.
+ resource_pool_->CheckBusyResources();
+
// Now give memory out to the tiles until we're out, and build
// the needs-to-be-rasterized queue.
all_tiles_that_need_to_be_rasterized_have_memory_ = true;
« no previous file with comments | « cc/resources/resource_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698