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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 1, gfx::Size(256 * 50, 256 * 50), &picture_layer_tiling_client_); | 51 1, gfx::Size(256 * 50, 256 * 50), &picture_layer_tiling_client_); |
52 picture_layer_tiling_->CreateAllTilesForTesting(); | 52 picture_layer_tiling_->CreateAllTilesForTesting(); |
53 } | 53 } |
54 | 54 |
55 void TearDown() override { picture_layer_tiling_.reset(NULL); } | 55 void TearDown() override { picture_layer_tiling_.reset(NULL); } |
56 | 56 |
57 void RunInvalidateTest(const std::string& test_name, const Region& region) { | 57 void RunInvalidateTest(const std::string& test_name, const Region& region) { |
58 timer_.Reset(); | 58 timer_.Reset(); |
59 do { | 59 do { |
60 picture_layer_tiling_->UpdateTilesToCurrentRasterSource( | 60 picture_layer_tiling_->UpdateTilesToCurrentRasterSource( |
61 region, picture_layer_tiling_->tiling_size()); | 61 picture_layer_tiling_client_.raster_source(), region, |
| 62 picture_layer_tiling_->tiling_size()); |
62 timer_.NextLap(); | 63 timer_.NextLap(); |
63 } while (!timer_.HasTimeLimitExpired()); | 64 } while (!timer_.HasTimeLimitExpired()); |
64 | 65 |
65 perf_test::PrintResult( | 66 perf_test::PrintResult( |
66 "invalidation", "", test_name, timer_.LapsPerSecond(), "runs/s", true); | 67 "invalidation", "", test_name, timer_.LapsPerSecond(), "runs/s", true); |
67 } | 68 } |
68 | 69 |
69 void RunComputeTilePriorityRectsStationaryTest( | 70 void RunComputeTilePriorityRectsStationaryTest( |
70 const std::string& test_name, | 71 const std::string& test_name, |
71 const gfx::Transform& transform) { | 72 const gfx::Transform& transform) { |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 "32_500x500", 32, gfx::Rect(0, 0, 500, 500)); | 350 "32_500x500", 32, gfx::Rect(0, 0, 500, 500)); |
350 RunEvictionIteratorConstructAndIterateTest( | 351 RunEvictionIteratorConstructAndIterateTest( |
351 "64_100x100", 64, gfx::Rect(0, 0, 100, 100)); | 352 "64_100x100", 64, gfx::Rect(0, 0, 100, 100)); |
352 RunEvictionIteratorConstructAndIterateTest( | 353 RunEvictionIteratorConstructAndIterateTest( |
353 "64_500x500", 64, gfx::Rect(0, 0, 500, 500)); | 354 "64_500x500", 64, gfx::Rect(0, 0, 500, 500)); |
354 } | 355 } |
355 | 356 |
356 } // namespace | 357 } // namespace |
357 | 358 |
358 } // namespace cc | 359 } // namespace cc |
OLD | NEW |