| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 scoped_refptr<DisplayListRasterSource> active_raster_source) { | 157 scoped_refptr<DisplayListRasterSource> active_raster_source) { |
| 158 SetupPendingTree(active_raster_source); | 158 SetupPendingTree(active_raster_source); |
| 159 ActivateTree(); | 159 ActivateTree(); |
| 160 SetupPendingTree(pending_raster_source); | 160 SetupPendingTree(pending_raster_source); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void SetupPendingTree(scoped_refptr<DisplayListRasterSource> raster_source) { | 163 void SetupPendingTree(scoped_refptr<DisplayListRasterSource> raster_source) { |
| 164 host_impl_.CreatePendingTree(); | 164 host_impl_.CreatePendingTree(); |
| 165 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); | 165 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); |
| 166 // Clear recycled tree. | 166 // Clear recycled tree. |
| 167 pending_tree->DetachLayerTree(); | 167 pending_tree->ClearLayers(); |
| 168 | 168 |
| 169 scoped_ptr<FakePictureLayerImpl> pending_layer = | 169 scoped_ptr<FakePictureLayerImpl> pending_layer = |
| 170 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, | 170 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, id_, |
| 171 raster_source); | 171 raster_source); |
| 172 pending_layer->SetDrawsContent(true); | 172 pending_layer->SetDrawsContent(true); |
| 173 pending_layer->SetForceRenderSurface(true); | 173 pending_layer->SetForceRenderSurface(true); |
| 174 pending_tree->SetRootLayer(std::move(pending_layer)); | 174 pending_tree->SetRootLayer(std::move(pending_layer)); |
| 175 pending_tree->BuildPropertyTreesForTesting(); | 175 pending_tree->BuildPropertyTreesForTesting(); |
| 176 | 176 |
| 177 pending_root_layer_ = static_cast<FakePictureLayerImpl*>( | 177 pending_root_layer_ = static_cast<FakePictureLayerImpl*>( |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); | 474 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); |
| 475 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 475 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
| 476 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 476 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
| 477 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 477 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
| 478 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 478 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
| 479 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 479 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
| 480 } | 480 } |
| 481 | 481 |
| 482 } // namespace | 482 } // namespace |
| 483 } // namespace cc | 483 } // namespace cc |
| OLD | NEW |