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

Unified Diff: cc/layers/layer_unittest.cc

Issue 2159513003: Setup LayerTree class, refactor 2 functions from LayerTreeHost to it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove external access to layer_id_map_ in LayerTree. Created 4 years, 5 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_unittest.cc
diff --git a/cc/layers/layer_unittest.cc b/cc/layers/layer_unittest.cc
index 179e0a50eff8e70f516d90a8e95b500a330eb2f7..6c2611f7eb881f01ed02082a9ef52e81b8a72b12 100644
--- a/cc/layers/layer_unittest.cc
+++ b/cc/layers/layer_unittest.cc
@@ -143,16 +143,17 @@ class LayerSerializationTest : public testing::Test {
// The |dest| layer needs to be able to lookup the scroll and clip parents.
if (src->inputs_.scroll_parent)
- layer_tree_host_->RegisterLayer(src->inputs_.scroll_parent);
+ layer_tree_host_->GetLayerTree()->RegisterLayer(
+ src->inputs_.scroll_parent);
if (src->scroll_children_) {
for (auto* child : *(src->scroll_children_))
- layer_tree_host_->RegisterLayer(child);
+ layer_tree_host_->GetLayerTree()->RegisterLayer(child);
}
if (src->inputs_.clip_parent)
- layer_tree_host_->RegisterLayer(src->inputs_.clip_parent);
+ layer_tree_host_->GetLayerTree()->RegisterLayer(src->inputs_.clip_parent);
if (src->clip_children_) {
for (auto* child : *(src->clip_children_))
- layer_tree_host_->RegisterLayer(child);
+ layer_tree_host_->GetLayerTree()->RegisterLayer(child);
}
// Reset the LayerTreeHost registration for the |src| layer so
// it can be re-used for the |dest| layer.
@@ -250,24 +251,26 @@ class LayerSerializationTest : public testing::Test {
// Cleanup scroll tree.
if (src->inputs_.scroll_parent)
- layer_tree_host_->UnregisterLayer(src->inputs_.scroll_parent);
+ layer_tree_host_->GetLayerTree()->UnregisterLayer(
+ src->inputs_.scroll_parent);
src->inputs_.scroll_parent = nullptr;
dest->inputs_.scroll_parent = nullptr;
if (src->scroll_children_) {
for (auto* child : *(src->scroll_children_))
- layer_tree_host_->UnregisterLayer(child);
+ layer_tree_host_->GetLayerTree()->UnregisterLayer(child);
src->scroll_children_.reset();
dest->scroll_children_.reset();
}
// Cleanup clip tree.
if (src->inputs_.clip_parent)
- layer_tree_host_->UnregisterLayer(src->inputs_.clip_parent);
+ layer_tree_host_->GetLayerTree()->UnregisterLayer(
+ src->inputs_.clip_parent);
src->inputs_.clip_parent = nullptr;
dest->inputs_.clip_parent = nullptr;
if (src->clip_children_) {
for (auto* child : *(src->clip_children_))
- layer_tree_host_->UnregisterLayer(child);
+ layer_tree_host_->GetLayerTree()->UnregisterLayer(child);
src->clip_children_.reset();
dest->clip_children_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698