| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 EvictionTilePriorityQueue::PairedPictureLayerQueue::PairedPictureLayerQueue() { | 125 EvictionTilePriorityQueue::PairedPictureLayerQueue::PairedPictureLayerQueue() { |
| 126 } | 126 } |
| 127 | 127 |
| 128 EvictionTilePriorityQueue::PairedPictureLayerQueue::PairedPictureLayerQueue( | 128 EvictionTilePriorityQueue::PairedPictureLayerQueue::PairedPictureLayerQueue( |
| 129 const PictureLayerImpl::Pair& layer_pair, | 129 const PictureLayerImpl::Pair& layer_pair, |
| 130 TreePriority tree_priority) | 130 TreePriority tree_priority) |
| 131 : active_iterator( | 131 : active_iterator( |
| 132 layer_pair.active | 132 layer_pair.active |
| 133 ? PictureLayerImpl::LayerEvictionTileIterator(layer_pair.active, | 133 ? PictureLayerImpl::LayerEvictionTileIterator(layer_pair.active, |
| 134 layer_pair.pending, |
| 134 tree_priority) | 135 tree_priority) |
| 135 : PictureLayerImpl::LayerEvictionTileIterator()), | 136 : PictureLayerImpl::LayerEvictionTileIterator()), |
| 136 pending_iterator( | 137 pending_iterator( |
| 137 layer_pair.pending | 138 layer_pair.pending |
| 138 ? PictureLayerImpl::LayerEvictionTileIterator(layer_pair.pending, | 139 ? PictureLayerImpl::LayerEvictionTileIterator(layer_pair.pending, |
| 140 layer_pair.active, |
| 139 tree_priority) | 141 tree_priority) |
| 140 : PictureLayerImpl::LayerEvictionTileIterator()) { | 142 : PictureLayerImpl::LayerEvictionTileIterator()) { |
| 141 } | 143 } |
| 142 | 144 |
| 143 EvictionTilePriorityQueue::PairedPictureLayerQueue::~PairedPictureLayerQueue() { | 145 EvictionTilePriorityQueue::PairedPictureLayerQueue::~PairedPictureLayerQueue() { |
| 144 } | 146 } |
| 145 | 147 |
| 146 bool EvictionTilePriorityQueue::PairedPictureLayerQueue::IsEmpty() const { | 148 bool EvictionTilePriorityQueue::PairedPictureLayerQueue::IsEmpty() const { |
| 147 return !active_iterator && !pending_iterator; | 149 return !active_iterator && !pending_iterator; |
| 148 } | 150 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 active_tile->priority_for_tree_priority(tree_priority); | 214 active_tile->priority_for_tree_priority(tree_priority); |
| 213 const TilePriority& pending_priority = | 215 const TilePriority& pending_priority = |
| 214 pending_tile->priority_for_tree_priority(tree_priority); | 216 pending_tile->priority_for_tree_priority(tree_priority); |
| 215 | 217 |
| 216 if (pending_priority.IsHigherPriorityThan(active_priority)) | 218 if (pending_priority.IsHigherPriorityThan(active_priority)) |
| 217 return ACTIVE_TREE; | 219 return ACTIVE_TREE; |
| 218 return PENDING_TREE; | 220 return PENDING_TREE; |
| 219 } | 221 } |
| 220 | 222 |
| 221 } // namespace cc | 223 } // namespace cc |
| OLD | NEW |