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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 void SetupPendingTree(scoped_refptr<DisplayListRasterSource> raster_source) { | 162 void SetupPendingTree(scoped_refptr<DisplayListRasterSource> raster_source) { |
163 host_impl_.CreatePendingTree(); | 163 host_impl_.CreatePendingTree(); |
164 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); | 164 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); |
165 // Clear recycled tree. | 165 // Clear recycled tree. |
166 pending_tree->DetachLayerTree(); | 166 pending_tree->DetachLayerTree(); |
167 | 167 |
168 scoped_ptr<FakePictureLayerImpl> pending_layer = | 168 scoped_ptr<FakePictureLayerImpl> pending_layer = |
169 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, | 169 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, |
170 raster_source); | 170 raster_source); |
171 pending_layer->SetDrawsContent(true); | 171 pending_layer->SetDrawsContent(true); |
172 pending_layer->SetForceRenderSurface(true); | 172 pending_layer->SetHasRenderSurface(true); |
173 pending_tree->SetRootLayer(std::move(pending_layer)); | 173 pending_tree->SetRootLayer(std::move(pending_layer)); |
174 pending_tree->BuildPropertyTreesForTesting(); | 174 pending_tree->BuildPropertyTreesForTesting(); |
175 | 175 |
176 pending_root_layer_ = static_cast<FakePictureLayerImpl*>( | 176 pending_root_layer_ = static_cast<FakePictureLayerImpl*>( |
177 host_impl_.pending_tree()->LayerById(id_)); | 177 host_impl_.pending_tree()->LayerById(id_)); |
178 } | 178 } |
179 | 179 |
180 void RunRasterQueueConstructTest(const std::string& test_name, | 180 void RunRasterQueueConstructTest(const std::string& test_name, |
181 int layer_count) { | 181 int layer_count) { |
182 TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES, | 182 TreePriority priorities[] = {SAME_PRIORITY_FOR_BOTH_TREES, |
(...skipping 295 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 |