| 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/tiles/tiling_set_raster_queue_all.h" | 5 #include "cc/tiles/tiling_set_raster_queue_all.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 if (!IsTileValid(tile)) { | 193 if (!IsTileValid(tile)) { |
| 194 current_tile_ = PrioritizedTile(); | 194 current_tile_ = PrioritizedTile(); |
| 195 return false; | 195 return false; |
| 196 } | 196 } |
| 197 current_tile_ = tiling_->MakePrioritizedTile(tile, priority_rect_type_); | 197 current_tile_ = tiling_->MakePrioritizedTile(tile, priority_rect_type_); |
| 198 return true; | 198 return true; |
| 199 } | 199 } |
| 200 | 200 |
| 201 bool TilingSetRasterQueueAll::OnePriorityRectIterator::IsTileValid( | 201 bool TilingSetRasterQueueAll::OnePriorityRectIterator::IsTileValid( |
| 202 const Tile* tile) const { | 202 const Tile* tile) const { |
| 203 if (!tile || !TileNeedsRaster(tile)) | 203 if (!tile) |
| 204 return false; | 204 return false; |
| 205 |
| 206 // Occluded tiles are not processed for raster or image decodes. |
| 207 if (tiling_->IsTileOccluded(tile)) |
| 208 return false; |
| 209 |
| 210 // If the tile does not need raster and does not have checkered-images |
| 211 // requiring a decode, we don't need to add it to the raster queue. |
| 212 if (!tile->draw_info().NeedsRaster() && |
| 213 !tile->draw_info().is_checker_imaged()) { |
| 214 return false; |
| 215 } |
| 216 |
| 205 // After the pending visible rect has been processed, we must return false | 217 // After the pending visible rect has been processed, we must return false |
| 206 // for pending visible rect tiles as tiling iterators do not ignore those | 218 // for pending visible rect tiles as tiling iterators do not ignore those |
| 207 // tiles. | 219 // tiles. |
| 208 if (priority_rect_type_ > PictureLayerTiling::PENDING_VISIBLE_RECT) { | 220 if (priority_rect_type_ > PictureLayerTiling::PENDING_VISIBLE_RECT) { |
| 209 gfx::Rect tile_bounds = tiling_data_->TileBounds(tile->tiling_i_index(), | 221 gfx::Rect tile_bounds = tiling_data_->TileBounds(tile->tiling_i_index(), |
| 210 tile->tiling_j_index()); | 222 tile->tiling_j_index()); |
| 211 if (pending_visible_rect_.Intersects(tile_bounds)) | 223 if (pending_visible_rect_.Intersects(tile_bounds)) |
| 212 return false; | 224 return false; |
| 213 } | 225 } |
| 214 return true; | 226 return true; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 current_tile_ = PrioritizedTile(); | 450 current_tile_ = PrioritizedTile(); |
| 439 return *this; | 451 return *this; |
| 440 } | 452 } |
| 441 current_tile_ = *eventually_iterator_; | 453 current_tile_ = *eventually_iterator_; |
| 442 break; | 454 break; |
| 443 } | 455 } |
| 444 return *this; | 456 return *this; |
| 445 } | 457 } |
| 446 | 458 |
| 447 } // namespace cc | 459 } // namespace cc |
| OLD | NEW |