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

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: 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/resources/picture_layer_tiling.h ('k') | cc/resources/tile_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling.cc
diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
index 78712a2c237f6f1aa80bd730dde4694d3220448c..562b1118d21d28d570e449c6bd78e254ea565c7b 100644
--- a/cc/resources/picture_layer_tiling.cc
+++ b/cc/resources/picture_layer_tiling.cc
@@ -781,13 +781,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(
@@ -810,8 +813,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));
« no previous file with comments | « cc/resources/picture_layer_tiling.h ('k') | cc/resources/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698