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

Unified Diff: cc/resources/picture_layer_tiling_perftest.cc

Issue 398073002: cc: Add tiling raster tile iterator construction perftest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: real patch Created 6 years, 5 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 | « no previous file | no next file » | 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 a610c1ea28e9a331aa9c9f0982362b0bf54dde61..9f4f274e62d91fbf63368cdcbe15fc126cf7fc26 100644
--- a/cc/resources/picture_layer_tiling_perftest.cc
+++ b/cc/resources/picture_layer_tiling_perftest.cc
@@ -112,6 +112,29 @@ class PictureLayerTilingPerfTest : public testing::Test {
true);
}
+ void RunTilingRasterTileIteratorConstructionTest(const std::string& test_name,
+ const gfx::Rect& viewport) {
+ gfx::Size bounds(viewport.size());
+ picture_layer_tiling_ =
+ PictureLayerTiling::Create(1, bounds, &picture_layer_tiling_client_);
+ picture_layer_tiling_->UpdateTilePriorities(
+ ACTIVE_TREE, viewport, 1.0f, 1.0, NULL, NULL, gfx::Transform());
+
+ timer_.Reset();
+ do {
+ PictureLayerTiling::TilingRasterTileIterator it(
+ picture_layer_tiling_.get(), ACTIVE_TREE);
+ timer_.NextLap();
+ } while (!timer_.HasTimeLimitExpired());
+
+ perf_test::PrintResult("tiling_raster_tile_iterator_construction",
+ "",
+ test_name,
+ timer_.LapsPerSecond(),
+ "runs/s",
+ true);
+ }
+
void RunTilingRasterTileIteratorTest(const std::string& test_name,
int num_tiles,
const gfx::Rect& viewport) {
@@ -179,6 +202,17 @@ TEST_F(PictureLayerTilingPerfTest, UpdateTilePriorities) {
RunUpdateTilePrioritiesScrollingTest("perspective", transform);
}
+TEST_F(PictureLayerTilingPerfTest, TilingRasterTileIteratorConstruction) {
+ RunTilingRasterTileIteratorConstructionTest("0_0_100x100",
+ gfx::Rect(0, 0, 100, 100));
+ RunTilingRasterTileIteratorConstructionTest("50_0_100x100",
+ gfx::Rect(50, 0, 100, 100));
+ RunTilingRasterTileIteratorConstructionTest("100_0_100x100",
+ gfx::Rect(100, 0, 100, 100));
+ RunTilingRasterTileIteratorConstructionTest("150_0_100x100",
+ gfx::Rect(150, 0, 100, 100));
+}
+
TEST_F(PictureLayerTilingPerfTest, TilingRasterTileIterator) {
RunTilingRasterTileIteratorTest("32_100x100", 32, gfx::Rect(0, 0, 100, 100));
RunTilingRasterTileIteratorTest("32_500x500", 32, gfx::Rect(0, 0, 500, 500));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698