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

Unified Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 626113004: CC: Have GPU-raster tiles exactly match the viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@CC_cleanup_tile_grid_size
Patch Set: Rebase. Created 6 years, 2 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/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl_unittest.cc
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index b25a9d504aa365c650ad3814006ec56405ec754b..5d8026872de877f9905c6bb0fe36fa9c99169b3a 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -4408,22 +4408,22 @@ TEST_F(TileSizeTest, TileSizes) {
EXPECT_EQ(result.width(), 200);
EXPECT_EQ(result.height(), 200);
- host_impl_.SetUseGpuRasterization(true);
-
// Gpu-rasterization uses 25% viewport-height tiles.
+ // The +2's below are for border texels.
+ host_impl_.SetUseGpuRasterization(true);
result = layer->CalculateTileSize(gfx::Size(10000, 10000));
EXPECT_EQ(result.width(), 1000);
- EXPECT_EQ(result.height(), 250);
+ EXPECT_EQ(result.height(), 250 + 2);
// Clamp and round-up, when smaller than viewport.
result = layer->CalculateTileSize(gfx::Size(831, 10000));
EXPECT_EQ(result.width(), 832);
- EXPECT_EQ(result.height(), 250);
+ EXPECT_EQ(result.height(), 250 + 2);
// Tile-height doubles to 50% when width shrinks to <= 50%.
enne (OOO) 2014/10/10 00:06:05 For what it's worth, I think this "viewport / 4" m
result = layer->CalculateTileSize(gfx::Size(447, 10000));
EXPECT_EQ(result.width(), 448);
- EXPECT_EQ(result.height(), 500);
+ EXPECT_EQ(result.height(), 500 + 2);
// Largest layer is 50% of viewport width (rounded up), and
// 50% of viewport in height.
@@ -4432,7 +4432,7 @@ TEST_F(TileSizeTest, TileSizes) {
EXPECT_EQ(result.height(), 448);
result = layer->CalculateTileSize(gfx::Size(500, 499));
EXPECT_EQ(result.width(), 512);
- EXPECT_EQ(result.height(), 500);
+ EXPECT_EQ(result.height(), 500 + 2);
}
} // namespace
« no previous file with comments | « cc/layers/picture_layer_impl.cc ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698