Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: cc/tiles/tiling_set_raster_queue_all.cc

Issue 2067213002: cc: Implement tile iteration order based on pyramid sequence. [old] Base URL: https://chromium.googlesource.com/chromium/src.git@tiling_data_fix
Patch Set: for review Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 TilingData* tiling_data) 356 TilingData* tiling_data)
357 : tiling_(tiling), tiling_data_(tiling_data), phase_(Phase::VISIBLE_RECT) { 357 : tiling_(tiling), tiling_data_(tiling_data), phase_(Phase::VISIBLE_RECT) {
358 visible_iterator_ = VisibleTilingIterator(tiling_, tiling_data_); 358 visible_iterator_ = VisibleTilingIterator(tiling_, tiling_data_);
359 if (visible_iterator_.done()) { 359 if (visible_iterator_.done()) {
360 AdvancePhase(); 360 AdvancePhase();
361 return; 361 return;
362 } 362 }
363 current_tile_ = *visible_iterator_; 363 current_tile_ = *visible_iterator_;
364 } 364 }
365 365
366 TilingSetRasterQueueAll::TilingIterator::TilingIterator(
367 const TilingSetRasterQueueAll::TilingIterator& other) = default;
368
369 TilingSetRasterQueueAll::TilingIterator::TilingIterator(
370 TilingSetRasterQueueAll::TilingIterator&& other) = default;
371
366 TilingSetRasterQueueAll::TilingIterator::~TilingIterator() { 372 TilingSetRasterQueueAll::TilingIterator::~TilingIterator() {
367 } 373 }
368 374
375 TilingSetRasterQueueAll::TilingIterator&
376 TilingSetRasterQueueAll::TilingIterator::operator=(
377 const TilingSetRasterQueueAll::TilingIterator& other) = default;
378
379 TilingSetRasterQueueAll::TilingIterator&
380 TilingSetRasterQueueAll::TilingIterator::operator=(
381 TilingSetRasterQueueAll::TilingIterator&& other) = default;
382
369 void TilingSetRasterQueueAll::TilingIterator::AdvancePhase() { 383 void TilingSetRasterQueueAll::TilingIterator::AdvancePhase() {
370 DCHECK_LT(phase_, Phase::EVENTUALLY_RECT); 384 DCHECK_LT(phase_, Phase::EVENTUALLY_RECT);
371 385
372 current_tile_ = PrioritizedTile(); 386 current_tile_ = PrioritizedTile();
373 while (!current_tile_.tile() && phase_ < Phase::EVENTUALLY_RECT) { 387 while (!current_tile_.tile() && phase_ < Phase::EVENTUALLY_RECT) {
374 phase_ = static_cast<Phase>(phase_ + 1); 388 phase_ = static_cast<Phase>(phase_ + 1);
375 switch (phase_) { 389 switch (phase_) {
376 case Phase::VISIBLE_RECT: 390 case Phase::VISIBLE_RECT:
377 NOTREACHED(); 391 NOTREACHED();
378 return; 392 return;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 current_tile_ = PrioritizedTile(); 457 current_tile_ = PrioritizedTile();
444 return *this; 458 return *this;
445 } 459 }
446 current_tile_ = *eventually_iterator_; 460 current_tile_ = *eventually_iterator_;
447 break; 461 break;
448 } 462 }
449 return *this; 463 return *this;
450 } 464 }
451 465
452 } // namespace cc 466 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698