Chromium Code Reviews| 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..eaedeb1af87fc32986096bdf1ac932222f299a89 100644 |
| --- a/cc/resources/raster_tile_priority_queue_all.cc |
| +++ b/cc/resources/raster_tile_priority_queue_all.cc |
| @@ -86,12 +86,15 @@ WhichTree HigherPriorityTree(TreePriority tree_priority, |
| const TilingSetRasterQueueAll* active_queue, |
| const TilingSetRasterQueueAll* pending_queue, |
| const Tile* shared_tile) { |
| + const Tile* active_tile = shared_tile ? shared_tile : active_queue->Top(); |
|
enne (OOO)
2015/04/15 20:47:02
Can you leave a comment about why you're doing thi
vmpstr
2015/04/15 21:05:24
Done.
|
| + const Tile* pending_tile = shared_tile ? shared_tile : pending_queue->Top(); |
| + if (active_tile->priority(ACTIVE_TREE).resolution == NON_IDEAL_RESOLUTION) |
| + return PENDING_TREE; |
| + if (pending_tile->priority(PENDING_TREE).resolution == NON_IDEAL_RESOLUTION) |
| + return ACTIVE_TREE; |
| + |
| switch (tree_priority) { |
| case SMOOTHNESS_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); |
| @@ -108,10 +111,6 @@ WhichTree HigherPriorityTree(TreePriority tree_priority, |
| case NEW_CONTENT_TAKES_PRIORITY: |
| return PENDING_TREE; |
| case SAME_PRIORITY_FOR_BOTH_TREES: { |
| - 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); |