OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_H_ |
| 6 #define CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_H_ |
| 7 |
| 8 #include <utility> |
| 9 #include <vector> |
| 10 |
| 11 #include "cc/base/cc_export.h" |
| 12 #include "cc/layers/picture_layer_impl.h" |
| 13 #include "cc/resources/tile_priority.h" |
| 14 |
| 15 namespace cc { |
| 16 |
| 17 class CC_EXPORT RasterTilePriorityQueue { |
| 18 public: |
| 19 struct PairedPictureLayerQueue { |
| 20 PairedPictureLayerQueue(); |
| 21 PairedPictureLayerQueue(const PictureLayerImpl::Pair& layer_pair, |
| 22 TreePriority tree_priority); |
| 23 ~PairedPictureLayerQueue(); |
| 24 |
| 25 bool IsEmpty() const; |
| 26 Tile* Top(TreePriority tree_priority); |
| 27 void Pop(TreePriority tree_priority); |
| 28 |
| 29 PictureLayerImpl::LayerRasterTileIterator* NextTileIterator( |
| 30 TreePriority tree_priority); |
| 31 |
| 32 PictureLayerImpl::LayerRasterTileIterator active_iterator; |
| 33 PictureLayerImpl::LayerRasterTileIterator pending_iterator; |
| 34 |
| 35 // TODO(vmpstr): Investigate removing this. |
| 36 std::vector<Tile*> returned_shared_tiles; |
| 37 }; |
| 38 |
| 39 RasterTilePriorityQueue(); |
| 40 ~RasterTilePriorityQueue(); |
| 41 |
| 42 void Build(const std::vector<PictureLayerImpl::Pair>& paired_layers, |
| 43 TreePriority tree_priority); |
| 44 void Reset(); |
| 45 |
| 46 bool IsEmpty() const; |
| 47 Tile* Top(); |
| 48 void Pop(); |
| 49 |
| 50 private: |
| 51 std::vector<PairedPictureLayerQueue> paired_queues_; |
| 52 TreePriority tree_priority_; |
| 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(RasterTilePriorityQueue); |
| 55 }; |
| 56 |
| 57 } // namespace cc |
| 58 |
| 59 #endif // CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_H_ |
OLD | NEW |