| Index: cc/layers/picture_layer_impl.cc
|
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
|
| index 6d8914033e1d43802052d9f9302bb656a1b9e657..fe58d2a618996b479f3875eeea91d85dd4441f85 100644
|
| --- a/cc/layers/picture_layer_impl.cc
|
| +++ b/cc/layers/picture_layer_impl.cc
|
| @@ -1567,6 +1567,7 @@ void PictureLayerImpl::LayerRasterTileIterator::AdvanceToNextStage() {
|
| PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator()
|
| : layer_(nullptr),
|
| tree_priority_(SAME_PRIORITY_FOR_BOTH_TREES),
|
| + layer_has_twin_layer_(false),
|
| current_category_(PictureLayerTiling::EVENTUALLY),
|
| current_tiling_range_type_(PictureLayerTilingSet::HIGHER_THAN_HIGH_RES),
|
| current_tiling_(0u) {
|
| @@ -1577,6 +1578,7 @@ PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator(
|
| TreePriority tree_priority)
|
| : layer_(layer),
|
| tree_priority_(tree_priority),
|
| + layer_has_twin_layer_(!!layer->GetPendingOrActiveTwinLayer()),
|
| current_category_(PictureLayerTiling::EVENTUALLY),
|
| current_tiling_range_type_(PictureLayerTilingSet::HIGHER_THAN_HIGH_RES),
|
| current_tiling_(0u) {
|
| @@ -1590,9 +1592,8 @@ PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator(
|
| break;
|
|
|
| current_iterator_ = PictureLayerTiling::TilingEvictionTileIterator(
|
| - layer_->tilings_->tiling_at(CurrentTilingIndex()),
|
| - tree_priority,
|
| - current_category_);
|
| + layer_->tilings_->tiling_at(CurrentTilingIndex()), tree_priority,
|
| + current_category_, layer_has_twin_layer_);
|
| } while (!current_iterator_);
|
| }
|
|
|
| @@ -1619,9 +1620,8 @@ operator++() {
|
| break;
|
|
|
| current_iterator_ = PictureLayerTiling::TilingEvictionTileIterator(
|
| - layer_->tilings_->tiling_at(CurrentTilingIndex()),
|
| - tree_priority_,
|
| - current_category_);
|
| + layer_->tilings_->tiling_at(CurrentTilingIndex()), tree_priority_,
|
| + current_category_, layer_has_twin_layer_);
|
| }
|
| return *this;
|
| }
|
| @@ -1633,10 +1633,15 @@ PictureLayerImpl::LayerEvictionTileIterator::operator bool() const {
|
| bool PictureLayerImpl::LayerEvictionTileIterator::AdvanceToNextCategory() {
|
| switch (current_category_) {
|
| case PictureLayerTiling::EVENTUALLY:
|
| + if (!layer_->HasValidTilePriorities() &&
|
| + layer_->GetTree() == PENDING_TREE)
|
| + return false;
|
| current_category_ =
|
| PictureLayerTiling::EVENTUALLY_AND_REQUIRED_FOR_ACTIVATION;
|
| return true;
|
| case PictureLayerTiling::EVENTUALLY_AND_REQUIRED_FOR_ACTIVATION:
|
| + if (!layer_->HasValidTilePriorities())
|
| + return false;
|
| current_category_ = PictureLayerTiling::SOON;
|
| return true;
|
| case PictureLayerTiling::SOON:
|
|
|