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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 2054483002: Revert of cc : Make LayerImpl destruction independent of tree hierarchy (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/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index d61b7c76ceffa732f40a84f6f1c3502042423a9b..6debeb58f2857665473642649c2a8f0488ab4b39 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -538,7 +538,6 @@
// Toggle the root layer to make sure it toggles can_draw
host_impl_->active_tree()->SetRootLayer(nullptr);
- host_impl_->active_tree()->DetachLayers();
EXPECT_FALSE(host_impl_->CanDraw());
EXPECT_TRUE(on_can_draw_state_changed_called_);
on_can_draw_state_changed_called_ = false;
@@ -742,7 +741,7 @@
host_impl_->ScrollBegin(BeginState(gfx::Point()).get(),
InputHandler::WHEEL)
.thread);
- host_impl_->active_tree()->DetachLayers();
+ host_impl_->active_tree()->ClearLayers();
scroll_layer = SetupScrollAndContentsLayers(gfx::Size(100, 100));
@@ -5345,7 +5344,7 @@
// synchronization.
SetNeedsRebuildPropertyTrees();
DrawFrame();
- host_impl_->active_tree()->DetachLayers();
+ host_impl_->active_tree()->ClearLayers();
std::unique_ptr<LayerImpl> root_ptr2 =
LayerImpl::Create(host_impl_->active_tree(), 4);
std::unique_ptr<LayerImpl> root_clip2 =
@@ -7356,7 +7355,8 @@
EXPECT_GT(context3d->NumTextures(), 0u);
// Kill the layer tree.
- host_impl_->active_tree()->DetachLayers();
+ host_impl_->active_tree()->SetRootLayer(
+ LayerImpl::Create(host_impl_->active_tree(), 100));
// There should be no textures left in use after.
EXPECT_EQ(0u, context3d->NumTextures());
}
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698