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

Unified Diff: cc/resources/raster_tile_priority_queue_all.cc

Issue 1051993002: cc: Remove tile sharing from tilings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 5 years, 8 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
Index: cc/resources/raster_tile_priority_queue_all.cc
diff --git a/cc/resources/raster_tile_priority_queue_all.cc b/cc/resources/raster_tile_priority_queue_all.cc
index 9baa9b32de7177e67738a675a78dda8f1cf65779..7b0eca3864354d45e7ae3227b1ec72674af90e7b 100644
--- a/cc/resources/raster_tile_priority_queue_all.cc
+++ b/cc/resources/raster_tile_priority_queue_all.cc
@@ -105,8 +105,25 @@ WhichTree HigherPriorityTree(TreePriority tree_priority,
}
return ACTIVE_TREE;
}
- case NEW_CONTENT_TAKES_PRIORITY:
+ case NEW_CONTENT_TAKES_PRIORITY: {
+ const Tile* active_tile = shared_tile ? shared_tile : active_queue->Top();
+ const Tile* pending_tile =
+ shared_tile ? shared_tile : pending_queue->Top();
+
+ const TilePriority& active_priority = active_tile->priority(ACTIVE_TREE);
+ const TilePriority& pending_priority =
+ pending_tile->priority(PENDING_TREE);
+
+ // If we're down to soon bin tiles on the pending tree, process the
+ // active tree to allow tiles required for activation to be initialized
+ // when memory policy only allows prepaint. Note that active required for
+ // activation tiles might come from either now or soon bins.
+ if (pending_priority.priority_bin >= TilePriority::SOON &&
+ active_priority.priority_bin <= TilePriority::SOON) {
+ return ACTIVE_TREE;
+ }
return PENDING_TREE;
+ }
case SAME_PRIORITY_FOR_BOTH_TREES: {
const Tile* active_tile = shared_tile ? shared_tile : active_queue->Top();
const Tile* pending_tile =

Powered by Google App Engine
This is Rietveld 408576698