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

Unified Diff: cc/tiles/tile_manager.cc

Issue 1293873005: Expire resources in ResourcePool after non-use (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@re-use
Patch Set: Fix unit test Created 5 years, 4 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/test/layer_tree_pixel_resource_test.cc ('k') | cc/tiles/tile_manager_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_manager.cc
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
index 50787143e34e904364069b000a121e53adc28e01..dfb12c248c92e226910831428cf90d023ebc8adf 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -300,9 +300,8 @@ void TileManager::DidFinishRunningTileTasks(TaskSet task_set) {
case ALL: {
has_scheduled_tile_tasks_ = false;
- bool memory_usage_above_limit =
- resource_pool_->total_memory_usage_bytes() >
- global_state_.soft_memory_limit_in_bytes;
+ bool memory_usage_above_limit = resource_pool_->memory_usage_bytes() >
+ global_state_.soft_memory_limit_in_bytes;
if (all_tiles_that_need_to_be_rasterized_are_scheduled_ &&
!memory_usage_above_limit) {
@@ -376,10 +375,6 @@ bool TileManager::PrepareTiles(
TRACE_EVENT_INSTANT1("cc", "DidPrepareTiles", TRACE_EVENT_SCOPE_THREAD,
"state", BasicStateAsValue());
-
- TRACE_COUNTER_ID1("cc", "unused_memory_bytes", this,
- resource_pool_->total_memory_usage_bytes() -
- resource_pool_->acquired_memory_usage_bytes());
return true;
}
@@ -506,8 +501,8 @@ void TileManager::AssignGpuMemoryToTiles(
global_state_.num_resources_limit);
MemoryUsage soft_memory_limit(global_state_.soft_memory_limit_in_bytes,
global_state_.num_resources_limit);
- MemoryUsage memory_usage(resource_pool_->acquired_memory_usage_bytes(),
- resource_pool_->acquired_resource_count());
+ MemoryUsage memory_usage(resource_pool_->memory_usage_bytes(),
+ resource_pool_->resource_count());
scoped_ptr<EvictionTilePriorityQueue> eviction_priority_queue;
for (; !raster_priority_queue->IsEmpty(); raster_priority_queue->Pop()) {
« no previous file with comments | « cc/test/layer_tree_pixel_resource_test.cc ('k') | cc/tiles/tile_manager_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698