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

Unified Diff: cc/raster/staging_buffer_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 | « no previous file | cc/resources/resource_pool.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/raster/staging_buffer_pool.cc
diff --git a/cc/raster/staging_buffer_pool.cc b/cc/raster/staging_buffer_pool.cc
index f55fd118fb87f4bb213398b5c4fe40be2ad1b286..8fec64c8370da83bb2e7b285cd71c3a7ab28b0c7 100644
--- a/cc/raster/staging_buffer_pool.cc
+++ b/cc/raster/staging_buffer_pool.cc
@@ -426,8 +426,8 @@ void StagingBufferPool::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 buffers, regardless of how recently they were used.
+ ReleaseBuffersNotUsedSince(base::TimeTicks() + base::TimeDelta::Max());
break;
case base::MemoryState::UNKNOWN:
// NOT_REACHED.
« no previous file with comments | « no previous file | cc/resources/resource_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698