| Index: cc/resources/tile_manager.cc
|
| diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc
|
| index d8578e727f76489039e12c37cd10e74b84d5f189..4a4cfeaf27e340f9680c2260e4bdc4b92bb0aeb3 100644
|
| --- a/cc/resources/tile_manager.cc
|
| +++ b/cc/resources/tile_manager.cc
|
| @@ -1446,10 +1446,23 @@ bool TileManager::RasterTileIterator::RasterOrderComparator::operator()(
|
| b_tile->priority_for_tree_priority(tree_priority_);
|
| bool prioritize_low_res = tree_priority_ == SMOOTHNESS_TAKES_PRIORITY;
|
|
|
| - if (b_priority.resolution != a_priority.resolution) {
|
| - return (prioritize_low_res && b_priority.resolution == LOW_RESOLUTION) ||
|
| - (!prioritize_low_res && b_priority.resolution == HIGH_RESOLUTION) ||
|
| - (a_priority.resolution == NON_IDEAL_RESOLUTION);
|
| + // Now we have to return true iff b is higher priority than a.
|
| +
|
| + // If the bin is the same but the resolution is not, then the order will be
|
| + // determined by whether we prioritize low res or not.
|
| + if (b_priority.priority_bin == a_priority.priority_bin &&
|
| + b_priority.resolution != a_priority.resolution) {
|
| + // Non ideal resolution should be sorted lower than other resolutions.
|
| + if (a_priority.resolution == NON_IDEAL_RESOLUTION)
|
| + return true;
|
| +
|
| + if (b_priority.resolution == NON_IDEAL_RESOLUTION)
|
| + return false;
|
| +
|
| + if (prioritize_low_res)
|
| + return b_priority.resolution == LOW_RESOLUTION;
|
| +
|
| + return b_priority.resolution == HIGH_RESOLUTION;
|
| }
|
|
|
| return b_priority.IsHigherPriorityThan(a_priority);
|
|
|