Index: cc/layers/layer_impl.cc |
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc |
index 900ee29e5747f32de7d18699977f3abfee5440c2..8ba97c3daa2819e406422eae91a02284f0db8c7c 100644 |
--- a/cc/layers/layer_impl.cc |
+++ b/cc/layers/layer_impl.cc |
@@ -44,8 +44,7 @@ |
namespace cc { |
LayerImpl::LayerImpl(LayerTreeImpl* tree_impl, int id) |
- : parent_(nullptr), |
- layer_id_(id), |
+ : layer_id_(id), |
layer_tree_impl_(tree_impl), |
test_properties_(nullptr), |
scroll_clip_layer_id_(Layer::INVALID_ID), |
@@ -102,7 +101,7 @@ LayerImpl::~LayerImpl() { |
} |
void LayerImpl::AddChild(std::unique_ptr<LayerImpl> child) { |
- child->SetParent(this); |
+ child->test_properties()->parent = this; |
DCHECK_EQ(layer_tree_impl(), child->layer_tree_impl()); |
test_properties()->children.push_back(child.get()); |
layer_tree_impl_->AddLayer(std::move(child)); |
@@ -117,10 +116,6 @@ std::unique_ptr<LayerImpl> LayerImpl::RemoveChildForTesting(LayerImpl* child) { |
return layer_tree_impl_->RemoveLayer(child->id()); |
} |
-void LayerImpl::SetParent(LayerImpl* parent) { |
- parent_ = parent; |
-} |
- |
void LayerImpl::SetHasWillChangeTransformHint(bool has_will_change) { |
if (has_will_change_transform_hint_ == has_will_change) |
return; |