| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ | 5 #ifndef CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ |
| 6 #define CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ | 6 #define CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "cc/base/cc_export.h" | 12 #include "cc/base/cc_export.h" |
| 13 #include "cc/layers/picture_layer_impl.h" | 13 #include "cc/layers/picture_layer_impl.h" |
| 14 #include "cc/resources/raster_tile_priority_queue.h" | 14 #include "cc/resources/raster_tile_priority_queue.h" |
| 15 #include "cc/resources/tile_priority.h" | 15 #include "cc/resources/tile_priority.h" |
| 16 #include "cc/resources/tiling_set_raster_queue.h" | 16 #include "cc/resources/tiling_set_raster_queue_all.h" |
| 17 | 17 |
| 18 namespace cc { | 18 namespace cc { |
| 19 | 19 |
| 20 class CC_EXPORT RasterTilePriorityQueueAll : public RasterTilePriorityQueue { | 20 class CC_EXPORT RasterTilePriorityQueueAll : public RasterTilePriorityQueue { |
| 21 public: | 21 public: |
| 22 class PairedTilingSetQueue { | 22 class PairedTilingSetQueue { |
| 23 public: | 23 public: |
| 24 PairedTilingSetQueue(); | 24 PairedTilingSetQueue(); |
| 25 PairedTilingSetQueue(const PictureLayerImpl::Pair& layer_pair, | 25 PairedTilingSetQueue(const PictureLayerImpl::Pair& layer_pair, |
| 26 TreePriority tree_priority); | 26 TreePriority tree_priority); |
| 27 ~PairedTilingSetQueue(); | 27 ~PairedTilingSetQueue(); |
| 28 | 28 |
| 29 bool IsEmpty() const; | 29 bool IsEmpty() const; |
| 30 Tile* Top(TreePriority tree_priority); | 30 Tile* Top(TreePriority tree_priority); |
| 31 void Pop(TreePriority tree_priority); | 31 void Pop(TreePriority tree_priority); |
| 32 | 32 |
| 33 WhichTree NextTileIteratorTree(TreePriority tree_priority) const; | 33 WhichTree NextTileIteratorTree(TreePriority tree_priority) const; |
| 34 void SkipTilesReturnedByTwin(TreePriority tree_priority); | 34 void SkipTilesReturnedByTwin(TreePriority tree_priority); |
| 35 | 35 |
| 36 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; | 36 scoped_refptr<base::debug::ConvertableToTraceFormat> StateAsValue() const; |
| 37 | 37 |
| 38 const TilingSetRasterQueue* active_queue() const { | 38 const TilingSetRasterQueueAll* active_queue() const { |
| 39 return active_queue_.get(); | 39 return active_queue_.get(); |
| 40 } | 40 } |
| 41 const TilingSetRasterQueue* pending_queue() const { | 41 const TilingSetRasterQueueAll* pending_queue() const { |
| 42 return pending_queue_.get(); | 42 return pending_queue_.get(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 scoped_ptr<TilingSetRasterQueue> active_queue_; | 46 scoped_ptr<TilingSetRasterQueueAll> active_queue_; |
| 47 scoped_ptr<TilingSetRasterQueue> pending_queue_; | 47 scoped_ptr<TilingSetRasterQueueAll> pending_queue_; |
| 48 bool has_both_layers_; | 48 bool has_both_layers_; |
| 49 | 49 |
| 50 // Set of returned tiles (excluding the current one) for DCHECKing. | 50 // Set of returned tiles (excluding the current one) for DCHECKing. |
| 51 std::set<const Tile*> returned_tiles_for_debug_; | 51 std::set<const Tile*> returned_tiles_for_debug_; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 RasterTilePriorityQueueAll(); | 54 RasterTilePriorityQueueAll(); |
| 55 ~RasterTilePriorityQueueAll() override; | 55 ~RasterTilePriorityQueueAll() override; |
| 56 | 56 |
| 57 bool IsEmpty() const override; | 57 bool IsEmpty() const override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 69 // objects directly (ie std::vector<PairedTilingSetQueue>. | 69 // objects directly (ie std::vector<PairedTilingSetQueue>. |
| 70 ScopedPtrVector<PairedTilingSetQueue> paired_queues_; | 70 ScopedPtrVector<PairedTilingSetQueue> paired_queues_; |
| 71 TreePriority tree_priority_; | 71 TreePriority tree_priority_; |
| 72 | 72 |
| 73 DISALLOW_COPY_AND_ASSIGN(RasterTilePriorityQueueAll); | 73 DISALLOW_COPY_AND_ASSIGN(RasterTilePriorityQueueAll); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 } // namespace cc | 76 } // namespace cc |
| 77 | 77 |
| 78 #endif // CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ | 78 #endif // CC_RESOURCES_RASTER_TILE_PRIORITY_QUEUE_ALL_H_ |
| OLD | NEW |