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

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: Rebase fix 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
« no previous file with comments | « cc/resources/tiling_set_eviction_queue.h ('k') | cc/resources/tiling_set_raster_queue_all.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c98cc7afd969dc14be9148a892c4a831a0ac0602..7b9fb1630e93fb67f4ef7e6a72a6ad6deda7543c 100644
--- a/cc/resources/tiling_set_eviction_queue.cc
+++ b/cc/resources/tiling_set_eviction_queue.cc
@@ -188,10 +188,10 @@ TilingSetEvictionQueue::EvictionRectIterator::EvictionRectIterator()
TilingSetEvictionQueue::EvictionRectIterator::EvictionRectIterator(
std::vector<PictureLayerTiling*>* tilings,
WhichTree tree,
- bool skip_pending_visible_rect)
+ PictureLayerTiling::PriorityRectType priority_rect_type)
: tilings_(tilings),
tree_(tree),
- skip_pending_visible_rect_(skip_pending_visible_rect),
+ priority_rect_type_(priority_rect_type),
tiling_index_(0) {
}
@@ -219,12 +219,16 @@ bool TilingSetEvictionQueue::EvictionRectIterator::GetFirstTileAndCheckIfValid(
// If there's nothing to evict, return false.
if (!tile || !tile->HasResource())
return false;
- if (skip_pending_visible_rect_ &&
+ // After the pending visible rect has been processed, we must return false
+ // for pending visible rect tiles as tiling iterators do not ignore those
+ // tiles.
+ if (priority_rect_type_ > PictureLayerTiling::PENDING_VISIBLE_RECT &&
tiling->pending_visible_rect().Intersects(tile->content_rect())) {
return false;
}
(*tilings_)[tiling_index_]->UpdateRequiredStatesOnTile(tile);
- prioritized_tile_ = (*tilings_)[tiling_index_]->MakePrioritizedTile(tile);
+ prioritized_tile_ = (*tilings_)[tiling_index_]->MakePrioritizedTile(
+ tile, priority_rect_type_);
// In other cases, the tile we got is a viable candidate, return true.
return true;
}
@@ -233,9 +237,7 @@ bool TilingSetEvictionQueue::EvictionRectIterator::GetFirstTileAndCheckIfValid(
TilingSetEvictionQueue::EventuallyTilingIterator::EventuallyTilingIterator(
std::vector<PictureLayerTiling*>* tilings,
WhichTree tree)
- : EvictionRectIterator(tilings,
- tree,
- true /* skip_pending_visible_rect */) {
+ : EvictionRectIterator(tilings, tree, PictureLayerTiling::EVENTUALLY_RECT) {
// Find the first tiling with a tile.
while (tiling_index_ < tilings_->size()) {
if (!(*tilings_)[tiling_index_]->has_eventually_rect_tiles()) {
@@ -287,7 +289,7 @@ TilingSetEvictionQueue::SoonBorderTilingIterator::SoonBorderTilingIterator(
WhichTree tree)
: EvictionRectIterator(tilings,
tree,
- true /* skip_pending_visible_rect */) {
+ PictureLayerTiling::SOON_BORDER_RECT) {
// Find the first tiling with a tile.
while (tiling_index_ < tilings_->size()) {
if (!(*tilings_)[tiling_index_]->has_soon_border_rect_tiles()) {
@@ -337,9 +339,7 @@ TilingSetEvictionQueue::SoonBorderTilingIterator&
TilingSetEvictionQueue::SkewportTilingIterator::SkewportTilingIterator(
std::vector<PictureLayerTiling*>* tilings,
WhichTree tree)
- : EvictionRectIterator(tilings,
- tree,
- true /* skip_pending_visible_rect */) {
+ : EvictionRectIterator(tilings, tree, PictureLayerTiling::SKEWPORT_RECT) {
// Find the first tiling with a tile.
while (tiling_index_ < tilings_->size()) {
if (!(*tilings_)[tiling_index_]->has_skewport_rect_tiles()) {
@@ -392,7 +392,7 @@ TilingSetEvictionQueue::PendingVisibleTilingIterator::
bool return_required_for_activation_tiles)
: EvictionRectIterator(tilings,
tree,
- false /* skip_pending_visible_rect */),
+ PictureLayerTiling::PENDING_VISIBLE_RECT),
return_required_for_activation_tiles_(
return_required_for_activation_tiles) {
// Find the first tiling with a tile.
@@ -456,9 +456,7 @@ TilingSetEvictionQueue::VisibleTilingIterator::VisibleTilingIterator(
WhichTree tree,
bool return_occluded_tiles,
bool return_required_for_activation_tiles)
- : EvictionRectIterator(tilings,
- tree,
- false /* skip_pending_visible_rect */),
+ : EvictionRectIterator(tilings, tree, PictureLayerTiling::VISIBLE_RECT),
return_occluded_tiles_(return_occluded_tiles),
return_required_for_activation_tiles_(
return_required_for_activation_tiles) {
« no previous file with comments | « cc/resources/tiling_set_eviction_queue.h ('k') | cc/resources/tiling_set_raster_queue_all.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698