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" |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1114 bool received_stop_flinging = false; | 1114 bool received_stop_flinging = false; |
1115 LayerTreeSettings settings; | 1115 LayerTreeSettings settings; |
1116 | 1116 |
1117 ThreadCheckingInputHandlerClient input_handler_client( | 1117 ThreadCheckingInputHandlerClient input_handler_client( |
1118 impl_thread.message_loop_proxy().get(), &received_stop_flinging); | 1118 impl_thread.message_loop_proxy().get(), &received_stop_flinging); |
1119 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); | 1119 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); |
1120 | 1120 |
1121 ASSERT_TRUE(impl_thread.message_loop_proxy().get()); | 1121 ASSERT_TRUE(impl_thread.message_loop_proxy().get()); |
1122 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( | 1122 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( |
1123 new TestSharedBitmapManager()); | 1123 new TestSharedBitmapManager()); |
1124 scoped_ptr<LayerTreeHost> layer_tree_host = | 1124 scoped_ptr<LayerTreeHost> layer_tree_host = LayerTreeHost::CreateThreaded( |
1125 LayerTreeHost::CreateThreaded(&client, | 1125 &client, shared_bitmap_manager.get(), NULL, NULL, settings, |
1126 shared_bitmap_manager.get(), | 1126 base::MessageLoopProxy::current(), impl_thread.message_loop_proxy(), |
1127 NULL, | 1127 nullptr); |
1128 settings, | |
1129 base::MessageLoopProxy::current(), | |
1130 impl_thread.message_loop_proxy(), | |
1131 nullptr); | |
1132 | 1128 |
1133 impl_thread.message_loop_proxy() | 1129 impl_thread.message_loop_proxy() |
1134 ->PostTask(FROM_HERE, | 1130 ->PostTask(FROM_HERE, |
1135 base::Bind(&BindInputHandlerOnCompositorThread, | 1131 base::Bind(&BindInputHandlerOnCompositorThread, |
1136 layer_tree_host->GetInputHandler(), | 1132 layer_tree_host->GetInputHandler(), |
1137 base::Unretained(&input_handler_client))); | 1133 base::Unretained(&input_handler_client))); |
1138 | 1134 |
1139 layer_tree_host->DidStopFlinging(); | 1135 layer_tree_host->DidStopFlinging(); |
1140 layer_tree_host = nullptr; | 1136 layer_tree_host = nullptr; |
1141 impl_thread.Stop(); | 1137 impl_thread.Stop(); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 RunTest(true, false, true); | 1225 RunTest(true, false, true); |
1230 } | 1226 } |
1231 | 1227 |
1232 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { | 1228 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { |
1233 scroll_destroy_whole_tree_ = true; | 1229 scroll_destroy_whole_tree_ = true; |
1234 RunTest(true, false, true); | 1230 RunTest(true, false, true); |
1235 } | 1231 } |
1236 | 1232 |
1237 } // namespace | 1233 } // namespace |
1238 } // namespace cc | 1234 } // namespace cc |
OLD | NEW |