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

Side by Side Diff: cc/tiles/tiling_set_eviction_queue.cc

Issue 2711573002: cc: Fix tile priority inversion in picture layer tiling. (Closed)
Patch Set: Created 3 years, 10 months 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 unified diff | Download patch
« no previous file with comments | « cc/tiles/picture_layer_tiling_unittest.cc ('k') | cc/tiles/tiling_set_raster_queue_all.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "cc/tiles/tiling_set_eviction_queue.h" 9 #include "cc/tiles/tiling_set_eviction_queue.h"
10 10
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 return false; 225 return false;
226 // After the pending visible rect has been processed, we must return false 226 // After the pending visible rect has been processed, we must return false
227 // for pending visible rect tiles as tiling iterators do not ignore those 227 // for pending visible rect tiles as tiling iterators do not ignore those
228 // tiles. 228 // tiles.
229 if (priority_rect_type_ > PictureLayerTiling::PENDING_VISIBLE_RECT) { 229 if (priority_rect_type_ > PictureLayerTiling::PENDING_VISIBLE_RECT) {
230 gfx::Rect tile_rect = tiling->tiling_data()->TileBounds( 230 gfx::Rect tile_rect = tiling->tiling_data()->TileBounds(
231 tile->tiling_i_index(), tile->tiling_j_index()); 231 tile->tiling_i_index(), tile->tiling_j_index());
232 if (tiling->pending_visible_rect().Intersects(tile_rect)) 232 if (tiling->pending_visible_rect().Intersects(tile_rect))
233 return false; 233 return false;
234 } 234 }
235 (*tilings_)[tiling_index_]->UpdateRequiredStatesOnTile(tile);
236 prioritized_tile_ = (*tilings_)[tiling_index_]->MakePrioritizedTile( 235 prioritized_tile_ = (*tilings_)[tiling_index_]->MakePrioritizedTile(
237 tile, priority_rect_type_); 236 tile, priority_rect_type_);
238 // In other cases, the tile we got is a viable candidate, return true. 237 // In other cases, the tile we got is a viable candidate, return true.
239 return true; 238 return true;
240 } 239 }
241 240
242 // EventuallyTilingIterator 241 // EventuallyTilingIterator
243 TilingSetEvictionQueue::EventuallyTilingIterator::EventuallyTilingIterator( 242 TilingSetEvictionQueue::EventuallyTilingIterator::EventuallyTilingIterator(
244 std::vector<PictureLayerTiling*>* tilings, 243 std::vector<PictureLayerTiling*>* tilings,
245 WhichTree tree) 244 WhichTree tree)
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 519
521 bool TilingSetEvictionQueue::VisibleTilingIterator::TileMatchesRequiredFlags( 520 bool TilingSetEvictionQueue::VisibleTilingIterator::TileMatchesRequiredFlags(
522 const PrioritizedTile& tile) const { 521 const PrioritizedTile& tile) const {
523 bool activation_flag_matches = tile.tile()->required_for_activation() == 522 bool activation_flag_matches = tile.tile()->required_for_activation() ==
524 return_required_for_activation_tiles_; 523 return_required_for_activation_tiles_;
525 bool occluded_flag_matches = tile.is_occluded() == return_occluded_tiles_; 524 bool occluded_flag_matches = tile.is_occluded() == return_occluded_tiles_;
526 return activation_flag_matches && occluded_flag_matches; 525 return activation_flag_matches && occluded_flag_matches;
527 } 526 }
528 527
529 } // namespace cc 528 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/picture_layer_tiling_unittest.cc ('k') | cc/tiles/tiling_set_raster_queue_all.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698