Index: cc/resources/tiling_set_raster_queue.h |
diff --git a/cc/resources/tiling_set_raster_queue.h b/cc/resources/tiling_set_raster_queue.h |
index e3250369fd60fc2055f7ef423a42c107d9df3571..e9ef44c868f292eac88dd977e693d05e17bc70b4 100644 |
--- a/cc/resources/tiling_set_raster_queue.h |
+++ b/cc/resources/tiling_set_raster_queue.h |
@@ -6,90 +6,19 @@ |
#define CC_RESOURCES_TILING_SET_RASTER_QUEUE_H_ |
#include "cc/base/cc_export.h" |
-#include "cc/resources/picture_layer_tiling_set.h" |
-#include "cc/resources/tile.h" |
-#include "cc/resources/tile_priority.h" |
namespace cc { |
+class Tile; |
danakj
2015/01/08 23:24:41
move up a line
vmpstr
2015/01/09 20:21:40
Done.
|
class CC_EXPORT TilingSetRasterQueue { |
danakj
2015/01/08 23:24:41
no longer needs to be exported, i think?
vmpstr
2015/01/09 20:21:40
Maybe? dtor needs to be exported, no? I'll see if
|
public: |
- TilingSetRasterQueue(); |
- TilingSetRasterQueue(PictureLayerTilingSet* tiling_set, |
- bool prioritize_low_res); |
- ~TilingSetRasterQueue(); |
+ TilingSetRasterQueue() = default; |
danakj
2015/01/08 23:24:41
do you need a constructor? remind me why default i
vmpstr
2015/01/09 20:21:40
Removed.
|
+ virtual ~TilingSetRasterQueue() = default; |
danakj
2015/01/08 23:24:41
ditto why is default better than {}?
vmpstr
2015/01/09 20:21:40
Personal preference: it specifies intent better. I
|
- Tile* Top(); |
- const Tile* Top() const; |
- void Pop(); |
- bool IsEmpty() const; |
- |
- private: |
- class TilingIterator { |
- public: |
- TilingIterator(); |
- explicit TilingIterator(PictureLayerTiling* tiling, |
- TilingData* tiling_data); |
- ~TilingIterator(); |
- |
- operator bool() const { return !!current_tile_; } |
- const Tile* operator*() const { return current_tile_; } |
- Tile* operator*() { return current_tile_; } |
- TilePriority::PriorityBin type() const { |
- switch (phase_) { |
- case VISIBLE_RECT: |
- return TilePriority::NOW; |
- case SKEWPORT_RECT: |
- case SOON_BORDER_RECT: |
- return TilePriority::SOON; |
- case EVENTUALLY_RECT: |
- return TilePriority::EVENTUALLY; |
- } |
- NOTREACHED(); |
- return TilePriority::EVENTUALLY; |
- } |
- |
- TilingIterator& operator++(); |
- |
- private: |
- enum Phase { |
- VISIBLE_RECT, |
- SKEWPORT_RECT, |
- SOON_BORDER_RECT, |
- EVENTUALLY_RECT |
- }; |
- |
- void AdvancePhase(); |
- bool TileNeedsRaster(Tile* tile) const { |
- return tile->NeedsRaster() && !tiling_->IsTileOccluded(tile); |
- } |
- |
- PictureLayerTiling* tiling_; |
- TilingData* tiling_data_; |
- |
- Phase phase_; |
- |
- Tile* current_tile_; |
- TilingData::Iterator visible_iterator_; |
- TilingData::SpiralDifferenceIterator spiral_iterator_; |
- }; |
- |
- enum IteratorType { LOW_RES, HIGH_RES, NUM_ITERATORS }; |
- |
- void AdvanceToNextStage(); |
- |
- PictureLayerTilingSet* tiling_set_; |
- |
- struct IterationStage { |
- IteratorType iterator_type; |
- TilePriority::PriorityBin tile_type; |
- }; |
- |
- size_t current_stage_; |
- |
- // One low res stage, and three high res stages. |
- IterationStage stages_[4]; |
- TilingIterator iterators_[NUM_ITERATORS]; |
+ virtual Tile* Top() = 0; |
+ virtual const Tile* Top() const = 0; |
+ virtual void Pop() = 0; |
+ virtual bool IsEmpty() const = 0; |
}; |
} // namespace cc |