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/raster_buffer.h" | 7 #include "cc/resources/raster_buffer.h" |
8 #include "cc/resources/tile.h" | 8 #include "cc/resources/tile.h" |
9 #include "cc/resources/tile_priority.h" | 9 #include "cc/resources/tile_priority.h" |
10 #include "cc/test/begin_frame_args_test.h" | 10 #include "cc/test/begin_frame_args_test.h" |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 bool resourceless_software_draw = false; | 381 bool resourceless_software_draw = false; |
382 do { | 382 do { |
383 BeginFrameArgs args = | 383 BeginFrameArgs args = |
384 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE); | 384 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE); |
385 host_impl_.UpdateCurrentBeginFrameArgs(args); | 385 host_impl_.UpdateCurrentBeginFrameArgs(args); |
386 for (const auto& layer : layers) | 386 for (const auto& layer : layers) |
387 layer->UpdateTiles(Occlusion(), resourceless_software_draw); | 387 layer->UpdateTiles(Occlusion(), resourceless_software_draw); |
388 | 388 |
389 GlobalStateThatImpactsTilePriority global_state(GlobalStateForTest()); | 389 GlobalStateThatImpactsTilePriority global_state(GlobalStateForTest()); |
390 tile_manager()->PrepareTiles(global_state); | 390 tile_manager()->PrepareTiles(global_state); |
391 tile_manager()->UpdateVisibleTiles(); | 391 tile_manager()->UpdateVisibleTiles(global_state); |
392 timer_.NextLap(); | 392 timer_.NextLap(); |
393 host_impl_.ResetCurrentBeginFrameArgsForNextFrame(); | 393 host_impl_.ResetCurrentBeginFrameArgsForNextFrame(); |
394 } while (!timer_.HasTimeLimitExpired()); | 394 } while (!timer_.HasTimeLimitExpired()); |
395 | 395 |
396 perf_test::PrintResult("prepare_tiles", "", test_name, | 396 perf_test::PrintResult("prepare_tiles", "", test_name, |
397 timer_.LapsPerSecond(), "runs/s", true); | 397 timer_.LapsPerSecond(), "runs/s", true); |
398 } | 398 } |
399 | 399 |
400 TileManager* tile_manager() { return host_impl_.tile_manager(); } | 400 TileManager* tile_manager() { return host_impl_.tile_manager(); } |
401 | 401 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); | 467 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); |
468 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 468 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
469 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 469 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
470 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 470 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
471 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 471 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
472 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 472 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
473 } | 473 } |
474 | 474 |
475 } // namespace | 475 } // namespace |
476 } // namespace cc | 476 } // namespace cc |
OLD | NEW |