OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include "base/memory/weak_ptr.h" | 7 #include "base/memory/weak_ptr.h" |
8 #include "cc/layers/layer.h" | 8 #include "cc/layers/layer.h" |
9 #include "cc/layers/layer_impl.h" | 9 #include "cc/layers/layer_impl.h" |
10 #include "cc/layers/picture_layer.h" | 10 #include "cc/layers/picture_layer.h" |
| 11 #include "cc/scheduler/begin_frame_source.h" |
11 #include "cc/test/fake_content_layer_client.h" | 12 #include "cc/test/fake_content_layer_client.h" |
12 #include "cc/test/fake_layer_tree_host_client.h" | 13 #include "cc/test/fake_layer_tree_host_client.h" |
13 #include "cc/test/fake_picture_layer.h" | 14 #include "cc/test/fake_picture_layer.h" |
14 #include "cc/test/fake_picture_layer_impl.h" | 15 #include "cc/test/fake_picture_layer_impl.h" |
15 #include "cc/test/geometry_test_utils.h" | 16 #include "cc/test/geometry_test_utils.h" |
16 #include "cc/test/layer_tree_test.h" | 17 #include "cc/test/layer_tree_test.h" |
17 #include "cc/test/test_shared_bitmap_manager.h" | 18 #include "cc/test/test_shared_bitmap_manager.h" |
18 #include "cc/trees/layer_tree_impl.h" | 19 #include "cc/trees/layer_tree_impl.h" |
19 #include "ui/gfx/point_conversions.h" | 20 #include "ui/gfx/point_conversions.h" |
20 #include "ui/gfx/size_conversions.h" | 21 #include "ui/gfx/size_conversions.h" |
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 | 1130 |
1130 ASSERT_TRUE(impl_thread.message_loop_proxy().get()); | 1131 ASSERT_TRUE(impl_thread.message_loop_proxy().get()); |
1131 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( | 1132 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( |
1132 new TestSharedBitmapManager()); | 1133 new TestSharedBitmapManager()); |
1133 scoped_ptr<LayerTreeHost> layer_tree_host = | 1134 scoped_ptr<LayerTreeHost> layer_tree_host = |
1134 LayerTreeHost::CreateThreaded(&client, | 1135 LayerTreeHost::CreateThreaded(&client, |
1135 shared_bitmap_manager.get(), | 1136 shared_bitmap_manager.get(), |
1136 NULL, | 1137 NULL, |
1137 settings, | 1138 settings, |
1138 base::MessageLoopProxy::current(), | 1139 base::MessageLoopProxy::current(), |
1139 impl_thread.message_loop_proxy()); | 1140 impl_thread.message_loop_proxy(), |
| 1141 nullptr); |
1140 | 1142 |
1141 impl_thread.message_loop_proxy() | 1143 impl_thread.message_loop_proxy() |
1142 ->PostTask(FROM_HERE, | 1144 ->PostTask(FROM_HERE, |
1143 base::Bind(&BindInputHandlerOnCompositorThread, | 1145 base::Bind(&BindInputHandlerOnCompositorThread, |
1144 layer_tree_host->GetInputHandler(), | 1146 layer_tree_host->GetInputHandler(), |
1145 base::Unretained(&input_handler_client))); | 1147 base::Unretained(&input_handler_client))); |
1146 | 1148 |
1147 layer_tree_host->DidStopFlinging(); | 1149 layer_tree_host->DidStopFlinging(); |
1148 layer_tree_host = nullptr; | 1150 layer_tree_host = nullptr; |
1149 impl_thread.Stop(); | 1151 impl_thread.Stop(); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 RunTest(true, false, true); | 1241 RunTest(true, false, true); |
1240 } | 1242 } |
1241 | 1243 |
1242 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { | 1244 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { |
1243 scroll_destroy_whole_tree_ = true; | 1245 scroll_destroy_whole_tree_ = true; |
1244 RunTest(true, false, true); | 1246 RunTest(true, false, true); |
1245 } | 1247 } |
1246 | 1248 |
1247 } // namespace | 1249 } // namespace |
1248 } // namespace cc | 1250 } // namespace cc |
OLD | NEW |