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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 690063002: cc: Do not ignore layers without valid priorities during eviction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase: CreateWith{Pile => RasterSource} Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 14dfa52efbcbad384591d6c3f7473f46b91af9b1..6d8914033e1d43802052d9f9302bb656a1b9e657 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -664,6 +664,12 @@ PictureLayerTiling* PictureLayerImpl::GetRecycledTwinTiling(
return recycled_twin->tilings_->TilingAtScale(tiling->contents_scale());
}
+TilePriority::PriorityBin PictureLayerImpl::GetMaxTilePriorityBin() const {
+ if (!HasValidTilePriorities())
+ return TilePriority::EVENTUALLY;
+ return TilePriority::NOW;
+}
+
size_t PictureLayerImpl::GetMaxTilesForInterestArea() const {
return layer_tree_impl()->settings().max_tiles_for_interest_area;
}
@@ -1573,11 +1579,12 @@ PictureLayerImpl::LayerEvictionTileIterator::LayerEvictionTileIterator(
tree_priority_(tree_priority),
current_category_(PictureLayerTiling::EVENTUALLY),
current_tiling_range_type_(PictureLayerTilingSet::HIGHER_THAN_HIGH_RES),
- current_tiling_(CurrentTilingRange().start - 1u) {
- // TODO(vmpstr): Once tile priorities are determined by the iterators, ensure
- // that layers that don't have valid tile priorities have lowest priorities so
- // they evict their tiles first (crbug.com/381704)
- DCHECK(layer_->tilings_);
+ current_tiling_(0u) {
+ // Early out if the layer has no tilings.
+ if (!layer_->tilings_ || !layer_->tilings_->num_tilings())
+ return;
+
+ current_tiling_ = CurrentTilingRange().start - 1u;
do {
if (!AdvanceToNextTiling())
break;
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698