| 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 #include "cc/resources/tiling_set_raster_queue_all.h" | 5 #include "cc/resources/tiling_set_raster_queue_all.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "cc/resources/picture_layer_tiling_set.h" | 9 #include "cc/resources/picture_layer_tiling_set.h" |
| 10 #include "cc/resources/tile.h" | 10 #include "cc/resources/tile.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 TilingIteratorType* iterator) { | 167 TilingIteratorType* iterator) { |
| 168 tile_ = nullptr; | 168 tile_ = nullptr; |
| 169 while (!tile_ || !TileNeedsRaster(tile_)) { | 169 while (!tile_ || !TileNeedsRaster(tile_)) { |
| 170 ++(*iterator); | 170 ++(*iterator); |
| 171 if (!(*iterator)) { | 171 if (!(*iterator)) { |
| 172 tile_ = nullptr; | 172 tile_ = nullptr; |
| 173 return; | 173 return; |
| 174 } | 174 } |
| 175 tile_ = tiling_->TileAt(iterator->index_x(), iterator->index_y()); | 175 tile_ = tiling_->TileAt(iterator->index_x(), iterator->index_y()); |
| 176 } | 176 } |
| 177 tiling_->UpdateTileAndTwinPriority(tile_); | 177 tiling_->UpdateTilePriority(tile_); |
| 178 } | 178 } |
| 179 | 179 |
| 180 template <typename TilingIteratorType> | 180 template <typename TilingIteratorType> |
| 181 bool TilingSetRasterQueueAll::OnePriorityRectIterator:: | 181 bool TilingSetRasterQueueAll::OnePriorityRectIterator:: |
| 182 GetFirstTileAndCheckIfValid(TilingIteratorType* iterator) { | 182 GetFirstTileAndCheckIfValid(TilingIteratorType* iterator) { |
| 183 tile_ = tiling_->TileAt(iterator->index_x(), iterator->index_y()); | 183 tile_ = tiling_->TileAt(iterator->index_x(), iterator->index_y()); |
| 184 if (!tile_ || !TileNeedsRaster(tile_)) { | 184 if (!tile_ || !TileNeedsRaster(tile_)) { |
| 185 tile_ = nullptr; | 185 tile_ = nullptr; |
| 186 return false; | 186 return false; |
| 187 } | 187 } |
| 188 tiling_->UpdateTileAndTwinPriority(tile_); | 188 tiling_->UpdateTilePriority(tile_); |
| 189 return true; | 189 return true; |
| 190 } | 190 } |
| 191 | 191 |
| 192 // VisibleTilingIterator. | 192 // VisibleTilingIterator. |
| 193 TilingSetRasterQueueAll::VisibleTilingIterator::VisibleTilingIterator( | 193 TilingSetRasterQueueAll::VisibleTilingIterator::VisibleTilingIterator( |
| 194 PictureLayerTiling* tiling, | 194 PictureLayerTiling* tiling, |
| 195 TilingData* tiling_data) | 195 TilingData* tiling_data) |
| 196 : OnePriorityRectIterator(tiling, tiling_data) { | 196 : OnePriorityRectIterator(tiling, tiling_data) { |
| 197 if (!tiling_->has_visible_rect_tiles()) | 197 if (!tiling_->has_visible_rect_tiles()) |
| 198 return; | 198 return; |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 current_tile_ = nullptr; | 432 current_tile_ = nullptr; |
| 433 return *this; | 433 return *this; |
| 434 } | 434 } |
| 435 current_tile_ = *eventually_iterator_; | 435 current_tile_ = *eventually_iterator_; |
| 436 break; | 436 break; |
| 437 } | 437 } |
| 438 return *this; | 438 return *this; |
| 439 } | 439 } |
| 440 | 440 |
| 441 } // namespace cc | 441 } // namespace cc |
| OLD | NEW |