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

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: 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') | cc/layers/picture_layer_impl_unittest.cc » ('J')
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 53135a21a57b6c469ac270de26c57f4546000839..212253d394f96f056f4ce066941110d7d0645aba 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -874,7 +874,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
@@ -1488,7 +1490,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);
}
@@ -1501,6 +1503,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;
@@ -1509,7 +1514,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)
@@ -1523,7 +1528,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') | cc/layers/picture_layer_impl_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698