| 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_required.h" | 5 #include "cc/tiles/tiling_set_raster_queue_required.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 TilingData::Iterator(tiling_data_, rect, false /* include_borders */); | 98 TilingData::Iterator(tiling_data_, rect, false /* include_borders */); |
| 99 if (!visible_iterator_) | 99 if (!visible_iterator_) |
| 100 return; | 100 return; |
| 101 | 101 |
| 102 Tile* tile = | 102 Tile* tile = |
| 103 tiling_->TileAt(visible_iterator_.index_x(), visible_iterator_.index_y()); | 103 tiling_->TileAt(visible_iterator_.index_x(), visible_iterator_.index_y()); |
| 104 // If this is a valid tile, return it. Note that we have to use a tiling check | 104 // If this is a valid tile, return it. Note that we have to use a tiling check |
| 105 // for occlusion, since the tile's internal state has not yet been updated. | 105 // for occlusion, since the tile's internal state has not yet been updated. |
| 106 if (tile && tile->draw_info().NeedsRaster() && | 106 if (tile && tile->draw_info().NeedsRaster() && |
| 107 !tiling_->IsTileOccluded(tile)) { | 107 !tiling_->IsTileOccluded(tile)) { |
| 108 tiling_->UpdateRequiredStatesOnTile(tile); | |
| 109 current_tile_ = tiling_->MakePrioritizedTile( | 108 current_tile_ = tiling_->MakePrioritizedTile( |
| 110 tile, tiling_->ComputePriorityRectTypeForTile(tile)); | 109 tile, tiling_->ComputePriorityRectTypeForTile(tile)); |
| 111 return; | 110 return; |
| 112 } | 111 } |
| 113 ++(*this); | 112 ++(*this); |
| 114 } | 113 } |
| 115 | 114 |
| 116 TilingSetRasterQueueRequired::TilingIterator::~TilingIterator() { | 115 TilingSetRasterQueueRequired::TilingIterator::~TilingIterator() { |
| 117 } | 116 } |
| 118 | 117 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 138 // (by UpdateTilePriority). The tiling check does not rely on tile's | 137 // (by UpdateTilePriority). The tiling check does not rely on tile's |
| 139 // internal state (it is, in fact, used to determine the tile's state). | 138 // internal state (it is, in fact, used to determine the tile's state). |
| 140 if (tiling_->IsTileOccluded(tile)) | 139 if (tiling_->IsTileOccluded(tile)) |
| 141 continue; | 140 continue; |
| 142 | 141 |
| 143 // If we get here, that means we have a valid tile that needs raster and is | 142 // If we get here, that means we have a valid tile that needs raster and is |
| 144 // in the NOW bin, which means that it can be required. | 143 // in the NOW bin, which means that it can be required. |
| 145 break; | 144 break; |
| 146 } | 145 } |
| 147 | 146 |
| 148 tiling_->UpdateRequiredStatesOnTile(tile); | |
| 149 current_tile_ = tiling_->MakePrioritizedTile( | 147 current_tile_ = tiling_->MakePrioritizedTile( |
| 150 tile, tiling_->ComputePriorityRectTypeForTile(tile)); | 148 tile, tiling_->ComputePriorityRectTypeForTile(tile)); |
| 151 return *this; | 149 return *this; |
| 152 } | 150 } |
| 153 | 151 |
| 154 } // namespace cc | 152 } // namespace cc |
| OLD | NEW |