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