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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 343463004: Move occlusion info to TilePriority. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 | « no previous file | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 8624788e1e78034fb9f89effc1bfb9fec3ff0f8a..8e4cb98a1faf0bef23494a34db5757c3bca7ee22 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -893,7 +893,9 @@ bool PictureLayerImpl::MarkVisibleTilesAsRequired(
continue;
// If the tile is occluded, don't mark it as required for activation.
- if (tile->is_occluded())
+ WhichTree tree =
+ layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
+ if (tile->priority(tree).is_occluded)
continue;
// If the missing region doesn't cover it, this tile is fully
@@ -1471,7 +1473,7 @@ PictureLayerImpl::LayerRasterTileIterator::LayerRasterTileIterator(
IteratorType index = stages_[current_stage_].iterator_type;
TilePriority::PriorityBin tile_type = stages_[current_stage_].tile_type;
if (!iterators_[index] || iterators_[index].get_type() != tile_type ||
- (*iterators_[index])->is_occluded())
+ (*iterators_[index])->priority(tree).is_occluded)
++(*this);
}
@@ -1484,6 +1486,9 @@ PictureLayerImpl::LayerRasterTileIterator::operator bool() const {
PictureLayerImpl::LayerRasterTileIterator&
PictureLayerImpl::LayerRasterTileIterator::
operator++() {
+ WhichTree tree =
+ layer_->layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
+
IteratorType index = stages_[current_stage_].iterator_type;
TilePriority::PriorityBin tile_type = stages_[current_stage_].tile_type;
@@ -1492,7 +1497,7 @@ operator++() {
++iterators_[index];
while (iterators_[index] && iterators_[index].get_type() == tile_type &&
- (*iterators_[index])->is_occluded())
+ (*iterators_[index])->priority(tree).is_occluded)
++iterators_[index];
if (iterators_[index] && iterators_[index].get_type() == tile_type)
@@ -1506,7 +1511,7 @@ operator++() {
tile_type = stages_[current_stage_].tile_type;
if (iterators_[index] && iterators_[index].get_type() == tile_type &&
- !(*iterators_[index])->is_occluded())
+ !(*iterators_[index])->priority(tree).is_occluded)
break;
++current_stage_;
}
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698