OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 void SetupPendingTree(scoped_refptr<RasterSource> raster_source) { | 165 void SetupPendingTree(scoped_refptr<RasterSource> raster_source) { |
166 host_impl_.CreatePendingTree(); | 166 host_impl_.CreatePendingTree(); |
167 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); | 167 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); |
168 // Clear recycled tree. | 168 // Clear recycled tree. |
169 pending_tree->ClearLayers(); | 169 pending_tree->ClearLayers(); |
170 | 170 |
171 std::unique_ptr<FakePictureLayerImpl> pending_layer = | 171 std::unique_ptr<FakePictureLayerImpl> pending_layer = |
172 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, | 172 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, |
173 raster_source); | 173 raster_source); |
174 pending_layer->SetDrawsContent(true); | 174 pending_layer->SetDrawsContent(true); |
175 pending_layer->SetForceRenderSurface(true); | 175 pending_layer->test_properties()->force_render_surface = true; |
176 pending_tree->SetRootLayer(std::move(pending_layer)); | 176 pending_tree->SetRootLayer(std::move(pending_layer)); |
177 pending_tree->BuildPropertyTreesForTesting(); | 177 pending_tree->BuildPropertyTreesForTesting(); |
178 | 178 |
179 pending_root_layer_ = static_cast<FakePictureLayerImpl*>( | 179 pending_root_layer_ = static_cast<FakePictureLayerImpl*>( |
180 host_impl_.pending_tree()->LayerById(id_)); | 180 host_impl_.pending_tree()->LayerById(id_)); |
181 } | 181 } |
182 | 182 |
183 void RunRasterQueueConstructTest(const std::string& test_name, | 183 void RunRasterQueueConstructTest(const std::string& test_name, |
184 int layer_count) { | 184 int layer_count) { |
185 TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES, | 185 TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES, |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); | 478 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); |
479 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 479 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
480 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 480 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
481 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 481 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
482 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 482 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
483 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 483 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
484 } | 484 } |
485 | 485 |
486 } // namespace | 486 } // namespace |
487 } // namespace cc | 487 } // namespace cc |
OLD | NEW |