OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
6 | 6 |
7 #include "cc/debug/lap_timer.h" | 7 #include "cc/debug/lap_timer.h" |
8 #include "cc/test/fake_impl_proxy.h" | 8 #include "cc/test/fake_impl_proxy.h" |
9 #include "cc/test/fake_layer_tree_host_impl.h" | 9 #include "cc/test/fake_layer_tree_host_impl.h" |
10 #include "cc/test/fake_output_surface.h" | 10 #include "cc/test/fake_output_surface.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 | 51 |
52 void SetupPendingTree(const gfx::Size& layer_bounds, | 52 void SetupPendingTree(const gfx::Size& layer_bounds, |
53 const gfx::Size& tile_size) { | 53 const gfx::Size& tile_size) { |
54 scoped_refptr<FakePicturePileImpl> pile = | 54 scoped_refptr<FakePicturePileImpl> pile = |
55 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); | 55 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
56 host_impl_.CreatePendingTree(); | 56 host_impl_.CreatePendingTree(); |
57 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); | 57 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); |
58 pending_tree->DetachLayerTree(); | 58 pending_tree->DetachLayerTree(); |
59 | 59 |
60 scoped_ptr<FakePictureLayerImpl> pending_layer = | 60 scoped_ptr<FakePictureLayerImpl> pending_layer = |
61 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, 7, pile); | 61 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, 7, pile, |
62 false); | |
enne (OOO)
2014/12/05 23:02:02
I thought you got rid of this boolean parameter?
danakj
2014/12/06 17:14:08
I always forget to try build perf tests *^^*
| |
62 pending_layer->SetDrawsContent(true); | 63 pending_layer->SetDrawsContent(true); |
63 pending_tree->SetRootLayer(pending_layer.Pass()); | 64 pending_tree->SetRootLayer(pending_layer.Pass()); |
64 | 65 |
65 pending_layer_ = static_cast<FakePictureLayerImpl*>( | 66 pending_layer_ = static_cast<FakePictureLayerImpl*>( |
66 host_impl_.pending_tree()->LayerById(7)); | 67 host_impl_.pending_tree()->LayerById(7)); |
67 pending_layer_->DoPostCommitInitializationIfNeeded(); | 68 pending_layer_->DoPostCommitInitializationIfNeeded(); |
68 } | 69 } |
69 | 70 |
70 void RunRasterIteratorConstructAndIterateTest( | 71 void RunRasterIteratorConstructAndIterateTest( |
71 const std::string& test_name, | 72 const std::string& test_name, |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
267 ASSERT_TRUE(host_impl_.tile_manager() != nullptr); | 268 ASSERT_TRUE(host_impl_.tile_manager() != nullptr); |
268 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); | 269 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); |
269 | 270 |
270 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); | 271 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); |
271 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100)); | 272 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100)); |
272 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100)); | 273 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100)); |
273 } | 274 } |
274 | 275 |
275 } // namespace | 276 } // namespace |
276 } // namespace cc | 277 } // namespace cc |
OLD | NEW |