| Index: cc/layers/layer.cc
|
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
|
| index bf2f26a4c4b5d06c36ceb10766a86219a2dccee0..84815b8495ea8ba985e0d316b165f271c2b7c73a 100644
|
| --- a/cc/layers/layer.cc
|
| +++ b/cc/layers/layer.cc
|
| @@ -116,7 +116,11 @@ void Layer::SetLayerTreeHost(LayerTreeHost* host) {
|
| if (layer_tree_host_ == host)
|
| return;
|
|
|
| + if (layer_tree_host_)
|
| + layer_tree_host_->UnregisterLayer(this);
|
| layer_tree_host_ = host;
|
| + if (layer_tree_host_)
|
| + layer_tree_host_->RegisterLayer(this);
|
|
|
| // When changing hosts, the layer needs to commit its properties to the impl
|
| // side for the new host.
|
|
|