Index: cc/resources/tiling_set_raster_queue_all.h |
diff --git a/cc/resources/tiling_set_raster_queue_all.h b/cc/resources/tiling_set_raster_queue_all.h |
index ebca838f232b288c00e6e6770d3d97e997d23bf2..f497afdad92a7e111916e7ede189666076785c11 100644 |
--- a/cc/resources/tiling_set_raster_queue_all.h |
+++ b/cc/resources/tiling_set_raster_queue_all.h |
@@ -64,6 +64,18 @@ class CC_EXPORT TilingSetRasterQueueAll { |
TilingData::Iterator iterator_; |
}; |
+ class PendingVisibleTilingIterator : public OnePriorityRectIterator { |
+ public: |
+ PendingVisibleTilingIterator() = default; |
+ PendingVisibleTilingIterator(PictureLayerTiling* tiling, |
+ TilingData* tiling_data); |
+ |
+ PendingVisibleTilingIterator& operator++(); |
+ |
+ private: |
+ TilingData::DifferenceIterator iterator_; |
+ }; |
+ |
// Iterates over skewport only, spiral around the visible rect. |
class SkewportTilingIterator : public OnePriorityRectIterator { |
public: |
@@ -74,6 +86,7 @@ class CC_EXPORT TilingSetRasterQueueAll { |
private: |
TilingData::SpiralDifferenceIterator iterator_; |
+ gfx::Rect pending_visible_rect_; |
}; |
// Iterates over soon border only, spiral around the visible rect. |
@@ -87,6 +100,7 @@ class CC_EXPORT TilingSetRasterQueueAll { |
private: |
TilingData::SpiralDifferenceIterator iterator_; |
+ gfx::Rect pending_visible_rect_; |
}; |
// Iterates over eventually rect only, spiral around the soon rect. |
@@ -100,6 +114,7 @@ class CC_EXPORT TilingSetRasterQueueAll { |
private: |
TilingData::SpiralDifferenceIterator iterator_; |
+ gfx::Rect pending_visible_rect_; |
}; |
// Iterates over all of the above phases in the following order: visible, |
@@ -109,7 +124,7 @@ class CC_EXPORT TilingSetRasterQueueAll { |
TilingIterator(); |
explicit TilingIterator(PictureLayerTiling* tiling, |
TilingData* tiling_data); |
- ~TilingIterator() = default; |
+ ~TilingIterator(); |
bool done() const { return current_tile_ == nullptr; } |
const Tile* operator*() const { return current_tile_; } |
@@ -118,6 +133,7 @@ class CC_EXPORT TilingSetRasterQueueAll { |
switch (phase_) { |
case VISIBLE_RECT: |
return TilePriority::NOW; |
+ case PENDING_VISIBLE_RECT: |
case SKEWPORT_RECT: |
case SOON_BORDER_RECT: |
return TilePriority::SOON; |
@@ -131,8 +147,14 @@ class CC_EXPORT TilingSetRasterQueueAll { |
TilingIterator& operator++(); |
private: |
+ // PENDING VISIBLE RECT refers to the visible rect that will become current |
+ // upon activation (ie, the pending tree's visible rect). Tiles in this |
+ // region that are not part of the current visible rect are all handled |
+ // here. Note that when processing a pending tree, this rect is the same as |
+ // the visible rect so no tiles are processed in this case. |
enum Phase { |
VISIBLE_RECT, |
+ PENDING_VISIBLE_RECT, |
SKEWPORT_RECT, |
SOON_BORDER_RECT, |
EVENTUALLY_RECT |
@@ -147,26 +169,32 @@ class CC_EXPORT TilingSetRasterQueueAll { |
Tile* current_tile_; |
VisibleTilingIterator visible_iterator_; |
+ PendingVisibleTilingIterator pending_visible_iterator_; |
SkewportTilingIterator skewport_iterator_; |
SoonBorderTilingIterator soon_border_iterator_; |
EventuallyTilingIterator eventually_iterator_; |
}; |
- enum IteratorType { LOW_RES, HIGH_RES, NUM_ITERATORS }; |
+ enum IteratorType { |
+ LOW_RES, |
+ HIGH_RES, |
+ ACTIVE_NON_IDEAL_PENDING_HIGH_RES, |
+ NUM_ITERATORS |
+ }; |
void AdvanceToNextStage(); |
PictureLayerTilingSet* tiling_set_; |
struct IterationStage { |
+ IterationStage(IteratorType type, TilePriority::PriorityBin bin); |
IteratorType iterator_type; |
TilePriority::PriorityBin tile_type; |
}; |
size_t current_stage_; |
- // One low res stage, and three high res stages. |
- IterationStage stages_[4]; |
+ std::vector<IterationStage> stages_; |
TilingIterator iterators_[NUM_ITERATORS]; |
}; |