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/content_layer.h" | 8 #include "cc/layers/content_layer.h" |
9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
10 #include "cc/layers/layer_impl.h" | 10 #include "cc/layers/layer_impl.h" |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 base::Thread impl_thread("cc"); | 727 base::Thread impl_thread("cc"); |
728 ASSERT_TRUE(impl_thread.Start()); | 728 ASSERT_TRUE(impl_thread.Start()); |
729 | 729 |
730 bool received_stop_flinging = false; | 730 bool received_stop_flinging = false; |
731 LayerTreeSettings settings; | 731 LayerTreeSettings settings; |
732 | 732 |
733 ThreadCheckingInputHandlerClient input_handler_client( | 733 ThreadCheckingInputHandlerClient input_handler_client( |
734 impl_thread.message_loop_proxy().get(), &received_stop_flinging); | 734 impl_thread.message_loop_proxy().get(), &received_stop_flinging); |
735 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); | 735 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); |
736 | 736 |
737 ASSERT_TRUE(impl_thread.message_loop_proxy()); | 737 ASSERT_TRUE(impl_thread.message_loop_proxy().get()); |
738 scoped_ptr<LayerTreeHost> layer_tree_host = | 738 scoped_ptr<LayerTreeHost> layer_tree_host = LayerTreeHost::Create( |
739 LayerTreeHost::Create(&client, | 739 &client, settings, impl_thread.message_loop_proxy()); |
740 settings, | |
741 impl_thread.message_loop_proxy()); | |
742 | 740 |
743 impl_thread.message_loop_proxy() | 741 impl_thread.message_loop_proxy() |
744 ->PostTask(FROM_HERE, | 742 ->PostTask(FROM_HERE, |
745 base::Bind(&BindInputHandlerOnCompositorThread, | 743 base::Bind(&BindInputHandlerOnCompositorThread, |
746 layer_tree_host->GetInputHandler(), | 744 layer_tree_host->GetInputHandler(), |
747 base::Unretained(&input_handler_client))); | 745 base::Unretained(&input_handler_client))); |
748 | 746 |
749 layer_tree_host->DidStopFlinging(); | 747 layer_tree_host->DidStopFlinging(); |
750 layer_tree_host.reset(); | 748 layer_tree_host.reset(); |
751 impl_thread.Stop(); | 749 impl_thread.Stop(); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 RunTest(true, false, false); | 838 RunTest(true, false, false); |
841 } | 839 } |
842 | 840 |
843 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { | 841 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { |
844 scroll_destroy_whole_tree_ = true; | 842 scroll_destroy_whole_tree_ = true; |
845 RunTest(true, false, false); | 843 RunTest(true, false, false); |
846 } | 844 } |
847 | 845 |
848 } // namespace | 846 } // namespace |
849 } // namespace cc | 847 } // namespace cc |
OLD | NEW |