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

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

Issue 2650303002: cc: Remove the LayerTreeHost abstraction. (Closed)
Patch Set: missed ui Created 3 years, 11 months 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
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/proxy_impl.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/location.h" 7 #include "base/location.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 ASSERT_TRUE(impl_thread.task_runner()); 1311 ASSERT_TRUE(impl_thread.task_runner());
1312 1312
1313 bool received_stop_flinging = false; 1313 bool received_stop_flinging = false;
1314 LayerTreeSettings settings; 1314 LayerTreeSettings settings;
1315 1315
1316 StubLayerTreeHostClient layer_tree_host_client; 1316 StubLayerTreeHostClient layer_tree_host_client;
1317 TestTaskGraphRunner task_graph_runner; 1317 TestTaskGraphRunner task_graph_runner;
1318 1318
1319 auto animation_host = AnimationHost::CreateForTesting(ThreadInstance::MAIN); 1319 auto animation_host = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
1320 1320
1321 LayerTreeHostInProcess::InitParams params; 1321 LayerTreeHost::InitParams params;
1322 params.client = &layer_tree_host_client; 1322 params.client = &layer_tree_host_client;
1323 params.task_graph_runner = &task_graph_runner; 1323 params.task_graph_runner = &task_graph_runner;
1324 params.settings = &settings; 1324 params.settings = &settings;
1325 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); 1325 params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
1326 params.mutator_host = animation_host.get(); 1326 params.mutator_host = animation_host.get();
1327 std::unique_ptr<LayerTreeHostInProcess> layer_tree_host = 1327 std::unique_ptr<LayerTreeHost> layer_tree_host =
1328 LayerTreeHostInProcess::CreateThreaded(impl_thread.task_runner(), 1328 LayerTreeHost::CreateThreaded(impl_thread.task_runner(), &params);
1329 &params);
1330 1329
1331 ThreadCheckingInputHandlerClient input_handler_client( 1330 ThreadCheckingInputHandlerClient input_handler_client(
1332 impl_thread.task_runner().get(), &received_stop_flinging); 1331 impl_thread.task_runner().get(), &received_stop_flinging);
1333 impl_thread.task_runner()->PostTask( 1332 impl_thread.task_runner()->PostTask(
1334 FROM_HERE, base::Bind(&BindInputHandlerOnCompositorThread, 1333 FROM_HERE, base::Bind(&BindInputHandlerOnCompositorThread,
1335 layer_tree_host->GetInputHandler(), 1334 layer_tree_host->GetInputHandler(),
1336 base::Unretained(&input_handler_client))); 1335 base::Unretained(&input_handler_client)));
1337 1336
1338 layer_tree_host->DidStopFlinging(); 1337 layer_tree_host->DidStopFlinging();
1339 1338
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
2052 private: 2051 private:
2053 gfx::ScrollOffset initial_scroll_; 2052 gfx::ScrollOffset initial_scroll_;
2054 gfx::ScrollOffset second_scroll_; 2053 gfx::ScrollOffset second_scroll_;
2055 gfx::Vector2dF scroll_amount_; 2054 gfx::Vector2dF scroll_amount_;
2056 }; 2055 };
2057 2056
2058 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestPropertyTreeUpdate); 2057 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostScrollTestPropertyTreeUpdate);
2059 2058
2060 } // namespace 2059 } // namespace
2061 } // namespace cc 2060 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_animation.cc ('k') | cc/trees/proxy_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698