| 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 } | 393 } |
| 394 | 394 |
| 395 void RunManageTilesTest(const std::string& test_name, | 395 void RunManageTilesTest(const std::string& test_name, |
| 396 int layer_count, | 396 int layer_count, |
| 397 int approximate_tile_count_per_layer) { | 397 int approximate_tile_count_per_layer) { |
| 398 std::vector<LayerImpl*> layers = | 398 std::vector<LayerImpl*> layers = |
| 399 CreateLayers(layer_count, approximate_tile_count_per_layer); | 399 CreateLayers(layer_count, approximate_tile_count_per_layer); |
| 400 timer_.Reset(); | 400 timer_.Reset(); |
| 401 bool resourceless_software_draw = false; | 401 bool resourceless_software_draw = false; |
| 402 do { | 402 do { |
| 403 BeginFrameArgs args = CreateBeginFrameArgsForTesting(); | 403 BeginFrameArgs args = |
| 404 CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE); |
| 404 host_impl_.UpdateCurrentBeginFrameArgs(args); | 405 host_impl_.UpdateCurrentBeginFrameArgs(args); |
| 405 for (unsigned i = 0; i < layers.size(); ++i) { | 406 for (unsigned i = 0; i < layers.size(); ++i) { |
| 406 layers[i]->UpdateTiles(Occlusion(), resourceless_software_draw); | 407 layers[i]->UpdateTiles(Occlusion(), resourceless_software_draw); |
| 407 } | 408 } |
| 408 | 409 |
| 409 GlobalStateThatImpactsTilePriority global_state(GlobalStateForTest()); | 410 GlobalStateThatImpactsTilePriority global_state(GlobalStateForTest()); |
| 410 tile_manager()->ManageTiles(global_state); | 411 tile_manager()->ManageTiles(global_state); |
| 411 tile_manager()->UpdateVisibleTiles(); | 412 tile_manager()->UpdateVisibleTiles(); |
| 412 timer_.NextLap(); | 413 timer_.NextLap(); |
| 413 host_impl_.ResetCurrentBeginFrameArgsForNextFrame(); | 414 host_impl_.ResetCurrentBeginFrameArgsForNextFrame(); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 489 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
| 489 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 490 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
| 490 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 491 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
| 491 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 492 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
| 492 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 493 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
| 493 } | 494 } |
| 494 | 495 |
| 495 } // namespace | 496 } // namespace |
| 496 | 497 |
| 497 } // namespace cc | 498 } // namespace cc |
| OLD | NEW |