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

Unified Diff: cc/resources/tile_manager.cc

Issue 12502016: cc: Add command line switch to control resource usage for impl-side painting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MRU eviction pattern Created 7 years, 9 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
« cc/resources/resource_pool.cc ('K') | « 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 10f9179032c1ddc420a91516ed4c4dbec8690889..386aaf8dc96cc30cde313e7f7fa976bf2e8a425f 100644
--- a/cc/resources/tile_manager.cc
+++ b/cc/resources/tile_manager.cc
@@ -922,8 +922,14 @@ void TileManager::OnRasterTaskCompleted(
void TileManager::DidFinishTileInitialization(Tile* tile) {
ManagedTileState& managed_state = tile->managed_state();
managed_state.drawing_info.resource_is_being_initialized_ = false;
+
if (tile->priority(ACTIVE_TREE).distance_to_visible_in_pixels == 0)
client_->DidInitializeVisibleTile();
+
+ // Reduce memory usage when no work is pending.
+ if (!HasPendingWorkScheduled(PENDING_TREE) &&
+ !HasPendingWorkScheduled(ACTIVE_TREE))
+ resource_pool_->ReduceMemoryUsage();
}
void TileManager::DidTileRasterStateChange(Tile* tile, TileRasterState state) {
« cc/resources/resource_pool.cc ('K') | « cc/resources/resource_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698