| Index: cc/layers/layer.cc
|
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
|
| index 19b505b49618f20930f7d55212eb63f072d5349a..80a21cee5656d9bdc0ba6334ddb8b7fa5f7c8ea3 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.
|
|
|