| Index: cc/layers/picture_layer_impl.cc
|
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
|
| index e719dac9401847088a92240600111fac406efcdb..14dfa52efbcbad384591d6c3f7473f46b91af9b1 100644
|
| --- a/cc/layers/picture_layer_impl.cc
|
| +++ b/cc/layers/picture_layer_impl.cc
|
| @@ -1378,10 +1378,8 @@ bool PictureLayerImpl::HasValidTilePriorities() const {
|
| return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
|
| }
|
|
|
| -bool PictureLayerImpl::AllTilesRequiredForActivationAreReadyToDraw() const {
|
| - if (!layer_tree_impl()->IsPendingTree())
|
| - return true;
|
| -
|
| +bool PictureLayerImpl::AllTilesRequiredAreReadyToDraw(
|
| + TileRequirementCheck is_tile_required_callback) const {
|
| if (!HasValidTilePriorities())
|
| return true;
|
|
|
| @@ -1413,11 +1411,9 @@ bool PictureLayerImpl::AllTilesRequiredForActivationAreReadyToDraw() const {
|
| // be out of date. It is updated in the raster/eviction iterators.
|
| // TODO(vmpstr): Remove the comment once you can't access this information
|
| // from the tile.
|
| - if (tiling->IsTileRequiredForActivation(tile) && !tile->IsReadyToDraw()) {
|
| - TRACE_EVENT_INSTANT0("cc",
|
| - "PictureLayerImpl::"
|
| - "AllTilesRequiredForActivationAreReadyToDraw not "
|
| - "ready to activate",
|
| + if ((tiling->*is_tile_required_callback)(tile) &&
|
| + !tile->IsReadyToDraw()) {
|
| + TRACE_EVENT_INSTANT0("cc", "Tile required, but not ready to draw.",
|
| TRACE_EVENT_SCOPE_THREAD);
|
| return false;
|
| }
|
| @@ -1427,6 +1423,22 @@ bool PictureLayerImpl::AllTilesRequiredForActivationAreReadyToDraw() const {
|
| return true;
|
| }
|
|
|
| +bool PictureLayerImpl::AllTilesRequiredForActivationAreReadyToDraw() const {
|
| + if (!layer_tree_impl()->IsPendingTree())
|
| + return true;
|
| +
|
| + return AllTilesRequiredAreReadyToDraw(
|
| + &PictureLayerTiling::IsTileRequiredForActivationIfVisible);
|
| +}
|
| +
|
| +bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const {
|
| + if (!layer_tree_impl()->IsActiveTree())
|
| + return true;
|
| +
|
| + return AllTilesRequiredAreReadyToDraw(
|
| + &PictureLayerTiling::IsTileRequiredForDrawIfVisible);
|
| +}
|
| +
|
| PictureLayerImpl::LayerRasterTileIterator::LayerRasterTileIterator()
|
| : layer_(nullptr), current_stage_(arraysize(stages_)) {
|
| }
|
|
|