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

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

Issue 202763002: Switch to use SharedBitmapManager all the time in cc_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/occlusion_tracker_perftest.cc » ('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"
11 #include "cc/test/fake_content_layer_client.h" 11 #include "cc/test/fake_content_layer_client.h"
12 #include "cc/test/fake_layer_tree_host_client.h" 12 #include "cc/test/fake_layer_tree_host_client.h"
13 #include "cc/test/geometry_test_utils.h" 13 #include "cc/test/geometry_test_utils.h"
14 #include "cc/test/layer_tree_test.h" 14 #include "cc/test/layer_tree_test.h"
15 #include "cc/test/test_shared_bitmap_manager.h"
15 #include "cc/trees/layer_tree_impl.h" 16 #include "cc/trees/layer_tree_impl.h"
16 #include "ui/gfx/point_conversions.h" 17 #include "ui/gfx/point_conversions.h"
17 #include "ui/gfx/size_conversions.h" 18 #include "ui/gfx/size_conversions.h"
18 #include "ui/gfx/vector2d_conversions.h" 19 #include "ui/gfx/vector2d_conversions.h"
19 20
20 namespace cc { 21 namespace cc {
21 namespace { 22 namespace {
22 23
23 class LayerTreeHostScrollTest : public LayerTreeTest {}; 24 class LayerTreeHostScrollTest : public LayerTreeTest {};
24 25
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 ASSERT_TRUE(impl_thread.Start()); 1109 ASSERT_TRUE(impl_thread.Start());
1109 1110
1110 bool received_stop_flinging = false; 1111 bool received_stop_flinging = false;
1111 LayerTreeSettings settings; 1112 LayerTreeSettings settings;
1112 1113
1113 ThreadCheckingInputHandlerClient input_handler_client( 1114 ThreadCheckingInputHandlerClient input_handler_client(
1114 impl_thread.message_loop_proxy().get(), &received_stop_flinging); 1115 impl_thread.message_loop_proxy().get(), &received_stop_flinging);
1115 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D); 1116 FakeLayerTreeHostClient client(FakeLayerTreeHostClient::DIRECT_3D);
1116 1117
1117 ASSERT_TRUE(impl_thread.message_loop_proxy().get()); 1118 ASSERT_TRUE(impl_thread.message_loop_proxy().get());
1118 scoped_ptr<LayerTreeHost> layer_tree_host = LayerTreeHost::CreateThreaded( 1119 scoped_ptr<SharedBitmapManager> shared_bitmap_manager(
1119 &client, NULL, settings, impl_thread.message_loop_proxy()); 1120 new TestSharedBitmapManager());
1121 scoped_ptr<LayerTreeHost> layer_tree_host =
1122 LayerTreeHost::CreateThreaded(&client,
1123 shared_bitmap_manager.get(),
1124 settings,
1125 impl_thread.message_loop_proxy());
1120 1126
1121 impl_thread.message_loop_proxy() 1127 impl_thread.message_loop_proxy()
1122 ->PostTask(FROM_HERE, 1128 ->PostTask(FROM_HERE,
1123 base::Bind(&BindInputHandlerOnCompositorThread, 1129 base::Bind(&BindInputHandlerOnCompositorThread,
1124 layer_tree_host->GetInputHandler(), 1130 layer_tree_host->GetInputHandler(),
1125 base::Unretained(&input_handler_client))); 1131 base::Unretained(&input_handler_client)));
1126 1132
1127 layer_tree_host->DidStopFlinging(); 1133 layer_tree_host->DidStopFlinging();
1128 layer_tree_host.reset(); 1134 layer_tree_host.reset();
1129 impl_thread.Stop(); 1135 impl_thread.Stop();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 RunTest(true, false, false); 1226 RunTest(true, false, false);
1221 } 1227 }
1222 1228
1223 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) { 1229 TEST_F(LayerTreeHostScrollTestLayerStructureChange, ScrollDestroyWholeTree) {
1224 scroll_destroy_whole_tree_ = true; 1230 scroll_destroy_whole_tree_ = true;
1225 RunTest(true, false, false); 1231 RunTest(true, false, false);
1226 } 1232 }
1227 1233
1228 } // namespace 1234 } // namespace
1229 } // namespace cc 1235 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/occlusion_tracker_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698