Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Unified Diff: cc/resources/picture_layer_tiling_perftest.cc

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e4d7b5d16ff1c9bb6693b06449b9d3445a20c0b2..4db7fe6e62221302cb226b5038059be7f371df29 100644
--- a/cc/resources/picture_layer_tiling_perftest.cc
+++ b/cc/resources/picture_layer_tiling_perftest.cc
@@ -128,73 +128,6 @@ class PictureLayerTilingPerfTest : public testing::Test {
true);
}
- void RunRasterIteratorConstructTest(const std::string& test_name,
- const gfx::Rect& viewport) {
- LayerTreeSettings defaults;
- scoped_refptr<FakePicturePileImpl> pile =
- FakePicturePileImpl::CreateFilledPileWithDefaultTileSize(
- viewport.size());
- picture_layer_tiling_ = PictureLayerTiling::Create(
- 1, pile, &picture_layer_tiling_client_,
- defaults.max_tiles_for_interest_area,
- defaults.skewport_target_time_in_seconds,
- defaults.skewport_extrapolation_limit_in_content_pixels);
- picture_layer_tiling_client_.set_tree(ACTIVE_TREE);
- picture_layer_tiling_->ComputeTilePriorityRects(viewport, 1.0f, 1.0,
- Occlusion());
-
- timer_.Reset();
- do {
- PictureLayerTiling::TilingRasterTileIterator it(
- picture_layer_tiling_.get());
- timer_.NextLap();
- } while (!timer_.HasTimeLimitExpired());
-
- perf_test::PrintResult("tiling_raster_tile_iterator_construct",
- "",
- test_name,
- timer_.LapsPerSecond(),
- "runs/s",
- true);
- }
-
- void RunRasterIteratorConstructAndIterateTest(const std::string& test_name,
- int num_tiles,
- const gfx::Rect& viewport) {
- gfx::Size bounds(10000, 10000);
- LayerTreeSettings defaults;
- scoped_refptr<FakePicturePileImpl> pile =
- FakePicturePileImpl::CreateFilledPileWithDefaultTileSize(bounds);
- picture_layer_tiling_ = PictureLayerTiling::Create(
- 1, pile, &picture_layer_tiling_client_,
- defaults.max_tiles_for_interest_area,
- defaults.skewport_target_time_in_seconds,
- defaults.skewport_extrapolation_limit_in_content_pixels);
- picture_layer_tiling_client_.set_tree(ACTIVE_TREE);
- picture_layer_tiling_->ComputeTilePriorityRects(viewport, 1.0f, 1.0,
- Occlusion());
-
- timer_.Reset();
- do {
- int count = num_tiles;
- PictureLayerTiling::TilingRasterTileIterator it(
- picture_layer_tiling_.get());
- while (count--) {
- ASSERT_TRUE(it) << "count: " << count;
- ASSERT_TRUE(*it != NULL) << "count: " << count;
- ++it;
- }
- timer_.NextLap();
- } while (!timer_.HasTimeLimitExpired());
-
- perf_test::PrintResult("tiling_raster_tile_iterator_construct_and_iterate",
- "",
- test_name,
- timer_.LapsPerSecond(),
- "runs/s",
- true);
- }
-
private:
FakePictureLayerTilingClient picture_layer_tiling_client_;
scoped_ptr<PictureLayerTiling> picture_layer_tiling_;
@@ -239,25 +172,5 @@ TEST_F(PictureLayerTilingPerfTest, ComputeTilePriorityRects) {
RunComputeTilePriorityRectsScrollingTest("perspective", transform);
}
-TEST_F(PictureLayerTilingPerfTest, TilingRasterTileIteratorConstruct) {
- RunRasterIteratorConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100));
- RunRasterIteratorConstructTest("50_0_100x100", gfx::Rect(50, 0, 100, 100));
- RunRasterIteratorConstructTest("100_0_100x100", gfx::Rect(100, 0, 100, 100));
- RunRasterIteratorConstructTest("150_0_100x100", gfx::Rect(150, 0, 100, 100));
-}
-
-TEST_F(PictureLayerTilingPerfTest,
- TilingRasterTileIteratorConstructAndIterate) {
- RunRasterIteratorConstructAndIterateTest(
- "32_100x100", 32, gfx::Rect(0, 0, 100, 100));
- RunRasterIteratorConstructAndIterateTest(
- "32_500x500", 32, gfx::Rect(0, 0, 500, 500));
- RunRasterIteratorConstructAndIterateTest(
- "64_100x100", 64, gfx::Rect(0, 0, 100, 100));
- RunRasterIteratorConstructAndIterateTest(
- "64_500x500", 64, gfx::Rect(0, 0, 500, 500));
-}
-
} // namespace
-
} // namespace cc
« no previous file with comments | « cc/resources/picture_layer_tiling.cc ('k') | cc/resources/picture_layer_tiling_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698