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

Unified Diff: cc/resources/eviction_tile_priority_queue.cc

Issue 736753002: cc: Implement geometry-based tile eviction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years 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
Index: cc/resources/eviction_tile_priority_queue.cc
diff --git a/cc/resources/eviction_tile_priority_queue.cc b/cc/resources/eviction_tile_priority_queue.cc
index 4d6698745897caaa320a0584b2e8a4bae120ccac..cd681ef1455c5413cc70ccec013ecbcd5bc7ba98 100644
--- a/cc/resources/eviction_tile_priority_queue.cc
+++ b/cc/resources/eviction_tile_priority_queue.cc
@@ -200,6 +200,8 @@ EvictionTilePriorityQueue::PairedTilingSetQueue::NextTileIteratorTree(
const Tile* active_tile = active_queue->Top();
const Tile* pending_tile = pending_queue->Top();
+
+ // If tiles are the same, it doesn't matter which tree we return.
if (active_tile == pending_tile)
return ACTIVE_TREE;
@@ -208,6 +210,15 @@ EvictionTilePriorityQueue::PairedTilingSetQueue::NextTileIteratorTree(
const TilePriority& pending_priority =
pending_tile->priority_for_tree_priority(tree_priority);
+ // If the bins are the same and activation differs, then return the tree of
+ // the tile not required for activation.
+ if (active_priority.priority_bin == pending_priority.priority_bin &&
+ active_tile->required_for_activation() !=
+ pending_tile->required_for_activation()) {
+ return active_tile->required_for_activation() ? PENDING_TREE : ACTIVE_TREE;
+ }
+
+ // Return tile with a lower priority.
if (pending_priority.IsHigherPriorityThan(active_priority))
return ACTIVE_TREE;
return PENDING_TREE;

Powered by Google App Engine
This is Rietveld 408576698