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

Unified Diff: cc/resources/prioritized_resource_manager.cc

Issue 22469002: cc: Fix aborted commits with evicted textures (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unneeded scrolling from test Created 7 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 | « no previous file | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/prioritized_resource_manager.cc
diff --git a/cc/resources/prioritized_resource_manager.cc b/cc/resources/prioritized_resource_manager.cc
index 591764b0c1596450fc49d6879891bd68040f2ca1..81188851901c893fdfae0fa73ae9ff0ccb1a0b94 100644
--- a/cc/resources/prioritized_resource_manager.cc
+++ b/cc/resources/prioritized_resource_manager.cc
@@ -290,6 +290,7 @@ bool PrioritizedResourceManager::EvictBackingsToReduceMemory(
// Destroy backings until we are below the limit,
// or until all backings remaining are above the cutoff.
+ bool evicted_anything = false;
while (backings_.size() > 0) {
PrioritizedResource::Backing* backing = backings_.front();
if (MemoryUseBytes() <= limit_bytes &&
@@ -302,8 +303,9 @@ bool PrioritizedResourceManager::EvictBackingsToReduceMemory(
if (unlink_policy == UNLINK_BACKINGS && backing->owner())
backing->owner()->Unlink();
EvictFirstBackingResource(resource_provider);
+ evicted_anything = true;
}
- return true;
+ return evicted_anything;
}
void PrioritizedResourceManager::ReduceWastedMemory(
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698