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_TILING_SET_RASTER_QUEUE_H_ | 5 #ifndef CC_RESOURCES_TILING_SET_RASTER_QUEUE_ALL_H_ |
6 #define CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_ | 6 #define CC_RESOURCES_TILING_SET_RASTER_QUEUE_ALL_H_ |
7 | 7 |
8 #include "cc/base/cc_export.h" | 8 #include "cc/base/cc_export.h" |
9 #include "cc/resources/picture_layer_tiling_set.h" | 9 #include "cc/resources/picture_layer_tiling_set.h" |
| 10 #include "cc/resources/tiling_set_raster_queue.h" |
10 | 11 |
11 namespace cc { | 12 namespace cc { |
12 | 13 |
13 class CC_EXPORT TilingSetRasterQueue { | 14 // This queue returns all tiles required to be rasterized from HIGH_RESOLUTION |
| 15 // and LOW_RESOLUTION tilings. |
| 16 class CC_EXPORT TilingSetRasterQueueAll : public TilingSetRasterQueue { |
14 public: | 17 public: |
15 TilingSetRasterQueue(); | 18 TilingSetRasterQueueAll(PictureLayerTilingSet* tiling_set, |
16 TilingSetRasterQueue(PictureLayerTilingSet* tiling_set, | 19 bool prioritize_low_res); |
17 bool prioritize_low_res); | 20 ~TilingSetRasterQueueAll() override; |
18 ~TilingSetRasterQueue(); | |
19 | 21 |
20 Tile* Top(); | 22 Tile* Top() override; |
21 const Tile* Top() const; | 23 const Tile* Top() const override; |
22 void Pop(); | 24 void Pop() override; |
23 bool IsEmpty() const; | 25 bool IsEmpty() const override; |
24 | 26 |
25 private: | 27 private: |
26 enum IteratorType { LOW_RES, HIGH_RES, NUM_ITERATORS }; | 28 enum IteratorType { LOW_RES, HIGH_RES, NUM_ITERATORS }; |
27 | 29 |
28 void AdvanceToNextStage(); | 30 void AdvanceToNextStage(); |
29 | 31 |
30 PictureLayerTilingSet* tiling_set_; | 32 PictureLayerTilingSet* tiling_set_; |
31 | 33 |
32 struct IterationStage { | 34 struct IterationStage { |
33 IteratorType iterator_type; | 35 IteratorType iterator_type; |
34 TilePriority::PriorityBin tile_type; | 36 TilePriority::PriorityBin tile_type; |
35 }; | 37 }; |
36 | 38 |
37 size_t current_stage_; | 39 size_t current_stage_; |
38 | 40 |
39 // One low res stage, and three high res stages. | 41 // One low res stage, and three high res stages. |
40 IterationStage stages_[4]; | 42 IterationStage stages_[4]; |
41 PictureLayerTiling::TilingRasterTileIterator iterators_[NUM_ITERATORS]; | 43 PictureLayerTiling::TilingRasterTileIterator iterators_[NUM_ITERATORS]; |
42 }; | 44 }; |
43 | 45 |
44 } // namespace cc | 46 } // namespace cc |
45 | 47 |
46 #endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_ | 48 #endif // CC_RESOURCES_TILING_SET_RASTER_QUEUE_ALL_H_ |
OLD | NEW |