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

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

Issue 999173004: cc: Move worker threads to content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment and webview fix Created 5 years, 9 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
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/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 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 bool received_stop_flinging = false; 1119 bool received_stop_flinging = false;
1120 LayerTreeSettings settings; 1120 LayerTreeSettings settings;
1121 1121
1122 ThreadCheckingInputHandlerClient input_handler_client( 1122 ThreadCheckingInputHandlerClient input_handler_client(
1123 impl_thread.message_loop_proxy().get(), &received_stop_flinging); 1123 impl_thread.message_loop_proxy().get(), &received_stop_flinging);
1124 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); 1124 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
1125 1125
1126 ASSERT_TRUE(impl_thread.message_loop_proxy().get()); 1126 ASSERT_TRUE(impl_thread.message_loop_proxy().get());
1127 scoped_ptr<SharedBitmapManager> shared_bitmap_manager( 1127 scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
1128 new TestSharedBitmapManager()); 1128 new TestSharedBitmapManager());
1129 scoped_ptr<LayerTreeHost> layer_tree_host = 1129 scoped_ptr<LayerTreeHost> layer_tree_host = LayerTreeHost::CreateThreaded(
1130 LayerTreeHost::CreateThreaded(&client, 1130 &client, shared_bitmap_manager.get(), NULL, NULL, settings,
1131 shared_bitmap_manager.get(), 1131 base::MessageLoopProxy::current(), impl_thread.message_loop_proxy(),
1132 NULL, 1132 nullptr);
1133 settings,
1134 base::MessageLoopProxy::current(),
1135 impl_thread.message_loop_proxy(),
1136 nullptr);
1137 1133
1138 impl_thread.message_loop_proxy() 1134 impl_thread.message_loop_proxy()
1139 ->PostTask(FROM_HERE, 1135 ->PostTask(FROM_HERE,
1140 base::Bind(&BindInputHandlerOnCompositorThread, 1136 base::Bind(&BindInputHandlerOnCompositorThread,
1141 layer_tree_host->GetInputHandler(), 1137 layer_tree_host->GetInputHandler(),
1142 base::Unretained(&input_handler_client))); 1138 base::Unretained(&input_handler_client)));
1143 1139
1144 layer_tree_host->DidStopFlinging(); 1140 layer_tree_host->DidStopFlinging();
1145 layer_tree_host = nullptr; 1141 layer_tree_host = nullptr;
1146 impl_thread.Stop(); 1142 impl_thread.Stop();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 RunTest(true, false, true); 1230 RunTest(true, false, true);
1235 } 1231 }
1236 1232
1237 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { 1233 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) {
1238 scroll_destroy_whole_tree_ = true; 1234 scroll_destroy_whole_tree_ = true;
1239 RunTest(true, false, true); 1235 RunTest(true, false, true);
1240 } 1236 }
1241 1237
1242 } // namespace 1238 } // namespace
1243 } // namespace cc 1239 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698