Chromium Code Reviews| 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..e7912fcf8615bddc71a8ab0ec8831da918e80a0f 100644 |
| --- a/cc/layers/picture_layer_impl.cc |
| +++ b/cc/layers/picture_layer_impl.cc |
| @@ -883,7 +883,9 @@ bool PictureLayerImpl::MarkVisibleTilesAsRequired( |
| continue; |
| // If the tile is occluded, don't mark it as required for activation. |
| - if (tile->is_occluded()) |
| + WhichTree tree = |
|
danakj
2014/07/07 19:26:28
This method should only be called on the pending t
jbedley
2014/07/07 20:25:13
Done.
|
| + layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; |
| + if (tile->is_occluded(tree)) |
| continue; |
| // If the missing region doesn't cover it, this tile is fully |
| @@ -1461,7 +1463,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 +1476,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 +1487,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 +1501,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_; |
| } |