Chromium Code Reviews| Index: cc/resources/picture_layer_tiling.cc |
| diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc |
| index 20a57b8a0723e2dfa9a386130b18c763ed2e62f7..b9b900c4ae83c1c04a1ceeb74e6409665c3382a6 100644 |
| --- a/cc/resources/picture_layer_tiling.cc |
| +++ b/cc/resources/picture_layer_tiling.cc |
| @@ -870,13 +870,23 @@ void PictureLayerTiling::TilingRasterTileIterator::AdvancePhase() { |
| DCHECK_LT(type_, TilePriority::EVENTUALLY); |
| do { |
| - type_ = static_cast<TilePriority::PriorityBin>(type_ + 1); |
| - if (type_ == TilePriority::EVENTUALLY) { |
| + if (type_ == TilePriority::SOON && !skewport_processed_) |
| + skewport_processed_ = true; |
| + else |
| + type_ = static_cast<TilePriority::PriorityBin>(type_ + 1); |
| + |
| + if (type_ == TilePriority::SOON && skewport_processed_) { |
| spiral_iterator_ = TilingData::SpiralDifferenceIterator( |
| &tiling_->tiling_data_, |
| - eventually_rect_in_content_space_, |
| + soon_border_rect_in_content_space_, |
| skewport_in_content_space_, |
| visible_rect_in_content_space_); |
| + } else if (type_ == TilePriority::EVENTUALLY) { |
| + spiral_iterator_ = TilingData::SpiralDifferenceIterator( |
| + &tiling_->tiling_data_, |
| + eventually_rect_in_content_space_, |
| + skewport_in_content_space_, |
| + soon_border_rect_in_content_space_); |
| } |
|
reveman
2014/07/24 12:50:16
I find this code a bit hard to understand. It migh
reveman
2014/07/24 13:12:23
See my comment on the other patch. Maybe an enum f
vmpstr
2014/07/24 16:33:14
Done.
|
| while (spiral_iterator_) { |
| @@ -912,20 +922,8 @@ operator++() { |
| case TilePriority::SOON: |
| ++spiral_iterator_; |
| if (!spiral_iterator_) { |
| - if (skewport_processed_) { |
| - AdvancePhase(); |
| - return *this; |
| - } |
| - skewport_processed_ = true; |
| - spiral_iterator_ = TilingData::SpiralDifferenceIterator( |
| - &tiling_->tiling_data_, |
| - soon_border_rect_in_content_space_, |
| - skewport_in_content_space_, |
| - visible_rect_in_content_space_); |
| - if (!spiral_iterator_) { |
| - AdvancePhase(); |
| - return *this; |
| - } |
| + AdvancePhase(); |
| + return *this; |
| } |
| next_index = spiral_iterator_.index(); |
| break; |