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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 201 const Tile* active_tile = active_queue->Top(); | 201 const Tile* active_tile = active_queue->Top(); |
| 202 const Tile* pending_tile = pending_queue->Top(); | 202 const Tile* pending_tile = pending_queue->Top(); |
| 203 if (active_tile == pending_tile) | 203 if (active_tile == pending_tile) |
| 204 return ACTIVE_TREE; | 204 return ACTIVE_TREE; |
| 205 | 205 |
| 206 const TilePriority& active_priority = | 206 const TilePriority& active_priority = |
| 207 active_tile->priority_for_tree_priority(tree_priority); | 207 active_tile->priority_for_tree_priority(tree_priority); |
| 208 const TilePriority& pending_priority = | 208 const TilePriority& pending_priority = |
| 209 pending_tile->priority_for_tree_priority(tree_priority); | 209 pending_tile->priority_for_tree_priority(tree_priority); |
| 210 | 210 |
| 211 if (active_priority.priority_bin == pending_priority.priority_bin) { | |
|
vmpstr
2014/12/09 02:10:58
While here, can you add a couple more comments in
USE eero AT chromium.org
2014/12/09 18:44:14
Done.
| |
| 212 if (active_tile->required_for_activation()) { | |
| 213 if (!pending_tile->required_for_activation()) | |
|
vmpstr
2014/12/09 02:10:58
I think this can be a bit simpler:
if (active_pri
USE eero AT chromium.org
2014/12/09 18:44:14
Yes. Done.
| |
| 214 return PENDING_TREE; | |
| 215 } else { | |
| 216 if (pending_tile->required_for_activation()) | |
| 217 return ACTIVE_TREE; | |
| 218 } | |
| 219 } | |
| 220 | |
| 211 if (pending_priority.IsHigherPriorityThan(active_priority)) | 221 if (pending_priority.IsHigherPriorityThan(active_priority)) |
| 212 return ACTIVE_TREE; | 222 return ACTIVE_TREE; |
| 213 return PENDING_TREE; | 223 return PENDING_TREE; |
| 214 } | 224 } |
| 215 | 225 |
| 216 } // namespace cc | 226 } // namespace cc |
| OLD | NEW |