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 = |