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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 current_tile_ = tiling_->MakePrioritizedTile( | 108 current_tile_ = tiling_->MakePrioritizedTile( |
109 tile, tiling_->ComputePriorityRectTypeForTile(tile)); | 109 tile, tiling_->ComputePriorityRectTypeForTile(tile)); |
110 return; | 110 return; |
111 } | 111 } |
112 ++(*this); | 112 ++(*this); |
113 } | 113 } |
114 | 114 |
| 115 TilingSetRasterQueueRequired::TilingIterator::TilingIterator( |
| 116 const TilingSetRasterQueueRequired::TilingIterator& other) = default; |
| 117 |
| 118 TilingSetRasterQueueRequired::TilingIterator::TilingIterator( |
| 119 TilingSetRasterQueueRequired::TilingIterator&& other) = default; |
| 120 |
115 TilingSetRasterQueueRequired::TilingIterator::~TilingIterator() { | 121 TilingSetRasterQueueRequired::TilingIterator::~TilingIterator() { |
116 } | 122 } |
117 | 123 |
118 TilingSetRasterQueueRequired::TilingIterator& | 124 TilingSetRasterQueueRequired::TilingIterator& |
119 TilingSetRasterQueueRequired::TilingIterator:: | 125 TilingSetRasterQueueRequired::TilingIterator::operator=( |
120 operator++() { | 126 const TilingSetRasterQueueRequired::TilingIterator& other) = default; |
| 127 |
| 128 TilingSetRasterQueueRequired::TilingIterator& |
| 129 TilingSetRasterQueueRequired::TilingIterator::operator=( |
| 130 TilingSetRasterQueueRequired::TilingIterator&& other) = default; |
| 131 |
| 132 TilingSetRasterQueueRequired::TilingIterator& |
| 133 TilingSetRasterQueueRequired::TilingIterator::operator++() { |
121 Tile* tile = nullptr; | 134 Tile* tile = nullptr; |
122 while (true) { | 135 while (true) { |
123 ++visible_iterator_; | 136 ++visible_iterator_; |
124 if (!visible_iterator_) { | 137 if (!visible_iterator_) { |
125 current_tile_ = PrioritizedTile(); | 138 current_tile_ = PrioritizedTile(); |
126 return *this; | 139 return *this; |
127 } | 140 } |
128 std::pair<int, int> next_index = visible_iterator_.index(); | 141 std::pair<int, int> next_index = visible_iterator_.index(); |
129 tile = tiling_->TileAt(next_index.first, next_index.second); | 142 tile = tiling_->TileAt(next_index.first, next_index.second); |
130 // If the tile doesn't exist or if it exists but doesn't need raster work, | 143 // If the tile doesn't exist or if it exists but doesn't need raster work, |
(...skipping 12 matching lines...) Expand all Loading... |
143 // in the NOW bin, which means that it can be required. | 156 // in the NOW bin, which means that it can be required. |
144 break; | 157 break; |
145 } | 158 } |
146 | 159 |
147 current_tile_ = tiling_->MakePrioritizedTile( | 160 current_tile_ = tiling_->MakePrioritizedTile( |
148 tile, tiling_->ComputePriorityRectTypeForTile(tile)); | 161 tile, tiling_->ComputePriorityRectTypeForTile(tile)); |
149 return *this; | 162 return *this; |
150 } | 163 } |
151 | 164 |
152 } // namespace cc | 165 } // namespace cc |
OLD | NEW |