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

Unified Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 1024633002: cc: Keep tilings texture size in sync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address vmp's comments Created 5 years, 9 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
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 26f3be56a23caebd6f0d03a887f10974c5c2ea59..0a7898670439c6531120aa997bcc4fd91d316cbe 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -4942,6 +4942,8 @@ TEST_F(TileSizeTest, TileSizes) {
// The +2's below are for border texels.
host_impl_.SetUseGpuRasterization(true);
host_impl_.SetViewportSize(gfx::Size(2000, 2000));
+
+ layer->set_gpu_raster_max_texture_size(host_impl_.device_viewport_size());
result = layer->CalculateTileSize(gfx::Size(10000, 10000));
EXPECT_EQ(result.width(), 2000);
EXPECT_EQ(result.height(), 500 + 2);
@@ -4949,6 +4951,7 @@ TEST_F(TileSizeTest, TileSizes) {
// Clamp and round-up, when smaller than viewport.
// Tile-height doubles to 50% when width shrinks to <= 50%.
host_impl_.SetViewportSize(gfx::Size(1000, 1000));
+ layer->set_gpu_raster_max_texture_size(host_impl_.device_viewport_size());
result = layer->CalculateTileSize(gfx::Size(447, 10000));
EXPECT_EQ(result.width(), 448);
EXPECT_EQ(result.height(), 500 + 2);

Powered by Google App Engine
This is Rietveld 408576698