Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Unified Diff: cc/layers/layer_impl.cc

Issue 2053983003: cc : Move LayerImpl::parent to test properties (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 14d72ca3b735fbb6e5dd9d1076e47b4b06fecc0e..7dee148ee33ceab519116b6bc70771a060f988af 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),
- mask_layer_id_(-1),
+ : mask_layer_id_(-1),
mask_layer_(nullptr),
replica_layer_id_(-1),
replica_layer_(nullptr),
@@ -112,7 +111,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));
@@ -127,10 +126,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::ClearLinksToOtherLayers() {
mask_layer_ = nullptr;
replica_layer_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698