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

Unified Diff: cc/resources/resource_pool.cc

Issue 2367953002: Implement OnMemoryStateChange for Various CC Classes (Closed)
Patch Set: feedback Created 4 years, 3 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/resources/resource_pool.h ('k') | cc/resources/resource_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_pool.cc
diff --git a/cc/resources/resource_pool.cc b/cc/resources/resource_pool.cc
index 5e6e426871cf63229841e7e75d4b94f731a39033..da33b11a96f4f44a02b7813c268972e78ff5b70b 100644
--- a/cc/resources/resource_pool.cc
+++ b/cc/resources/resource_pool.cc
@@ -469,8 +469,8 @@ void ResourcePool::OnMemoryStateChange(base::MemoryState state) {
// save memory usage.
break;
case base::MemoryState::SUSPENDED:
- // TODO(tasak): free this component's caches as much as possible before
- // suspending renderer.
+ // Release all resources, regardless of how recently they were used.
+ EvictResourcesNotUsedSince(base::TimeTicks() + base::TimeDelta::Max());
break;
case base::MemoryState::UNKNOWN:
// NOT_REACHED.
« no previous file with comments | « cc/resources/resource_pool.h ('k') | cc/resources/resource_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698