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

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: Address comments 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
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_test_properties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/layer_impl_test_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698