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

Unified Diff: cc/resources/tiling_set_eviction_queue.cc

Issue 1126813002: cc: Pass priority rect information from iterators to tilings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: cc/resources/tiling_set_eviction_queue.cc
diff --git a/cc/resources/tiling_set_eviction_queue.cc b/cc/resources/tiling_set_eviction_queue.cc
index f078e90b889f1263ef667ce9ab980a5e66e9e001..51e743aa7431bdb60695c97a897ea5d699394d61 100644
--- a/cc/resources/tiling_set_eviction_queue.cc
+++ b/cc/resources/tiling_set_eviction_queue.cc
@@ -198,11 +198,11 @@ TilingSetEvictionQueue::EvictionRectIterator::EvictionRectIterator()
TilingSetEvictionQueue::EvictionRectIterator::EvictionRectIterator(
std::vector<PictureLayerTiling*>* tilings,
WhichTree tree,
- bool skip_pending_visible_rect)
+ PictureLayerTiling::PriorityRect priority_rect)
: tile_(nullptr),
tilings_(tilings),
tree_(tree),
- skip_pending_visible_rect_(skip_pending_visible_rect),
+ priority_rect_(priority_rect),
tiling_index_(0) {
}
@@ -229,11 +229,11 @@ bool TilingSetEvictionQueue::EvictionRectIterator::GetFirstTileAndCheckIfValid(
// If there's nothing to evict, return false.
if (!tile_ || !tile_->HasResource())
return false;
- if (skip_pending_visible_rect_ &&
+ if (priority_rect_ > PictureLayerTiling::PriorityRect::PENDING_VISIBLE_RECT &&
vmpstr 2015/05/05 18:04:02 Can you leave a comment here, just something expla
USE eero AT chromium.org 2015/05/06 12:05:20 Done.
tiling->pending_visible_rect().Intersects(tile_->content_rect())) {
return false;
}
- (*tilings_)[tiling_index_]->UpdateTilePriority(tile_);
+ (*tilings_)[tiling_index_]->UpdateTilePriority(tile_, priority_rect_);
// In other cases, the tile we got is a viable candidate, return true.
return true;
}
@@ -244,7 +244,7 @@ TilingSetEvictionQueue::EventuallyTilingIterator::EventuallyTilingIterator(
WhichTree tree)
: EvictionRectIterator(tilings,
tree,
- true /* skip_pending_visible_rect */) {
+ PictureLayerTiling::PriorityRect::EVENTUALLY_RECT) {
// Find the first tiling with a tile.
while (tiling_index_ < tilings_->size()) {
if (!(*tilings_)[tiling_index_]->has_eventually_rect_tiles()) {
@@ -296,7 +296,7 @@ TilingSetEvictionQueue::SoonBorderTilingIterator::SoonBorderTilingIterator(
WhichTree tree)
: EvictionRectIterator(tilings,
tree,
- true /* skip_pending_visible_rect */) {
+ PictureLayerTiling::PriorityRect::SOON_BORDER_RECT) {
vmpstr 2015/05/05 18:04:01 The PriorityRect:: part is not needed here, unless
USE eero AT chromium.org 2015/05/06 12:05:20 I do not want to make it an enum. But I thought th
// Find the first tiling with a tile.
while (tiling_index_ < tilings_->size()) {
if (!(*tilings_)[tiling_index_]->has_soon_border_rect_tiles()) {
@@ -348,7 +348,7 @@ TilingSetEvictionQueue::SkewportTilingIterator::SkewportTilingIterator(
WhichTree tree)
: EvictionRectIterator(tilings,
tree,
- true /* skip_pending_visible_rect */) {
+ PictureLayerTiling::PriorityRect::SKEWPORT_RECT) {
// Find the first tiling with a tile.
while (tiling_index_ < tilings_->size()) {
if (!(*tilings_)[tiling_index_]->has_skewport_rect_tiles()) {
@@ -399,9 +399,10 @@ TilingSetEvictionQueue::PendingVisibleTilingIterator::
PendingVisibleTilingIterator(std::vector<PictureLayerTiling*>* tilings,
WhichTree tree,
bool return_required_for_activation_tiles)
- : EvictionRectIterator(tilings,
- tree,
- false /* skip_pending_visible_rect */),
+ : EvictionRectIterator(
+ tilings,
+ tree,
+ PictureLayerTiling::PriorityRect::PENDING_VISIBLE_RECT),
return_required_for_activation_tiles_(
return_required_for_activation_tiles) {
// Find the first tiling with a tile.
@@ -467,7 +468,7 @@ TilingSetEvictionQueue::VisibleTilingIterator::VisibleTilingIterator(
bool return_required_for_activation_tiles)
: EvictionRectIterator(tilings,
tree,
- false /* skip_pending_visible_rect */),
+ PictureLayerTiling::PriorityRect::VISIBLE_RECT),
return_occluded_tiles_(return_occluded_tiles),
return_required_for_activation_tiles_(
return_required_for_activation_tiles) {

Powered by Google App Engine
This is Rietveld 408576698