Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3903)

Unified Diff: cc/resources/picture_layer_tiling.cc

Issue 413053004: cc: Fix tiling raster iterator to process all tiles correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698