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

Unified Diff: cc/layers/layer_impl.cc

Issue 2084233002: cc: Move LayerImpl::AddChild and RemoveChild to LayerImplTestProperties (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
« 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 ee3c587f59fe3f22660cbe216f0c2c56d9b79b71..64f84e4166308ead743dbd391ca61338a8a3e675 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -101,22 +101,6 @@ LayerImpl::~LayerImpl() {
TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerImpl", this);
}
-void LayerImpl::AddChild(std::unique_ptr<LayerImpl> child) {
- 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));
-}
-
-std::unique_ptr<LayerImpl> LayerImpl::RemoveChildForTesting(LayerImpl* child) {
- auto it = std::find(test_properties()->children.begin(),
- test_properties()->children.end(), child);
- if (it != test_properties()->children.end())
- test_properties()->children.erase(it);
- layer_tree_impl()->property_trees()->RemoveIdFromIdToIndexMaps(child->id());
- return layer_tree_impl_->RemoveLayer(child->id());
-}
-
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