| 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 <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "cc/base/cc_export.h" | 11 #include "cc/base/cc_export.h" |
| 12 #include "cc/layers/picture_layer_impl.h" | 12 #include "cc/layers/picture_layer_impl.h" |
| 13 #include "cc/resources/tile_priority.h" | 13 #include "cc/resources/tile_priority.h" |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 | 16 |
| 17 class CC_EXPORT EvictionTilePriorityQueue { | 17 class CC_EXPORT EvictionTilePriorityQueue { |
| 18 public: | 18 public: |
| 19 struct PairedPictureLayerQueue { | 19 struct PairedPictureLayerQueue { |
| 20 PairedPictureLayerQueue(); | 20 PairedPictureLayerQueue(); |
| 21 PairedPictureLayerQueue(const PictureLayerImpl::Pair& layer_pair, | 21 explicit PairedPictureLayerQueue(const PictureLayerImpl::Pair& layer_pair); |
| 22 TreePriority tree_priority); | |
| 23 ~PairedPictureLayerQueue(); | 22 ~PairedPictureLayerQueue(); |
| 24 | 23 |
| 25 bool IsEmpty() const; | 24 bool IsEmpty() const; |
| 26 Tile* Top(TreePriority tree_priority); | 25 Tile* Top(TreePriority tree_priority); |
| 27 void Pop(TreePriority tree_priority); | 26 void Pop(TreePriority tree_priority); |
| 28 | 27 |
| 29 WhichTree NextTileIteratorTree(TreePriority tree_priority) const; | 28 WhichTree NextTileIteratorTree(TreePriority tree_priority) const; |
| 30 | 29 |
| 31 PictureLayerImpl::LayerEvictionTileIterator active_iterator; | 30 PictureLayerImpl::LayerEvictionTileIterator active_iterator; |
| 32 PictureLayerImpl::LayerEvictionTileIterator pending_iterator; | 31 PictureLayerImpl::LayerEvictionTileIterator pending_iterator; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 52 // objects directly (ie std::vector<PairedPictureLayerQueue>). | 51 // objects directly (ie std::vector<PairedPictureLayerQueue>). |
| 53 ScopedPtrVector<PairedPictureLayerQueue> paired_queues_; | 52 ScopedPtrVector<PairedPictureLayerQueue> paired_queues_; |
| 54 TreePriority tree_priority_; | 53 TreePriority tree_priority_; |
| 55 | 54 |
| 56 DISALLOW_COPY_AND_ASSIGN(EvictionTilePriorityQueue); | 55 DISALLOW_COPY_AND_ASSIGN(EvictionTilePriorityQueue); |
| 57 }; | 56 }; |
| 58 | 57 |
| 59 } // namespace cc | 58 } // namespace cc |
| 60 | 59 |
| 61 #endif // CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ | 60 #endif // CC_RESOURCES_EVICTION_TILE_PRIORITY_QUEUE_H_ |
| OLD | NEW |