Chromium Code Reviews| OLD | NEW | 
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "cc/resources/eviction_tile_priority_queue.h" | 5 #include "cc/resources/eviction_tile_priority_queue.h" | 
| 6 | 6 | 
| 7 namespace cc { | 7 namespace cc { | 
| 8 | 8 | 
| 9 namespace { | 9 namespace { | 
| 10 | 10 | 
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 const Tile* active_tile = *active_iterator; | 206 const Tile* active_tile = *active_iterator; | 
| 207 const Tile* pending_tile = *pending_iterator; | 207 const Tile* pending_tile = *pending_iterator; | 
| 208 if (active_tile == pending_tile) | 208 if (active_tile == pending_tile) | 
| 209 return ACTIVE_TREE; | 209 return ACTIVE_TREE; | 
| 210 | 210 | 
| 211 const TilePriority& active_priority = | 211 const TilePriority& active_priority = | 
| 212 active_tile->priority_for_tree_priority(tree_priority); | 212 active_tile->priority_for_tree_priority(tree_priority); | 
| 213 const TilePriority& pending_priority = | 213 const TilePriority& pending_priority = | 
| 214 pending_tile->priority_for_tree_priority(tree_priority); | 214 pending_tile->priority_for_tree_priority(tree_priority); | 
| 215 | 215 | 
| 216 if (active_priority.priority_bin == pending_priority.priority_bin) { | |
| 
 
vmpstr
2014/11/19 16:47:58
*
 
 | |
| 217 if (active_tile->required_for_activation()) { | |
| 218 if (!pending_tile->required_for_activation()) | |
| 219 return PENDING_TREE; | |
| 220 } else { | |
| 221 if (pending_tile->required_for_activation()) | |
| 222 return ACTIVE_TREE; | |
| 223 } | |
| 224 } | |
| 225 | |
| 216 if (pending_priority.IsHigherPriorityThan(active_priority)) | 226 if (pending_priority.IsHigherPriorityThan(active_priority)) | 
| 217 return ACTIVE_TREE; | 227 return ACTIVE_TREE; | 
| 218 return PENDING_TREE; | 228 return PENDING_TREE; | 
| 219 } | 229 } | 
| 220 | 230 | 
| 221 } // namespace cc | 231 } // namespace cc | 
| OLD | NEW |