Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Side by Side Diff: cc/trees/layer_tree_host_unittest_scroll.cc

Issue 61823008: Introduce separate client and init path for single-threaded cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 ASSERT_TRUE(impl_thread.Start()); 1005 ASSERT_TRUE(impl_thread.Start());
1006 1006
1007 bool received_stop_flinging = false; 1007 bool received_stop_flinging = false;
1008 LayerTreeSettings settings; 1008 LayerTreeSettings settings;
1009 1009
1010 ThreadCheckingInputHandlerClient input_handler_client( 1010 ThreadCheckingInputHandlerClient input_handler_client(
1011 impl_thread.message_loop_proxy().get(), &received_stop_flinging); 1011 impl_thread.message_loop_proxy().get(), &received_stop_flinging);
1012 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); 1012 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
1013 1013
1014 ASSERT_TRUE(impl_thread.message_loop_proxy().get()); 1014 ASSERT_TRUE(impl_thread.message_loop_proxy().get());
1015 scoped_ptr<LayerTreeHost> layer_tree_host = LayerTreeHost::Create( 1015 scoped_ptr<LayerTreeHost> layer_tree_host = LayerTreeHost::CreateThreaded(
1016 &client, NULL, settings, impl_thread.message_loop_proxy()); 1016 &client, NULL, settings, impl_thread.message_loop_proxy());
1017 1017
1018 impl_thread.message_loop_proxy() 1018 impl_thread.message_loop_proxy()
1019 ->PostTask(FROM_HERE, 1019 ->PostTask(FROM_HERE,
1020 base::Bind(&BindInputHandlerOnCompositorThread, 1020 base::Bind(&BindInputHandlerOnCompositorThread,
1021 layer_tree_host->GetInputHandler(), 1021 layer_tree_host->GetInputHandler(),
1022 base::Unretained(&input_handler_client))); 1022 base::Unretained(&input_handler_client)));
1023 1023
1024 layer_tree_host->DidStopFlinging(); 1024 layer_tree_host->DidStopFlinging();
1025 layer_tree_host.reset(); 1025 layer_tree_host.reset();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 RunTest(true, false, false); 1116 RunTest(true, false, false);
1117 } 1117 }
1118 1118
1119 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { 1119 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) {
1120 scroll_destroy_whole_tree_ = true; 1120 scroll_destroy_whole_tree_ = true;
1121 RunTest(true, false, false); 1121 RunTest(true, false, false);
1122 } 1122 }
1123 1123
1124 } // namespace 1124 } // namespace
1125 } // namespace cc 1125 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/single_thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698