Chromium Code Reviews| 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 6debeb58f2857665473642649c2a8f0488ab4b39..34ba85d10516accb7fe18669218c810d0749e437 100644 |
| --- a/cc/trees/layer_tree_host_impl_unittest.cc |
| +++ b/cc/trees/layer_tree_host_impl_unittest.cc |
| @@ -538,6 +538,7 @@ TEST_F(LayerTreeHostImplTest, NotifyIfCanDrawChanged) { |
| // 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; |
| @@ -741,7 +742,7 @@ TEST_F(LayerTreeHostImplTest, ReplaceTreeWhileScrolling) { |
| host_impl_->ScrollBegin(BeginState(gfx::Point()).get(), |
| InputHandler::WHEEL) |
| .thread); |
| - host_impl_->active_tree()->ClearLayers(); |
| + host_impl_->active_tree()->DetachLayers(); |
| scroll_layer = SetupScrollAndContentsLayers(gfx::Size(100, 100)); |
| @@ -5344,7 +5345,7 @@ TEST_F(LayerTreeHostImplTest, ScrollBeforeRedraw) { |
| // synchronization. |
| SetNeedsRebuildPropertyTrees(); |
| DrawFrame(); |
| - host_impl_->active_tree()->ClearLayers(); |
| + host_impl_->active_tree()->DetachLayers(); |
| std::unique_ptr<LayerImpl> root_ptr2 = |
| LayerImpl::Create(host_impl_->active_tree(), 4); |
| std::unique_ptr<LayerImpl> root_clip2 = |
| @@ -7357,6 +7358,7 @@ TEST_F(LayerTreeHostImplTest, LayersFreeTextures) { |
| // Kill the layer tree. |
| host_impl_->active_tree()->SetRootLayer( |
| LayerImpl::Create(host_impl_->active_tree(), 100)); |
|
ajuma
2016/06/07 23:25:36
I think the line above can be removed now that we'
jaydasika
2016/06/08 00:49:32
Done.
|
| + host_impl_->active_tree()->DetachLayers(); |
| // There should be no textures left in use after. |
| EXPECT_EQ(0u, context3d->NumTextures()); |
| } |