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 "cc/debug/lap_timer.h" | 5 #include "cc/debug/lap_timer.h" |
6 #include "cc/resources/picture_layer_tiling.h" | 6 #include "cc/resources/picture_layer_tiling.h" |
7 #include "cc/resources/resource_provider.h" | 7 #include "cc/resources/resource_provider.h" |
8 #include "cc/resources/scoped_resource.h" | 8 #include "cc/resources/scoped_resource.h" |
9 #include "cc/test/fake_output_surface.h" | 9 #include "cc/test/fake_output_surface.h" |
10 #include "cc/test/fake_output_surface_client.h" | 10 #include "cc/test/fake_output_surface_client.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 picture_layer_tiling_->CreateAllTilesForTesting(); | 52 picture_layer_tiling_->CreateAllTilesForTesting(); |
53 } | 53 } |
54 | 54 |
55 virtual void TearDown() override { | 55 virtual void TearDown() override { |
56 picture_layer_tiling_.reset(NULL); | 56 picture_layer_tiling_.reset(NULL); |
57 } | 57 } |
58 | 58 |
59 void RunInvalidateTest(const std::string& test_name, const Region& region) { | 59 void RunInvalidateTest(const std::string& test_name, const Region& region) { |
60 timer_.Reset(); | 60 timer_.Reset(); |
61 do { | 61 do { |
62 picture_layer_tiling_->UpdateTilesToCurrentPile( | 62 picture_layer_tiling_->UpdateTilesToCurrentRasterSource( |
63 region, picture_layer_tiling_->tiling_size()); | 63 region, picture_layer_tiling_->tiling_size()); |
64 timer_.NextLap(); | 64 timer_.NextLap(); |
65 } while (!timer_.HasTimeLimitExpired()); | 65 } while (!timer_.HasTimeLimitExpired()); |
66 | 66 |
67 perf_test::PrintResult( | 67 perf_test::PrintResult( |
68 "invalidation", "", test_name, timer_.LapsPerSecond(), "runs/s", true); | 68 "invalidation", "", test_name, timer_.LapsPerSecond(), "runs/s", true); |
69 } | 69 } |
70 | 70 |
71 void RunComputeTilePriorityRectsStationaryTest( | 71 void RunComputeTilePriorityRectsStationaryTest( |
72 const std::string& test_name, | 72 const std::string& test_name, |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 "32_500x500", 32, gfx::Rect(0, 0, 500, 500)); | 351 "32_500x500", 32, gfx::Rect(0, 0, 500, 500)); |
352 RunEvictionIteratorConstructAndIterateTest( | 352 RunEvictionIteratorConstructAndIterateTest( |
353 "64_100x100", 64, gfx::Rect(0, 0, 100, 100)); | 353 "64_100x100", 64, gfx::Rect(0, 0, 100, 100)); |
354 RunEvictionIteratorConstructAndIterateTest( | 354 RunEvictionIteratorConstructAndIterateTest( |
355 "64_500x500", 64, gfx::Rect(0, 0, 500, 500)); | 355 "64_500x500", 64, gfx::Rect(0, 0, 500, 500)); |
356 } | 356 } |
357 | 357 |
358 } // namespace | 358 } // namespace |
359 | 359 |
360 } // namespace cc | 360 } // namespace cc |
OLD | NEW |