| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 host_impl_.active_tree()->LayerById(id_)); | 147 host_impl_.active_tree()->LayerById(id_)); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void SetupDefaultTreesWithFixedTileSize(const gfx::Size& layer_bounds, | 150 void SetupDefaultTreesWithFixedTileSize(const gfx::Size& layer_bounds, |
| 151 const gfx::Size& tile_size) { | 151 const gfx::Size& tile_size) { |
| 152 SetupDefaultTrees(layer_bounds); | 152 SetupDefaultTrees(layer_bounds); |
| 153 pending_root_layer_->set_fixed_tile_size(tile_size); | 153 pending_root_layer_->set_fixed_tile_size(tile_size); |
| 154 active_root_layer_->set_fixed_tile_size(tile_size); | 154 active_root_layer_->set_fixed_tile_size(tile_size); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void SetupTrees(scoped_refptr<RasterSource> pending_raster_source, | 157 void SetupTrees(scoped_refptr<DisplayListRasterSource> pending_raster_source, |
| 158 scoped_refptr<RasterSource> active_raster_source) { | 158 scoped_refptr<DisplayListRasterSource> active_raster_source) { |
| 159 SetupPendingTree(active_raster_source); | 159 SetupPendingTree(active_raster_source); |
| 160 ActivateTree(); | 160 ActivateTree(); |
| 161 SetupPendingTree(pending_raster_source); | 161 SetupPendingTree(pending_raster_source); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void SetupPendingTree(scoped_refptr<RasterSource> 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->SetHasRenderSurface(true); |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); | 476 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); |
| 477 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 477 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
| 478 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 478 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
| 479 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 479 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
| 480 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 480 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
| 481 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 481 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
| 482 } | 482 } |
| 483 | 483 |
| 484 } // namespace | 484 } // namespace |
| 485 } // namespace cc | 485 } // namespace cc |
| OLD | NEW |