| Index: cc/resources/picture_layer_tiling.cc
|
| diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
|
| index d2a732d9eb985e12d15a71405dde751458eb14b2..fc33acf5eb7356e60aa0db5e46af3e95c2d3a718 100644
|
| --- a/cc/resources/picture_layer_tiling.cc
|
| +++ b/cc/resources/picture_layer_tiling.cc
|
| @@ -772,6 +772,8 @@ void PictureLayerTiling::UpdateEvictionCacheIfNeeded(
|
| eviction_tiles_cache_.clear();
|
| eviction_tiles_cache_.reserve(tiles_.size());
|
| for (TileMap::iterator it = tiles_.begin(); it != tiles_.end(); ++it) {
|
| + DCHECK(it->second);
|
| +
|
| // TODO(vmpstr): This should update the priority if UpdateTilePriorities
|
| // changes not to do this.
|
| eviction_tiles_cache_.push_back(it->second);
|
| @@ -818,6 +820,21 @@ PictureLayerTiling::TilingRasterTileIterator::TilingRasterTileIterator(
|
|
|
| PictureLayerTiling::TilingRasterTileIterator::~TilingRasterTileIterator() {}
|
|
|
| +bool
|
| +PictureLayerTiling::TilingRasterTileIterator::HasTilesRequiredForActivation()
|
| + const {
|
| + if (!*this || get_type() != TilePriority::NOW)
|
| + return false;
|
| +
|
| + for (TilingData::Iterator it = visible_iterator_; it; ++it) {
|
| + std::pair<int, int> next_index = visible_iterator_.index();
|
| + Tile* tile = tiling_->TileAt(next_index.first, next_index.second);
|
| + if (tile && tile->required_for_activation())
|
| + return true;
|
| + }
|
| + return false;
|
| +}
|
| +
|
| void PictureLayerTiling::TilingRasterTileIterator::AdvancePhase() {
|
| DCHECK_LT(type_, TilePriority::EVENTUALLY);
|
|
|
|
|