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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 pending_layer->SetDrawsContent(true); | 62 pending_layer->SetDrawsContent(true); |
63 pending_tree->SetRootLayer(pending_layer.Pass()); | 63 pending_tree->SetRootLayer(pending_layer.Pass()); |
64 | 64 |
65 pending_layer_ = static_cast<FakePictureLayerImpl*>( | 65 pending_layer_ = static_cast<FakePictureLayerImpl*>( |
66 host_impl_.pending_tree()->LayerById(7)); | 66 host_impl_.pending_tree()->LayerById(7)); |
67 pending_layer_->DoPostCommitInitializationIfNeeded(); | |
68 } | 67 } |
69 | 68 |
70 void RunRasterQueueConstructAndIterateTest(const std::string& test_name, | 69 void RunRasterQueueConstructAndIterateTest(const std::string& test_name, |
71 int num_tiles, | 70 int num_tiles, |
72 const gfx::Size& viewport_size) { | 71 const gfx::Size& viewport_size) { |
73 host_impl_.SetViewportSize(viewport_size); | 72 host_impl_.SetViewportSize(viewport_size); |
74 host_impl_.pending_tree()->UpdateDrawProperties(); | 73 host_impl_.pending_tree()->UpdateDrawProperties(); |
75 | 74 |
76 timer_.Reset(); | 75 timer_.Reset(); |
77 do { | 76 do { |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 ASSERT_TRUE(host_impl_.tile_manager() != nullptr); | 263 ASSERT_TRUE(host_impl_.tile_manager() != nullptr); |
265 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); | 264 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); |
266 | 265 |
267 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); | 266 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); |
268 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100)); | 267 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100)); |
269 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100)); | 268 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100)); |
270 } | 269 } |
271 | 270 |
272 } // namespace | 271 } // namespace |
273 } // namespace cc | 272 } // namespace cc |
OLD | NEW |