| Index: cc/layers/layer.cc
|
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
|
| index 938449cb968e2e57ac3e792c1c4d9d6ddd1c548b..b7d6e316e600bc826de0586702e4d1d9f5be8468 100644
|
| --- a/cc/layers/layer.cc
|
| +++ b/cc/layers/layer.cc
|
| @@ -118,7 +118,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.
|
|
|