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/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 float width = std::sqrt(static_cast<float>(num_tiles_in_high_res)); | 209 float width = std::sqrt(static_cast<float>(num_tiles_in_high_res)); |
210 float height = num_tiles_in_high_res / width; | 210 float height = num_tiles_in_high_res / width; |
211 | 211 |
212 // Adjust the width and height to account for the fact that tiles | 212 // Adjust the width and height to account for the fact that tiles |
213 // are bigger than 1x1. | 213 // are bigger than 1x1. |
214 LayerTreeSettings settings; | 214 LayerTreeSettings settings; |
215 width *= settings.default_tile_size.width(); | 215 width *= settings.default_tile_size.width(); |
216 height *= settings.default_tile_size.height(); | 216 height *= settings.default_tile_size.height(); |
217 | 217 |
218 // Ensure that we start with blank trees and no tiles. | 218 // Ensure that we start with blank trees and no tiles. |
219 host_impl()->ResetTreesForTesting(); | 219 host_impl()->ResetTrees(); |
220 | 220 |
221 gfx::Size layer_bounds(width, height); | 221 gfx::Size layer_bounds(width, height); |
222 gfx::Size viewport(width / 5, height / 5); | 222 gfx::Size viewport(width / 5, height / 5); |
223 host_impl()->SetViewportSize(viewport); | 223 host_impl()->SetViewportSize(viewport); |
224 SetupDefaultTreesWithFixedTileSize(layer_bounds, | 224 SetupDefaultTreesWithFixedTileSize(layer_bounds, |
225 settings.default_tile_size); | 225 settings.default_tile_size); |
226 | 226 |
227 std::vector<FakePictureLayerImpl*> layers; | 227 std::vector<FakePictureLayerImpl*> layers; |
228 | 228 |
229 // Pending layer counts as one layer. | 229 // Pending layer counts as one layer. |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); | 345 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); |
346 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 346 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
347 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 347 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
348 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 348 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
349 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 349 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
350 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 350 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
351 } | 351 } |
352 | 352 |
353 } // namespace | 353 } // namespace |
354 } // namespace cc | 354 } // namespace cc |
OLD | NEW |