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

Unified Diff: cc/resources/picture_layer_tiling.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: More robust 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
Index: cc/resources/picture_layer_tiling.cc
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index 61b0362ee44c2b9cd073fe86db6e7c238378c69f..6259386c22ce90661f1e411af964e496290a48d7 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -764,13 +764,16 @@ void PictureLayerTiling::UpdateTilePriority(Tile* tile) const {
// TODO(vmpstr): This code should return the priority instead of setting it on
// the tile. This should be a part of the change to move tile priority from
// tiles into iterators.
+ TilePriority::PriorityBin max_tile_priority_bin =
+ client_->GetMaxTilePriorityBin();
WhichTree tree = client_->GetTree();
DCHECK_EQ(TileAt(tile->tiling_i_index(), tile->tiling_j_index()), tile);
gfx::Rect tile_bounds =
tiling_data_.TileBounds(tile->tiling_i_index(), tile->tiling_j_index());
- if (current_visible_rect_.Intersects(tile_bounds)) {
+ if (max_tile_priority_bin <= TilePriority::NOW &&
+ current_visible_rect_.Intersects(tile_bounds)) {
tile->SetPriority(tree, TilePriority(resolution_, TilePriority::NOW, 0));
if (tree == PENDING_TREE)
tile->set_required_for_activation(IsTileRequiredForActivation(tile));
@@ -787,8 +790,9 @@ void PictureLayerTiling::UpdateTilePriority(Tile* tile) const {
current_visible_rect_.ManhattanInternalDistance(tile_bounds) *
content_to_screen_scale_;
- if (current_soon_border_rect_.Intersects(tile_bounds) ||
- current_skewport_rect_.Intersects(tile_bounds)) {
+ if (max_tile_priority_bin <= TilePriority::SOON &&
+ (current_soon_border_rect_.Intersects(tile_bounds) ||
+ current_skewport_rect_.Intersects(tile_bounds))) {
tile->SetPriority(
tree,
TilePriority(resolution_, TilePriority::SOON, distance_to_visible));

Powered by Google App Engine
This is Rietveld 408576698