Chromium Code Reviews| Index: cc/resources/picture_layer_tiling.cc |
| diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc |
| index 46792d02449dea1491980ac0b35ac2d6fb8e7265..2d24679972b624c5be0abada4c26c6b6b1521617 100644 |
| --- a/cc/resources/picture_layer_tiling.cc |
| +++ b/cc/resources/picture_layer_tiling.cc |
| @@ -797,6 +797,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); |
|
reveman
2014/05/20 23:01:00
I don't think this is worthwhile unless we actuall
vmpstr
2014/05/27 22:41:32
Sorry that was a left over from debugging. Removed
|
| + |
| // TODO(vmpstr): This should update the priority if UpdateTilePriorities |
| // changes not to do this. |
| eviction_tiles_cache_.push_back(it->second); |
| @@ -845,6 +847,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); |