Chromium Code Reviews| 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/time/time.h" | 5 #include "base/time/time.h" |
| 6 #include "cc/debug/lap_timer.h" | 6 #include "cc/debug/lap_timer.h" |
| 7 #include "cc/resources/tile.h" | 7 #include "cc/resources/tile.h" |
| 8 #include "cc/resources/tile_priority.h" | 8 #include "cc/resources/tile_priority.h" |
| 9 #include "cc/test/fake_impl_proxy.h" | 9 #include "cc/test/fake_impl_proxy.h" |
| 10 #include "cc/test/fake_layer_tree_host_impl.h" | 10 #include "cc/test/fake_layer_tree_host_impl.h" |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 344 RunManageTilesTest("5_1000", 5, 1000); | 344 RunManageTilesTest("5_1000", 5, 1000); |
| 345 RunManageTilesTest("10_100", 10, 100); | 345 RunManageTilesTest("10_100", 10, 100); |
| 346 RunManageTilesTest("10_500", 10, 500); | 346 RunManageTilesTest("10_500", 10, 500); |
| 347 RunManageTilesTest("10_1000", 10, 1000); | 347 RunManageTilesTest("10_1000", 10, 1000); |
| 348 RunManageTilesTest("100_100", 100, 100); | 348 RunManageTilesTest("100_100", 100, 100); |
| 349 RunManageTilesTest("100_500", 100, 500); | 349 RunManageTilesTest("100_500", 100, 500); |
| 350 RunManageTilesTest("100_1000", 100, 1000); | 350 RunManageTilesTest("100_1000", 100, 1000); |
| 351 } | 351 } |
| 352 | 352 |
| 353 TEST_F(TileManagerPerfTest, RasterTileQueueConstruct) { | 353 TEST_F(TileManagerPerfTest, RasterTileQueueConstruct) { |
| 354 SetupDefaultTrees(gfx::Size(10000, 10000)); | 354 SetupDefaultTrees(gfx::Size(1000, 1000)); |
|
reveman
2014/07/24 19:52:58
What's the motivation for using this specific size
vmpstr
2014/07/24 19:58:21
The problem is really just creating all the tiles
reveman
2014/07/24 20:14:37
Acknowledged.
| |
| 355 active_root_layer_->CreateDefaultTilingsAndTiles(); | 355 active_root_layer_->CreateDefaultTilingsAndTiles(); |
| 356 pending_root_layer_->CreateDefaultTilingsAndTiles(); | 356 pending_root_layer_->CreateDefaultTilingsAndTiles(); |
| 357 | 357 |
| 358 RunRasterQueueConstructTest("2"); | 358 RunRasterQueueConstructTest("2"); |
| 359 | 359 |
| 360 for (int i = 0; i < 8; ++i) { | 360 for (int i = 0; i < 8; ++i) { |
| 361 PictureLayerTiling* tiling = active_root_layer_->AddTiling(i * 0.3f); | 361 PictureLayerTiling* tiling = active_root_layer_->AddTiling(1.3f + i * 0.3f); |
| 362 tiling->CreateAllTilesForTesting(); | 362 tiling->CreateAllTilesForTesting(); |
| 363 } | 363 } |
| 364 | 364 |
| 365 RunRasterQueueConstructTest("10"); | 365 RunRasterQueueConstructTest("10"); |
| 366 | 366 |
| 367 for (int i = 0; i < 90; ++i) { | 367 for (int i = 0; i < 40; ++i) { |
| 368 PictureLayerTiling* tiling = | 368 PictureLayerTiling* tiling = |
| 369 active_root_layer_->AddTiling(1.0f + i * 0.03f); | 369 active_root_layer_->AddTiling(2.03f + i * 0.03f); |
| 370 tiling->CreateAllTilesForTesting(); | 370 tiling->CreateAllTilesForTesting(); |
| 371 } | 371 } |
| 372 | 372 |
| 373 RunRasterQueueConstructTest("100"); | 373 RunRasterQueueConstructTest("50"); |
|
reveman
2014/07/24 19:52:58
why not 100? is the overlap in scales between the
vmpstr
2014/07/24 19:58:21
I don't think there's overlap? I mean the fix was
reveman
2014/07/24 20:14:37
I meant overlap in the sense that:
1.3f + i * 0.3
vmpstr
2014/07/24 21:37:36
Ah I see what you mean. That is better, I've chang
| |
| 374 } | 374 } |
| 375 | 375 |
| 376 TEST_F(TileManagerPerfTest, RasterTileQueueConstructAndIterate) { | 376 TEST_F(TileManagerPerfTest, RasterTileQueueConstructAndIterate) { |
| 377 SetupDefaultTrees(gfx::Size(10000, 10000)); | 377 SetupDefaultTrees(gfx::Size(10000, 10000)); |
|
reveman
2014/07/24 19:52:58
should the size change here too?
vmpstr
2014/07/24 19:58:21
This needs to be large in order to get 128 tiles o
reveman
2014/07/24 20:14:38
How it is now is fine. I was just curious to why t
vmpstr
2014/07/24 21:37:35
Acknowledged.
| |
| 378 active_root_layer_->CreateDefaultTilingsAndTiles(); | 378 active_root_layer_->CreateDefaultTilingsAndTiles(); |
| 379 pending_root_layer_->CreateDefaultTilingsAndTiles(); | 379 pending_root_layer_->CreateDefaultTilingsAndTiles(); |
| 380 | 380 |
| 381 RunRasterQueueConstructAndIterateTest("2_16", 16); | 381 RunRasterQueueConstructAndIterateTest("2_16", 16); |
| 382 RunRasterQueueConstructAndIterateTest("2_32", 32); | 382 RunRasterQueueConstructAndIterateTest("2_32", 32); |
| 383 RunRasterQueueConstructAndIterateTest("2_64", 64); | 383 RunRasterQueueConstructAndIterateTest("2_64", 64); |
| 384 RunRasterQueueConstructAndIterateTest("2_128", 128); | 384 RunRasterQueueConstructAndIterateTest("2_128", 128); |
| 385 } | 385 } |
| 386 | 386 |
| 387 } // namespace | 387 } // namespace |
| 388 | 388 |
| 389 } // namespace cc | 389 } // namespace cc |
| OLD | NEW |