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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 374653003: Track occlusion per tree on Tile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address feedback Created 6 years, 5 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/resources/tile.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 6b753f9ba3cb5ef06b3a2581f191c088400ca531..0a221c45bc6f4d2e5e36bfaee319feaeb9a9c924 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -883,7 +883,7 @@ bool PictureLayerImpl::MarkVisibleTilesAsRequired(
continue;
// If the tile is occluded, don't mark it as required for activation.
- if (tile->is_occluded())
+ if (tile->is_occluded(PENDING_TREE))
continue;
// If the missing region doesn't cover it, this tile is fully
@@ -1461,7 +1461,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])->is_occluded(tree))
++(*this);
}
@@ -1474,6 +1474,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;
@@ -1482,7 +1485,7 @@ operator++() {
++iterators_[index];
while (iterators_[index] && iterators_[index].get_type() == tile_type &&
- (*iterators_[index])->is_occluded())
+ (*iterators_[index])->is_occluded(tree))
++iterators_[index];
if (iterators_[index] && iterators_[index].get_type() == tile_type)
@@ -1496,7 +1499,7 @@ operator++() {
tile_type = stages_[current_stage_].tile_type;
if (iterators_[index] && iterators_[index].get_type() == tile_type &&
- !(*iterators_[index])->is_occluded())
+ !(*iterators_[index])->is_occluded(tree))
break;
++current_stage_;
}
« no previous file with comments | « no previous file | cc/layers/picture_layer_impl_unittest.cc » ('j') | cc/resources/tile.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698