| 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 #ifndef CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ | 5 #ifndef CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ |
| 6 #define CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ | 6 #define CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 // Set of returned tiles (excluding the current one) for DCHECKing. | 36 // Set of returned tiles (excluding the current one) for DCHECKing. |
| 37 std::set<const Tile*> returned_tiles_for_debug; | 37 std::set<const Tile*> returned_tiles_for_debug; |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 EvictionTilePriorityQueue(); | 40 EvictionTilePriorityQueue(); |
| 41 ~EvictionTilePriorityQueue(); | 41 ~EvictionTilePriorityQueue(); |
| 42 | 42 |
| 43 void Build(const std::vector<PictureLayerImpl::Pair>& paired_layers, | 43 void Build(const std::vector<PictureLayerImpl::Pair>& paired_layers, |
| 44 TreePriority tree_priority); | 44 TreePriority tree_priority); |
| 45 void Reset(); | |
| 46 | 45 |
| 47 bool IsEmpty() const; | 46 bool IsEmpty() const; |
| 48 Tile* Top(); | 47 Tile* Top(); |
| 49 void Pop(); | 48 void Pop(); |
| 50 | 49 |
| 51 private: | 50 private: |
| 52 // TODO(vmpstr): This is potentially unnecessary if it becomes the case that | 51 // TODO(vmpstr): This is potentially unnecessary if it becomes the case that |
| 53 // PairedTilingSetQueue is fast enough to copy. In that case, we can use | 52 // PairedTilingSetQueue is fast enough to copy. In that case, we can use |
| 54 // objects directly (ie std::vector<PairedTilingSetQueue>). | 53 // objects directly (ie std::vector<PairedTilingSetQueue>). |
| 55 ScopedPtrVector<PairedTilingSetQueue> paired_queues_; | 54 ScopedPtrVector<PairedTilingSetQueue> paired_queues_; |
| 56 TreePriority tree_priority_; | 55 TreePriority tree_priority_; |
| 57 | 56 |
| 58 DISALLOW_COPY_AND_ASSIGN(EvictionTilePriorityQueue); | 57 DISALLOW_COPY_AND_ASSIGN(EvictionTilePriorityQueue); |
| 59 }; | 58 }; |
| 60 | 59 |
| 61 } // namespace cc | 60 } // namespace cc |
| 62 | 61 |
| 63 #endif // CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ | 62 #endif // CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ |
| OLD | NEW |