Chromium Code Reviews| Index: cc/resources/picture_layer_tiling_perftest.cc |
| diff --git a/cc/resources/picture_layer_tiling_perftest.cc b/cc/resources/picture_layer_tiling_perftest.cc |
| index 7a9b8dff4b44c67990089cf13cd36d226e6d7138..a870f181a8303473be29719fb78ea406348fa6de 100644 |
| --- a/cc/resources/picture_layer_tiling_perftest.cc |
| +++ b/cc/resources/picture_layer_tiling_perftest.cc |
| @@ -22,6 +22,7 @@ class PictureLayerTilingPerfTest : public testing::Test { |
| virtual void SetUp() OVERRIDE { |
| picture_layer_tiling_client_.SetTileSize(gfx::Size(256, 256)); |
| + picture_layer_tiling_client_.set_max_tiles_for_interest_area(250); |
| picture_layer_tiling_ = PictureLayerTiling::Create( |
| 1, gfx::Size(256 * 50, 256 * 50), &picture_layer_tiling_client_); |
| picture_layer_tiling_->CreateAllTilesForTesting(); |
| @@ -61,36 +62,26 @@ class PictureLayerTilingPerfTest : public testing::Test { |
| num_runs_ / elapsed_.InSecondsF(), "runs/s", true); |
| } |
| - void RunUpdateTilePrioritiesStationaryTest( |
| - const std::string& test_name, |
| - const gfx::Transform& transform) { |
| + void RunUpdateTilePrioritiesStationaryTest(const std::string& test_name) { |
| start_time_ = base::TimeTicks(); |
| num_runs_ = 0; |
| gfx::Size layer_bounds(50 * 256, 50 * 256); |
| + gfx::Rect viewport_rect(0, 0, 1024, 768); |
| do { |
| picture_layer_tiling_->UpdateTilePriorities( |
| - ACTIVE_TREE, |
| - layer_bounds, |
| - gfx::Rect(layer_bounds), |
| - gfx::Rect(layer_bounds), |
| - layer_bounds, |
| - layer_bounds, |
| - 1.f, |
| - 1.f, |
| - transform, |
| - transform, |
| - num_runs_ + 1, |
| - 250); |
| + ACTIVE_TREE, viewport_rect, 1.f, num_runs_ + 1); |
| } while (DidRun()); |
| - perf_test::PrintResult("update_tile_priorities_stationary", "", test_name, |
| - num_runs_ / elapsed_.InSecondsF(), "runs/s", true); |
| + perf_test::PrintResult("update_tile_priorities_stationary", |
| + "", |
| + test_name, |
| + num_runs_ / elapsed_.InSecondsF(), |
| + "runs/s", |
| + true); |
| } |
| - void RunUpdateTilePrioritiesScrollingTest( |
| - const std::string& test_name, |
| - const gfx::Transform& transform) { |
| + void RunUpdateTilePrioritiesScrollingTest(const std::string& test_name) { |
| start_time_ = base::TimeTicks(); |
| num_runs_ = 0; |
| @@ -104,24 +95,12 @@ class PictureLayerTilingPerfTest : public testing::Test { |
| const int maxOffsetCount = 1000; |
| do { |
| picture_layer_tiling_->UpdateTilePriorities( |
| - ACTIVE_TREE, |
| - viewport_size, |
| - viewport_rect, |
| - gfx::Rect(layer_bounds), |
| - layer_bounds, |
| - layer_bounds, |
| - 1.f, |
| - 1.f, |
| - transform, |
| - transform, |
| - num_runs_ + 1, |
| - 250); |
| - |
| - viewport_rect = gfx::Rect( |
| - viewport_rect.x() + xoffsets[offsetIndex], |
| - viewport_rect.y() + yoffsets[offsetIndex], |
| - viewport_rect.width(), |
| - viewport_rect.height()); |
| + ACTIVE_TREE, viewport_rect, 1.f, num_runs_ + 1); |
| + |
| + viewport_rect = gfx::Rect(viewport_rect.x() + xoffsets[offsetIndex], |
| + viewport_rect.y() + yoffsets[offsetIndex], |
| + viewport_rect.width(), |
| + viewport_rect.height()); |
| if (++offsetCount > maxOffsetCount) { |
| offsetCount = 0; |
| @@ -129,8 +108,12 @@ class PictureLayerTilingPerfTest : public testing::Test { |
| } |
| } while (DidRun()); |
| - perf_test::PrintResult("update_tile_priorities_scrolling", "", test_name, |
| - num_runs_ / elapsed_.InSecondsF(), "runs/s", true); |
| + perf_test::PrintResult("update_tile_priorities_scrolling", |
| + "", |
| + test_name, |
| + num_runs_ / elapsed_.InSecondsF(), |
| + "runs/s", |
| + true); |
| } |
| private: |
| @@ -159,17 +142,8 @@ TEST_F(PictureLayerTilingPerfTest, DISABLED_UpdateTilePriorities) { |
| #else |
| TEST_F(PictureLayerTilingPerfTest, UpdateTilePriorities) { |
| #endif // defined(OS_ANDROID) |
| - gfx::Transform transform; |
| - RunUpdateTilePrioritiesStationaryTest("no_transform", transform); |
| - RunUpdateTilePrioritiesScrollingTest("no_transform", transform); |
| - |
| - transform.Rotate(10); |
| - RunUpdateTilePrioritiesStationaryTest("rotation", transform); |
|
enne (OOO)
2014/02/11 00:43:56
I think I maybe said remove this, but maybe leave
vmpstr
2014/02/11 23:45:25
Done.
|
| - RunUpdateTilePrioritiesScrollingTest("rotation", transform); |
| - |
| - transform.ApplyPerspectiveDepth(10); |
| - RunUpdateTilePrioritiesStationaryTest("perspective", transform); |
| - RunUpdateTilePrioritiesScrollingTest("perspective", transform); |
| + RunUpdateTilePrioritiesStationaryTest("no_transform"); |
| + RunUpdateTilePrioritiesScrollingTest("no_transform"); |
| } |
| } // namespace |