| Index: cc/layers/picture_layer_impl.cc
|
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
|
| index 7fd7730be24e32de49cf1a87552ea33e8858320f..c3c7ca021104ba5f2468b233838d45beee16c845 100644
|
| --- a/cc/layers/picture_layer_impl.cc
|
| +++ b/cc/layers/picture_layer_impl.cc
|
| @@ -122,7 +122,7 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
|
| twin_layer_ = layer_impl;
|
| layer_impl->twin_layer_ = this;
|
|
|
| - layer_impl->pile_ = pile_;
|
| + layer_impl->UpdatePile(pile_);
|
|
|
| DCHECK(!pile_->is_solid_color() || !tilings_->num_tilings());
|
| // Tilings would be expensive to push, so we swap.
|
| @@ -158,6 +158,16 @@ void PictureLayerImpl::PushPropertiesTo(LayerImpl* base_layer) {
|
| needs_push_properties_ = true;
|
| }
|
|
|
| +void PictureLayerImpl::UpdatePile(scoped_refptr<PicturePileImpl> pile) {
|
| + bool could_have_tilings = CanHaveTilings();
|
| + pile_.swap(pile);
|
| +
|
| + // Need to call UpdateTiles again if CanHaveTilings changed.
|
| + if (could_have_tilings != CanHaveTilings()) {
|
| + layer_tree_impl()->set_needs_update_draw_properties();
|
| + }
|
| +}
|
| +
|
| void PictureLayerImpl::AppendQuads(RenderPass* render_pass,
|
| const Occlusion& occlusion_in_content_space,
|
| AppendQuadsData* append_quads_data) {
|
|
|