Chromium Code Reviews| Index: cc/layers/layer_impl.cc |
| diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc |
| index 407449d774176c40a69ec524808bbb5d3ea21e35..98ea697d2e0c6c0ea4a3e8d3380bf06cb5467e9a 100644 |
| --- a/cc/layers/layer_impl.cc |
| +++ b/cc/layers/layer_impl.cc |
| @@ -108,7 +108,7 @@ LayerImpl::~LayerImpl() { |
| layer_tree_impl_->RemoveLayer(mask_layer_id_); |
| if (replica_layer_) |
| layer_tree_impl_->RemoveLayer(replica_layer_id_); |
|
ajuma
2016/06/07 23:25:36
Since masks and replicas are part of layers_ in La
jaydasika
2016/06/08 00:17:37
I din't understand that fully. masks and replicas
jaydasika
2016/06/08 00:49:32
Scratch my previous comment, I understand what you
ajuma
2016/06/08 13:48:02
That's a good point about destruction order -- eve
jaydasika
2016/06/08 16:29:30
I agree that there is no guarantee about destructi
ajuma
2016/06/08 16:40:45
Ah, got it, that makes sense.
|
| - ClearChildList(); |
| + children_.clear(); |
| } |
| void LayerImpl::AddChild(std::unique_ptr<LayerImpl> child) { |
| @@ -130,14 +130,6 @@ void LayerImpl::SetParent(LayerImpl* parent) { |
| parent_ = parent; |
| } |
| -void LayerImpl::ClearChildList() { |
| - if (children_.empty()) |
| - return; |
| - for (auto* child : children_) |
| - layer_tree_impl_->RemoveLayer(child->id()); |
| - children_.clear(); |
| -} |
| - |
| void LayerImpl::ClearLinksToOtherLayers() { |
| children_.clear(); |
| mask_layer_ = nullptr; |