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/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 host_impl()->pending_tree(), next_id, raster_source); | 243 host_impl()->pending_tree(), next_id, raster_source); |
244 child_layer->SetBounds(layer_bounds); | 244 child_layer->SetBounds(layer_bounds); |
245 child_layer->SetDrawsContent(true); | 245 child_layer->SetDrawsContent(true); |
246 layers.push_back(child_layer.get()); | 246 layers.push_back(child_layer.get()); |
247 pending_layer()->AddChild(std::move(child_layer)); | 247 pending_layer()->AddChild(std::move(child_layer)); |
248 ++next_id; | 248 ++next_id; |
249 } | 249 } |
250 | 250 |
251 // Property trees need to be rebuilt because layers were added above. | 251 // Property trees need to be rebuilt because layers were added above. |
252 host_impl()->pending_tree()->property_trees()->needs_rebuild = true; | 252 host_impl()->pending_tree()->property_trees()->needs_rebuild = true; |
253 host_impl()->pending_tree()->BuildPropertyTreesForTesting(); | 253 host_impl()->pending_tree()->BuildLayerListAndPropertyTreesForTesting(); |
254 bool update_lcd_text = false; | 254 bool update_lcd_text = false; |
255 host_impl()->pending_tree()->UpdateDrawProperties(update_lcd_text); | 255 host_impl()->pending_tree()->UpdateDrawProperties(update_lcd_text); |
256 for (FakePictureLayerImpl* layer : layers) | 256 for (FakePictureLayerImpl* layer : layers) |
257 layer->CreateAllTiles(); | 257 layer->CreateAllTiles(); |
258 | 258 |
259 return layers; | 259 return layers; |
260 } | 260 } |
261 | 261 |
262 GlobalStateThatImpactsTilePriority GlobalStateForTest() { | 262 GlobalStateThatImpactsTilePriority GlobalStateForTest() { |
263 GlobalStateThatImpactsTilePriority state; | 263 GlobalStateThatImpactsTilePriority state; |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); | 349 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); |
350 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 350 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
351 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 351 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
352 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 352 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
353 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 353 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
354 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 354 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
355 } | 355 } |
356 | 356 |
357 } // namespace | 357 } // namespace |
358 } // namespace cc | 358 } // namespace cc |
OLD | NEW |