Chromium Code Reviews| Index: cc/layers/heads_up_display_layer_impl_unittest.cc |
| diff --git a/cc/layers/heads_up_display_layer_impl_unittest.cc b/cc/layers/heads_up_display_layer_impl_unittest.cc |
| index e104c33d061fc6ae873c8b70971bf16ce6cb8c28..81f7332f69322337f02a05bfbce4b94fa2c4b6fa 100644 |
| --- a/cc/layers/heads_up_display_layer_impl_unittest.cc |
| +++ b/cc/layers/heads_up_display_layer_impl_unittest.cc |
| @@ -11,6 +11,7 @@ |
| #include "cc/test/fake_output_surface.h" |
| #include "cc/test/test_shared_bitmap_manager.h" |
| #include "cc/test/test_task_graph_runner.h" |
| +#include "cc/trees/layer_tree_impl.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| namespace cc { |
| @@ -46,16 +47,20 @@ TEST(HeadsUpDisplayLayerImplTest, ResourcelessSoftwareDrawAfterResourceLoss) { |
| HeadsUpDisplayLayerImpl::Create(host_impl.pending_tree(), 1); |
| layer->SetBounds(gfx::Size(100, 100)); |
| + HeadsUpDisplayLayerImpl* layer_ptr = layer.get(); |
| + |
| + layer->UpdatePropertyTreeTransform(); |
|
ajuma
2015/12/23 22:17:04
This line shouldn't be needed (since property tree
|
| + host_impl.pending_tree()->SetRootLayer(std::move(layer)); |
| + host_impl.pending_tree()->BuildPropertyTreesForTesting(); |
| + |
| // Check regular hardware draw is ok. |
| - CheckDrawLayer( |
| - layer.get(), host_impl.resource_provider(), DRAW_MODE_HARDWARE); |
| + CheckDrawLayer(layer_ptr, host_impl.resource_provider(), DRAW_MODE_HARDWARE); |
| // Simulate a resource loss on transitioning to resourceless software mode. |
| - layer->ReleaseResources(); |
| + layer_ptr->ReleaseResources(); |
| // Should skip resourceless software draw and not crash in UpdateHudTexture. |
| - CheckDrawLayer(layer.get(), |
| - host_impl.resource_provider(), |
| + CheckDrawLayer(layer_ptr, host_impl.resource_provider(), |
| DRAW_MODE_RESOURCELESS_SOFTWARE); |
| } |