Index: cc/resources/raster_tile_priority_queue.cc |
diff --git a/cc/resources/raster_tile_priority_queue.cc b/cc/resources/raster_tile_priority_queue.cc |
index cbe90f9498d8ff27934312490f95905660e998ff..a8e0ea8834ade3d58c16da34230b9c6583cb8f33 100644 |
--- a/cc/resources/raster_tile_priority_queue.cc |
+++ b/cc/resources/raster_tile_priority_queue.cc |
@@ -69,8 +69,23 @@ WhichTree HigherPriorityTree( |
const PictureLayerImpl::LayerRasterTileIterator* pending_iterator, |
const Tile* shared_tile) { |
switch (tree_priority) { |
- case SMOOTHNESS_TAKES_PRIORITY: |
+ case SMOOTHNESS_TAKES_PRIORITY: { |
+ const Tile* active_tile = shared_tile ? shared_tile : **active_iterator; |
+ const Tile* pending_tile = shared_tile ? shared_tile : **pending_iterator; |
+ |
+ const TilePriority& active_priority = active_tile->priority(ACTIVE_TREE); |
+ const TilePriority& pending_priority = |
+ pending_tile->priority(PENDING_TREE); |
+ |
+ // If we've down to eventually bin tiles on the active tree, but the |
+ // pending tree has needed now tiles, process the pending tree to avoid |
+ // activation starvation. |
reveman
2014/10/13 19:45:11
I don't see how this used to starve activation dif
vmpstr
2014/10/13 20:20:13
In the pre-iterator approach, tiles that are requi
reveman
2014/10/13 21:07:36
The change looks fine to me. It's just the comment
vmpstr
2014/10/13 21:33:40
Done.
|
+ if (active_priority.priority_bin == TilePriority::EVENTUALLY && |
+ pending_priority.priority_bin == TilePriority::NOW) { |
+ return PENDING_TREE; |
+ } |
return ACTIVE_TREE; |
+ } |
case NEW_CONTENT_TAKES_PRIORITY: |
return PENDING_TREE; |
case SAME_PRIORITY_FOR_BOTH_TREES: { |