| Index: cc/layers/layer_impl_test_properties.cc
|
| diff --git a/cc/layers/layer_impl_test_properties.cc b/cc/layers/layer_impl_test_properties.cc
|
| index dd2e26885af3c3207ba7998cd9ada2a64af8f94d..e3e0fd60f61ebae8847114e27abb76284a94ba5b 100644
|
| --- a/cc/layers/layer_impl_test_properties.cc
|
| +++ b/cc/layers/layer_impl_test_properties.cc
|
| @@ -29,6 +29,22 @@ LayerImplTestProperties::LayerImplTestProperties(LayerImpl* owning_layer)
|
|
|
| LayerImplTestProperties::~LayerImplTestProperties() {}
|
|
|
| +void LayerImplTestProperties::AddChild(std::unique_ptr<LayerImpl> child) {
|
| + child->test_properties()->parent = owning_layer;
|
| + children.push_back(child.get());
|
| + owning_layer->layer_tree_impl()->AddLayer(std::move(child));
|
| +}
|
| +
|
| +std::unique_ptr<LayerImpl> LayerImplTestProperties::RemoveChild(
|
| + LayerImpl* child) {
|
| + auto it = std::find(children.begin(), children.end(), child);
|
| + if (it != children.end())
|
| + children.erase(it);
|
| + owning_layer->layer_tree_impl()->property_trees()->RemoveIdFromIdToIndexMaps(
|
| + child->id());
|
| + return owning_layer->layer_tree_impl()->RemoveLayer(child->id());
|
| +}
|
| +
|
| void LayerImplTestProperties::SetMaskLayer(std::unique_ptr<LayerImpl> mask) {
|
| if (mask_layer)
|
| owning_layer->layer_tree_impl()->RemoveLayer(mask_layer->id());
|
|
|