| Index: cc/layers/layer.cc
|
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
|
| index 5c2d6a8643dfdda6968d0cfe7cbeb1f1aa895c6e..9a10f5d55bec2e61c7d70ad27e22bda8b4d16d35 100644
|
| --- a/cc/layers/layer.cc
|
| +++ b/cc/layers/layer.cc
|
| @@ -124,6 +124,11 @@ void Layer::SetLayerTreeHost(LayerTreeHost* host) {
|
| if (layer_tree_host_)
|
| layer_tree_host_->property_trees()->needs_rebuild = true;
|
|
|
| + if (host)
|
| + host->property_trees()->needs_rebuild = true;
|
| +
|
| + InvalidatePropertyTreesIndices();
|
| +
|
| layer_tree_host_ = host;
|
|
|
| // When changing hosts, the layer needs to commit its properties to the impl
|
| @@ -1039,6 +1044,13 @@ int Layer::opacity_tree_index() const {
|
| return opacity_tree_index_;
|
| }
|
|
|
| +void Layer::InvalidatePropertyTreesIndices() {
|
| + int invalid_property_tree_index = -1;
|
| + SetTransformTreeIndex(invalid_property_tree_index);
|
| + SetClipTreeIndex(invalid_property_tree_index);
|
| + SetOpacityTreeIndex(invalid_property_tree_index);
|
| +}
|
| +
|
| void Layer::SetShouldFlattenTransform(bool should_flatten) {
|
| DCHECK(IsPropertyChangeAllowed());
|
| if (should_flatten_transform_ == should_flatten)
|
|
|