Chromium Code Reviews| Index: cc/resources/tile_manager.cc |
| diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc |
| index 94b6332a9aa4229bcfaa1b90831beba679a39416..2f5de410eef19a446612b8d489339227183609ab 100644 |
| --- a/cc/resources/tile_manager.cc |
| +++ b/cc/resources/tile_manager.cc |
| @@ -530,8 +530,19 @@ TileManager::FreeTileResourcesWithLowerPriorityUntilUsageIsWithinLimit( |
| break; |
| Tile* tile = eviction_priority_queue->Top(); |
| - if (!other_priority.IsHigherPriorityThan(tile->combined_priority())) |
| + const TilePriority& eviction_priority = tile->combined_priority(); |
| + |
| + // If eviction tile is strictly higher priority, then we can't evict. |
| + if (eviction_priority.IsHigherPriorityThan(other_priority)) |
| + break; |
| + |
| + // If there's a tie in priority, prefer to the keep the eviction tile |
| + // unless it's non ideal resolution or is occluded. |
| + if (!tile->is_occluded_combined() && |
| + (eviction_priority.resolution != NON_IDEAL_RESOLUTION) && |
|
danakj
2015/02/12 23:48:46
I think you should do this separately with a test
vmpstr
2015/02/12 23:52:34
OK. Removed from this CL.
|
| + !other_priority.IsHigherPriorityThan(tile->combined_priority())) { |
| break; |
| + } |
| *usage -= MemoryUsage::FromTile(tile); |
| FreeResourcesForTileAndNotifyClientIfTileWasReadyToDraw(tile); |