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 "base/lazy_instance.h" | 5 #include "base/lazy_instance.h" |
6 #include "base/location.h" | 6 #include "base/location.h" |
7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "cc/debug/lap_timer.h" | 9 #include "cc/debug/lap_timer.h" |
10 #include "cc/raster/raster_buffer.h" | 10 #include "cc/raster/raster_buffer.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 void SetupPendingTree(scoped_refptr<DisplayListRasterSource> raster_source) { | 164 void SetupPendingTree(scoped_refptr<DisplayListRasterSource> raster_source) { |
165 host_impl_.CreatePendingTree(); | 165 host_impl_.CreatePendingTree(); |
166 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); | 166 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); |
167 // Clear recycled tree. | 167 // Clear recycled tree. |
168 pending_tree->DetachLayerTree(); | 168 pending_tree->DetachLayerTree(); |
169 | 169 |
170 scoped_ptr<FakePictureLayerImpl> pending_layer = | 170 scoped_ptr<FakePictureLayerImpl> pending_layer = |
171 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, | 171 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, |
172 raster_source); | 172 raster_source); |
173 pending_layer->SetDrawsContent(true); | 173 pending_layer->SetDrawsContent(true); |
174 pending_layer->SetHasRenderSurface(true); | 174 pending_layer->SetForceRenderSurface(true); |
175 pending_tree->SetRootLayer(std::move(pending_layer)); | 175 pending_tree->SetRootLayer(std::move(pending_layer)); |
176 pending_tree->BuildPropertyTreesForTesting(); | 176 pending_tree->BuildPropertyTreesForTesting(); |
177 | 177 |
178 pending_root_layer_ = static_cast<FakePictureLayerImpl*>( | 178 pending_root_layer_ = static_cast<FakePictureLayerImpl*>( |
179 host_impl_.pending_tree()->LayerById(id_)); | 179 host_impl_.pending_tree()->LayerById(id_)); |
180 } | 180 } |
181 | 181 |
182 void RunRasterQueueConstructTest(const std::string& test_name, | 182 void RunRasterQueueConstructTest(const std::string& test_name, |
183 int layer_count) { | 183 int layer_count) { |
184 TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES, | 184 TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES, |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); | 480 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); |
481 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 481 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
482 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 482 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
483 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 483 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
484 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 484 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
485 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 485 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
486 } | 486 } |
487 | 487 |
488 } // namespace | 488 } // namespace |
489 } // namespace cc | 489 } // namespace cc |
OLD | NEW |