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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 } | 141 } |
142 } | 142 } |
143 | 143 |
144 // OnePriorityRectIterator | 144 // OnePriorityRectIterator |
145 TilingSetRasterQueueAll::OnePriorityRectIterator::OnePriorityRectIterator() | 145 TilingSetRasterQueueAll::OnePriorityRectIterator::OnePriorityRectIterator() |
146 : tiling_(nullptr), tiling_data_(nullptr) { | 146 : tiling_(nullptr), tiling_data_(nullptr) { |
147 } | 147 } |
148 | 148 |
149 TilingSetRasterQueueAll::OnePriorityRectIterator::OnePriorityRectIterator( | 149 TilingSetRasterQueueAll::OnePriorityRectIterator::OnePriorityRectIterator( |
150 PictureLayerTiling* tiling, | 150 PictureLayerTiling* tiling, |
151 TilingData* tiling_data) | 151 TilingData* tiling_data, |
152 : tiling_(tiling), tiling_data_(tiling_data) { | 152 PictureLayerTiling::PriorityRectType priority_rect_type) |
| 153 : tiling_(tiling), |
| 154 tiling_data_(tiling_data), |
| 155 priority_rect_type_(priority_rect_type) { |
153 } | 156 } |
154 | 157 |
155 template <typename TilingIteratorType> | 158 template <typename TilingIteratorType> |
156 void TilingSetRasterQueueAll::OnePriorityRectIterator::AdvanceToNextTile( | 159 void TilingSetRasterQueueAll::OnePriorityRectIterator::AdvanceToNextTile( |
157 TilingIteratorType* iterator) { | 160 TilingIteratorType* iterator) { |
158 current_tile_ = PrioritizedTile(); | 161 bool found_tile = false; |
159 Tile* tile = nullptr; | 162 while (!found_tile) { |
160 while (!tile || !TileNeedsRaster(tile)) { | |
161 ++(*iterator); | 163 ++(*iterator); |
162 if (!(*iterator)) { | 164 if (!(*iterator)) { |
163 return; | 165 current_tile_ = PrioritizedTile(); |
| 166 break; |
164 } | 167 } |
165 tile = tiling_->TileAt(iterator->index_x(), iterator->index_y()); | 168 found_tile = GetFirstTileAndCheckIfValid(iterator); |
166 } | 169 } |
167 tiling_->UpdateRequiredStatesOnTile(tile); | |
168 current_tile_ = tiling_->MakePrioritizedTile(tile); | |
169 } | 170 } |
170 | 171 |
171 template <typename TilingIteratorType> | 172 template <typename TilingIteratorType> |
172 bool TilingSetRasterQueueAll::OnePriorityRectIterator:: | 173 bool TilingSetRasterQueueAll::OnePriorityRectIterator:: |
173 GetFirstTileAndCheckIfValid(TilingIteratorType* iterator) { | 174 GetFirstTileAndCheckIfValid(TilingIteratorType* iterator) { |
174 Tile* tile = tiling_->TileAt(iterator->index_x(), iterator->index_y()); | 175 Tile* tile = tiling_->TileAt(iterator->index_x(), iterator->index_y()); |
175 if (!tile || !TileNeedsRaster(tile)) { | 176 if (!tile || !TileNeedsRaster(tile)) { |
176 current_tile_ = PrioritizedTile(); | 177 current_tile_ = PrioritizedTile(); |
177 return false; | 178 return false; |
178 } | 179 } |
| 180 // After the pending visible rect has been processed, we must return false |
| 181 // for pending visible rect tiles as tiling iterators do not ignore those |
| 182 // tiles. |
| 183 if (priority_rect_type_ > PictureLayerTiling::PENDING_VISIBLE_RECT && |
| 184 tiling_->pending_visible_rect().Intersects(tile->content_rect())) { |
| 185 current_tile_ = PrioritizedTile(); |
| 186 return false; |
| 187 } |
179 tiling_->UpdateRequiredStatesOnTile(tile); | 188 tiling_->UpdateRequiredStatesOnTile(tile); |
180 current_tile_ = tiling_->MakePrioritizedTile(tile); | 189 current_tile_ = tiling_->MakePrioritizedTile(tile, priority_rect_type_); |
181 return true; | 190 return true; |
182 } | 191 } |
183 | 192 |
184 // VisibleTilingIterator. | 193 // VisibleTilingIterator. |
185 TilingSetRasterQueueAll::VisibleTilingIterator::VisibleTilingIterator( | 194 TilingSetRasterQueueAll::VisibleTilingIterator::VisibleTilingIterator( |
186 PictureLayerTiling* tiling, | 195 PictureLayerTiling* tiling, |
187 TilingData* tiling_data) | 196 TilingData* tiling_data) |
188 : OnePriorityRectIterator(tiling, tiling_data) { | 197 : OnePriorityRectIterator(tiling, |
| 198 tiling_data, |
| 199 PictureLayerTiling::VISIBLE_RECT) { |
189 if (!tiling_->has_visible_rect_tiles()) | 200 if (!tiling_->has_visible_rect_tiles()) |
190 return; | 201 return; |
191 iterator_ = | 202 iterator_ = |
192 TilingData::Iterator(tiling_data_, tiling_->current_visible_rect(), | 203 TilingData::Iterator(tiling_data_, tiling_->current_visible_rect(), |
193 false /* include_borders */); | 204 false /* include_borders */); |
194 if (!iterator_) | 205 if (!iterator_) |
195 return; | 206 return; |
196 if (!GetFirstTileAndCheckIfValid(&iterator_)) | 207 if (!GetFirstTileAndCheckIfValid(&iterator_)) |
197 ++(*this); | 208 ++(*this); |
198 } | 209 } |
199 | 210 |
200 TilingSetRasterQueueAll::VisibleTilingIterator& | 211 TilingSetRasterQueueAll::VisibleTilingIterator& |
201 TilingSetRasterQueueAll::VisibleTilingIterator:: | 212 TilingSetRasterQueueAll::VisibleTilingIterator:: |
202 operator++() { | 213 operator++() { |
203 AdvanceToNextTile(&iterator_); | 214 AdvanceToNextTile(&iterator_); |
204 return *this; | 215 return *this; |
205 } | 216 } |
206 | 217 |
207 // PendingVisibleTilingIterator. | 218 // PendingVisibleTilingIterator. |
208 TilingSetRasterQueueAll::PendingVisibleTilingIterator:: | 219 TilingSetRasterQueueAll::PendingVisibleTilingIterator:: |
209 PendingVisibleTilingIterator(PictureLayerTiling* tiling, | 220 PendingVisibleTilingIterator(PictureLayerTiling* tiling, |
210 TilingData* tiling_data) | 221 TilingData* tiling_data) |
211 : OnePriorityRectIterator(tiling, tiling_data) { | 222 : OnePriorityRectIterator(tiling, |
| 223 tiling_data, |
| 224 PictureLayerTiling::PENDING_VISIBLE_RECT) { |
212 iterator_ = TilingData::DifferenceIterator(tiling_data_, | 225 iterator_ = TilingData::DifferenceIterator(tiling_data_, |
213 tiling_->pending_visible_rect(), | 226 tiling_->pending_visible_rect(), |
214 tiling_->current_visible_rect()); | 227 tiling_->current_visible_rect()); |
215 if (!iterator_) | 228 if (!iterator_) |
216 return; | 229 return; |
217 if (!GetFirstTileAndCheckIfValid(&iterator_)) | 230 if (!GetFirstTileAndCheckIfValid(&iterator_)) |
218 ++(*this); | 231 ++(*this); |
219 } | 232 } |
220 | 233 |
221 TilingSetRasterQueueAll::PendingVisibleTilingIterator& | 234 TilingSetRasterQueueAll::PendingVisibleTilingIterator& |
222 TilingSetRasterQueueAll::PendingVisibleTilingIterator:: | 235 TilingSetRasterQueueAll::PendingVisibleTilingIterator:: |
223 operator++() { | 236 operator++() { |
224 AdvanceToNextTile(&iterator_); | 237 AdvanceToNextTile(&iterator_); |
225 return *this; | 238 return *this; |
226 } | 239 } |
227 | 240 |
228 // SkewportTilingIterator. | 241 // SkewportTilingIterator. |
229 TilingSetRasterQueueAll::SkewportTilingIterator::SkewportTilingIterator( | 242 TilingSetRasterQueueAll::SkewportTilingIterator::SkewportTilingIterator( |
230 PictureLayerTiling* tiling, | 243 PictureLayerTiling* tiling, |
231 TilingData* tiling_data) | 244 TilingData* tiling_data) |
232 : OnePriorityRectIterator(tiling, tiling_data), | 245 : OnePriorityRectIterator(tiling, |
| 246 tiling_data, |
| 247 PictureLayerTiling::SKEWPORT_RECT), |
233 pending_visible_rect_(tiling->pending_visible_rect()) { | 248 pending_visible_rect_(tiling->pending_visible_rect()) { |
234 if (!tiling_->has_skewport_rect_tiles()) | 249 if (!tiling_->has_skewport_rect_tiles()) |
235 return; | 250 return; |
236 iterator_ = TilingData::SpiralDifferenceIterator( | 251 iterator_ = TilingData::SpiralDifferenceIterator( |
237 tiling_data_, tiling_->current_skewport_rect(), | 252 tiling_data_, tiling_->current_skewport_rect(), |
238 tiling_->current_visible_rect(), tiling_->current_visible_rect()); | 253 tiling_->current_visible_rect(), tiling_->current_visible_rect()); |
239 if (!iterator_) | 254 if (!iterator_) |
240 return; | 255 return; |
241 if (!GetFirstTileAndCheckIfValid(&iterator_)) { | 256 if (!GetFirstTileAndCheckIfValid(&iterator_)) { |
242 ++(*this); | 257 ++(*this); |
243 return; | 258 return; |
244 } | 259 } |
| 260 // TODO(e_hakkinen): This is not needed as GetFirstTileAndCheckIfValid |
| 261 // does the same checking. |
245 if (current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) | 262 if (current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) |
246 ++(*this); | 263 ++(*this); |
247 } | 264 } |
248 | 265 |
249 TilingSetRasterQueueAll::SkewportTilingIterator& | 266 TilingSetRasterQueueAll::SkewportTilingIterator& |
250 TilingSetRasterQueueAll::SkewportTilingIterator:: | 267 TilingSetRasterQueueAll::SkewportTilingIterator:: |
251 operator++() { | 268 operator++() { |
252 AdvanceToNextTile(&iterator_); | 269 AdvanceToNextTile(&iterator_); |
| 270 // TODO(e_hakkinen): This is not needed as GetFirstTileAndCheckIfValid called |
| 271 // by AdvanceToNextTile does the same checking. |
253 while (!done()) { | 272 while (!done()) { |
254 if (!current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) | 273 if (!current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) |
255 break; | 274 break; |
256 AdvanceToNextTile(&iterator_); | 275 AdvanceToNextTile(&iterator_); |
257 } | 276 } |
258 return *this; | 277 return *this; |
259 } | 278 } |
260 | 279 |
261 // SoonBorderTilingIterator. | 280 // SoonBorderTilingIterator. |
262 TilingSetRasterQueueAll::SoonBorderTilingIterator::SoonBorderTilingIterator( | 281 TilingSetRasterQueueAll::SoonBorderTilingIterator::SoonBorderTilingIterator( |
263 PictureLayerTiling* tiling, | 282 PictureLayerTiling* tiling, |
264 TilingData* tiling_data) | 283 TilingData* tiling_data) |
265 : OnePriorityRectIterator(tiling, tiling_data), | 284 : OnePriorityRectIterator(tiling, |
| 285 tiling_data, |
| 286 PictureLayerTiling::SOON_BORDER_RECT), |
266 pending_visible_rect_(tiling->pending_visible_rect()) { | 287 pending_visible_rect_(tiling->pending_visible_rect()) { |
267 if (!tiling_->has_soon_border_rect_tiles()) | 288 if (!tiling_->has_soon_border_rect_tiles()) |
268 return; | 289 return; |
269 iterator_ = TilingData::SpiralDifferenceIterator( | 290 iterator_ = TilingData::SpiralDifferenceIterator( |
270 tiling_data_, tiling_->current_soon_border_rect(), | 291 tiling_data_, tiling_->current_soon_border_rect(), |
271 tiling_->current_skewport_rect(), tiling_->current_visible_rect()); | 292 tiling_->current_skewport_rect(), tiling_->current_visible_rect()); |
272 if (!iterator_) | 293 if (!iterator_) |
273 return; | 294 return; |
274 if (!GetFirstTileAndCheckIfValid(&iterator_)) { | 295 if (!GetFirstTileAndCheckIfValid(&iterator_)) { |
275 ++(*this); | 296 ++(*this); |
276 return; | 297 return; |
277 } | 298 } |
| 299 // TODO(e_hakkinen): This is not needed as GetFirstTileAndCheckIfValid |
| 300 // does the same checking. |
278 if (current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) | 301 if (current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) |
279 ++(*this); | 302 ++(*this); |
280 } | 303 } |
281 | 304 |
282 TilingSetRasterQueueAll::SoonBorderTilingIterator& | 305 TilingSetRasterQueueAll::SoonBorderTilingIterator& |
283 TilingSetRasterQueueAll::SoonBorderTilingIterator:: | 306 TilingSetRasterQueueAll::SoonBorderTilingIterator:: |
284 operator++() { | 307 operator++() { |
285 AdvanceToNextTile(&iterator_); | 308 AdvanceToNextTile(&iterator_); |
| 309 // TODO(e_hakkinen): This is not needed as GetFirstTileAndCheckIfValid called |
| 310 // by AdvanceToNextTile does the same checking. |
286 while (!done()) { | 311 while (!done()) { |
287 if (!current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) | 312 if (!current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) |
288 break; | 313 break; |
289 AdvanceToNextTile(&iterator_); | 314 AdvanceToNextTile(&iterator_); |
290 } | 315 } |
291 return *this; | 316 return *this; |
292 } | 317 } |
293 | 318 |
294 // EventuallyTilingIterator. | 319 // EventuallyTilingIterator. |
295 TilingSetRasterQueueAll::EventuallyTilingIterator::EventuallyTilingIterator( | 320 TilingSetRasterQueueAll::EventuallyTilingIterator::EventuallyTilingIterator( |
296 PictureLayerTiling* tiling, | 321 PictureLayerTiling* tiling, |
297 TilingData* tiling_data) | 322 TilingData* tiling_data) |
298 : OnePriorityRectIterator(tiling, tiling_data), | 323 : OnePriorityRectIterator(tiling, |
| 324 tiling_data, |
| 325 PictureLayerTiling::EVENTUALLY_RECT), |
299 pending_visible_rect_(tiling->pending_visible_rect()) { | 326 pending_visible_rect_(tiling->pending_visible_rect()) { |
300 if (!tiling_->has_eventually_rect_tiles()) | 327 if (!tiling_->has_eventually_rect_tiles()) |
301 return; | 328 return; |
302 iterator_ = TilingData::SpiralDifferenceIterator( | 329 iterator_ = TilingData::SpiralDifferenceIterator( |
303 tiling_data_, tiling_->current_eventually_rect(), | 330 tiling_data_, tiling_->current_eventually_rect(), |
304 tiling_->current_skewport_rect(), tiling_->current_soon_border_rect()); | 331 tiling_->current_skewport_rect(), tiling_->current_soon_border_rect()); |
305 if (!iterator_) | 332 if (!iterator_) |
306 return; | 333 return; |
307 if (!GetFirstTileAndCheckIfValid(&iterator_)) { | 334 if (!GetFirstTileAndCheckIfValid(&iterator_)) { |
308 ++(*this); | 335 ++(*this); |
309 return; | 336 return; |
310 } | 337 } |
| 338 // TODO(e_hakkinen): This is not needed as GetFirstTileAndCheckIfValid |
| 339 // does the same checking. |
311 if (current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) | 340 if (current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) |
312 ++(*this); | 341 ++(*this); |
313 } | 342 } |
314 | 343 |
315 TilingSetRasterQueueAll::EventuallyTilingIterator& | 344 TilingSetRasterQueueAll::EventuallyTilingIterator& |
316 TilingSetRasterQueueAll::EventuallyTilingIterator:: | 345 TilingSetRasterQueueAll::EventuallyTilingIterator:: |
317 operator++() { | 346 operator++() { |
318 AdvanceToNextTile(&iterator_); | 347 AdvanceToNextTile(&iterator_); |
| 348 // TODO(e_hakkinen): This is not needed as GetFirstTileAndCheckIfValid called |
| 349 // by AdvanceToNextTile does the same checking. |
319 while (!done()) { | 350 while (!done()) { |
320 if (!current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) | 351 if (!current_tile_.tile()->content_rect().Intersects(pending_visible_rect_)) |
321 break; | 352 break; |
322 AdvanceToNextTile(&iterator_); | 353 AdvanceToNextTile(&iterator_); |
323 } | 354 } |
324 return *this; | 355 return *this; |
325 } | 356 } |
326 | 357 |
327 // TilingIterator | 358 // TilingIterator |
328 TilingSetRasterQueueAll::TilingIterator::TilingIterator() : tiling_(nullptr) { | 359 TilingSetRasterQueueAll::TilingIterator::TilingIterator() : tiling_(nullptr) { |
329 } | 360 } |
330 | 361 |
331 TilingSetRasterQueueAll::TilingIterator::TilingIterator( | 362 TilingSetRasterQueueAll::TilingIterator::TilingIterator( |
332 PictureLayerTiling* tiling, | 363 PictureLayerTiling* tiling, |
333 TilingData* tiling_data) | 364 TilingData* tiling_data) |
334 : tiling_(tiling), tiling_data_(tiling_data), phase_(VISIBLE_RECT) { | 365 : tiling_(tiling), tiling_data_(tiling_data), phase_(Phase::VISIBLE_RECT) { |
335 visible_iterator_ = VisibleTilingIterator(tiling_, tiling_data_); | 366 visible_iterator_ = VisibleTilingIterator(tiling_, tiling_data_); |
336 if (visible_iterator_.done()) { | 367 if (visible_iterator_.done()) { |
337 AdvancePhase(); | 368 AdvancePhase(); |
338 return; | 369 return; |
339 } | 370 } |
340 current_tile_ = *visible_iterator_; | 371 current_tile_ = *visible_iterator_; |
341 } | 372 } |
342 | 373 |
343 TilingSetRasterQueueAll::TilingIterator::~TilingIterator() { | 374 TilingSetRasterQueueAll::TilingIterator::~TilingIterator() { |
344 } | 375 } |
345 | 376 |
346 void TilingSetRasterQueueAll::TilingIterator::AdvancePhase() { | 377 void TilingSetRasterQueueAll::TilingIterator::AdvancePhase() { |
347 DCHECK_LT(phase_, EVENTUALLY_RECT); | 378 DCHECK_LT(phase_, Phase::EVENTUALLY_RECT); |
348 | 379 |
349 current_tile_ = PrioritizedTile(); | 380 current_tile_ = PrioritizedTile(); |
350 while (!current_tile_.tile() && phase_ < EVENTUALLY_RECT) { | 381 while (!current_tile_.tile() && phase_ < Phase::EVENTUALLY_RECT) { |
351 phase_ = static_cast<Phase>(phase_ + 1); | 382 phase_ = static_cast<Phase>(phase_ + 1); |
352 switch (phase_) { | 383 switch (phase_) { |
353 case VISIBLE_RECT: | 384 case Phase::VISIBLE_RECT: |
354 NOTREACHED(); | 385 NOTREACHED(); |
355 return; | 386 return; |
356 case PENDING_VISIBLE_RECT: | 387 case Phase::PENDING_VISIBLE_RECT: |
357 pending_visible_iterator_ = | 388 pending_visible_iterator_ = |
358 PendingVisibleTilingIterator(tiling_, tiling_data_); | 389 PendingVisibleTilingIterator(tiling_, tiling_data_); |
359 if (!pending_visible_iterator_.done()) | 390 if (!pending_visible_iterator_.done()) |
360 current_tile_ = *pending_visible_iterator_; | 391 current_tile_ = *pending_visible_iterator_; |
361 break; | 392 break; |
362 case SKEWPORT_RECT: | 393 case Phase::SKEWPORT_RECT: |
363 skewport_iterator_ = SkewportTilingIterator(tiling_, tiling_data_); | 394 skewport_iterator_ = SkewportTilingIterator(tiling_, tiling_data_); |
364 if (!skewport_iterator_.done()) | 395 if (!skewport_iterator_.done()) |
365 current_tile_ = *skewport_iterator_; | 396 current_tile_ = *skewport_iterator_; |
366 break; | 397 break; |
367 case SOON_BORDER_RECT: | 398 case Phase::SOON_BORDER_RECT: |
368 soon_border_iterator_ = SoonBorderTilingIterator(tiling_, tiling_data_); | 399 soon_border_iterator_ = SoonBorderTilingIterator(tiling_, tiling_data_); |
369 if (!soon_border_iterator_.done()) | 400 if (!soon_border_iterator_.done()) |
370 current_tile_ = *soon_border_iterator_; | 401 current_tile_ = *soon_border_iterator_; |
371 break; | 402 break; |
372 case EVENTUALLY_RECT: | 403 case Phase::EVENTUALLY_RECT: |
373 eventually_iterator_ = EventuallyTilingIterator(tiling_, tiling_data_); | 404 eventually_iterator_ = EventuallyTilingIterator(tiling_, tiling_data_); |
374 if (!eventually_iterator_.done()) | 405 if (!eventually_iterator_.done()) |
375 current_tile_ = *eventually_iterator_; | 406 current_tile_ = *eventually_iterator_; |
376 break; | 407 break; |
377 } | 408 } |
378 } | 409 } |
379 } | 410 } |
380 | 411 |
381 TilingSetRasterQueueAll::TilingIterator& | 412 TilingSetRasterQueueAll::TilingIterator& |
382 TilingSetRasterQueueAll::TilingIterator:: | 413 TilingSetRasterQueueAll::TilingIterator:: |
383 operator++() { | 414 operator++() { |
384 switch (phase_) { | 415 switch (phase_) { |
385 case VISIBLE_RECT: | 416 case Phase::VISIBLE_RECT: |
386 ++visible_iterator_; | 417 ++visible_iterator_; |
387 if (visible_iterator_.done()) { | 418 if (visible_iterator_.done()) { |
388 AdvancePhase(); | 419 AdvancePhase(); |
389 return *this; | 420 return *this; |
390 } | 421 } |
391 current_tile_ = *visible_iterator_; | 422 current_tile_ = *visible_iterator_; |
392 break; | 423 break; |
393 case PENDING_VISIBLE_RECT: | 424 case Phase::PENDING_VISIBLE_RECT: |
394 ++pending_visible_iterator_; | 425 ++pending_visible_iterator_; |
395 if (pending_visible_iterator_.done()) { | 426 if (pending_visible_iterator_.done()) { |
396 AdvancePhase(); | 427 AdvancePhase(); |
397 return *this; | 428 return *this; |
398 } | 429 } |
399 current_tile_ = *pending_visible_iterator_; | 430 current_tile_ = *pending_visible_iterator_; |
400 break; | 431 break; |
401 case SKEWPORT_RECT: | 432 case Phase::SKEWPORT_RECT: |
402 ++skewport_iterator_; | 433 ++skewport_iterator_; |
403 if (skewport_iterator_.done()) { | 434 if (skewport_iterator_.done()) { |
404 AdvancePhase(); | 435 AdvancePhase(); |
405 return *this; | 436 return *this; |
406 } | 437 } |
407 current_tile_ = *skewport_iterator_; | 438 current_tile_ = *skewport_iterator_; |
408 break; | 439 break; |
409 case SOON_BORDER_RECT: | 440 case Phase::SOON_BORDER_RECT: |
410 ++soon_border_iterator_; | 441 ++soon_border_iterator_; |
411 if (soon_border_iterator_.done()) { | 442 if (soon_border_iterator_.done()) { |
412 AdvancePhase(); | 443 AdvancePhase(); |
413 return *this; | 444 return *this; |
414 } | 445 } |
415 current_tile_ = *soon_border_iterator_; | 446 current_tile_ = *soon_border_iterator_; |
416 break; | 447 break; |
417 case EVENTUALLY_RECT: | 448 case Phase::EVENTUALLY_RECT: |
418 ++eventually_iterator_; | 449 ++eventually_iterator_; |
419 if (eventually_iterator_.done()) { | 450 if (eventually_iterator_.done()) { |
420 current_tile_ = PrioritizedTile(); | 451 current_tile_ = PrioritizedTile(); |
421 return *this; | 452 return *this; |
422 } | 453 } |
423 current_tile_ = *eventually_iterator_; | 454 current_tile_ = *eventually_iterator_; |
424 break; | 455 break; |
425 } | 456 } |
426 return *this; | 457 return *this; |
427 } | 458 } |
428 | 459 |
429 } // namespace cc | 460 } // namespace cc |
OLD | NEW |