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

Side by Side Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 751453005: Clip a layer when its render target's render surface is clipped. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix existing unit tests Created 6 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/tiled_layer_unittest.cc » ('j') | cc/trees/layer_tree_host_common.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/layers/picture_layer_impl.h" 5 #include "cc/layers/picture_layer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <utility> 10 #include <utility>
(...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 1865
1866 // Neither the high res nor the ideal tiles were considered as incomplete. 1866 // Neither the high res nor the ideal tiles were considered as incomplete.
1867 EXPECT_EQ(0u, data.num_missing_tiles); 1867 EXPECT_EQ(0u, data.num_missing_tiles);
1868 EXPECT_EQ(0u, data.num_incomplete_tiles); 1868 EXPECT_EQ(0u, data.num_incomplete_tiles);
1869 EXPECT_FALSE(active_layer_->only_used_low_res_last_append_quads()); 1869 EXPECT_FALSE(active_layer_->only_used_low_res_last_append_quads());
1870 } 1870 }
1871 1871
1872 TEST_F(PictureLayerImplTest, HighResRequiredWhenUnsharedActiveAllReady) { 1872 TEST_F(PictureLayerImplTest, HighResRequiredWhenUnsharedActiveAllReady) {
1873 gfx::Size layer_bounds(400, 400); 1873 gfx::Size layer_bounds(400, 400);
1874 gfx::Size tile_size(100, 100); 1874 gfx::Size tile_size(100, 100);
1875
1876 host_impl_.SetViewportSize(layer_bounds);
1877
1875 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); 1878 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
1876 1879
1877 // No tiles shared. 1880 // No tiles shared.
1878 pending_layer_->set_invalidation(gfx::Rect(layer_bounds)); 1881 pending_layer_->set_invalidation(gfx::Rect(layer_bounds));
1879 1882
1880 CreateHighLowResAndSetAllTilesVisible(); 1883 CreateHighLowResAndSetAllTilesVisible();
1881 1884
1882 active_layer_->SetAllTilesReady(); 1885 active_layer_->SetAllTilesReady();
1883 1886
1884 // No shared tiles and all active tiles ready, so pending can only 1887 // No shared tiles and all active tiles ready, so pending can only
1885 // activate with all high res tiles. 1888 // activate with all high res tiles.
1886 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting(); 1889 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting();
1887 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting(); 1890 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting();
1888 1891
1889 AssertAllTilesRequired(pending_layer_->HighResTiling()); 1892 AssertAllTilesRequired(pending_layer_->HighResTiling());
1890 AssertNoTilesRequired(pending_layer_->LowResTiling()); 1893 AssertNoTilesRequired(pending_layer_->LowResTiling());
1891 } 1894 }
1892 1895
1893 TEST_F(PictureLayerImplTest, HighResRequiredWhenMissingHighResFlagOn) { 1896 TEST_F(PictureLayerImplTest, HighResRequiredWhenMissingHighResFlagOn) {
1894 gfx::Size layer_bounds(400, 400); 1897 gfx::Size layer_bounds(400, 400);
1895 gfx::Size tile_size(100, 100); 1898 gfx::Size tile_size(100, 100);
1899
1900 host_impl_.SetViewportSize(layer_bounds);
1901
1896 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); 1902 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
1897 1903
1898 // All tiles shared (no invalidation). 1904 // All tiles shared (no invalidation).
1899 CreateHighLowResAndSetAllTilesVisible(); 1905 CreateHighLowResAndSetAllTilesVisible();
1900 1906
1901 // Verify active tree not ready. 1907 // Verify active tree not ready.
1902 Tile* some_active_tile = 1908 Tile* some_active_tile =
1903 active_layer_->HighResTiling()->AllTilesForTesting()[0]; 1909 active_layer_->HighResTiling()->AllTilesForTesting()[0];
1904 EXPECT_FALSE(some_active_tile->IsReadyToDraw()); 1910 EXPECT_FALSE(some_active_tile->IsReadyToDraw());
1905 1911
1906 // When high res are required, even if the active tree is not ready, 1912 // When high res are required, even if the active tree is not ready,
1907 // the high res tiles must be ready. 1913 // the high res tiles must be ready.
1908 host_impl_.SetRequiresHighResToDraw(); 1914 host_impl_.SetRequiresHighResToDraw();
1909 1915
1910 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting(); 1916 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting();
1911 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting(); 1917 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting();
1912 1918
1913 AssertAllTilesRequired(pending_layer_->HighResTiling()); 1919 AssertAllTilesRequired(pending_layer_->HighResTiling());
1914 AssertNoTilesRequired(pending_layer_->LowResTiling()); 1920 AssertNoTilesRequired(pending_layer_->LowResTiling());
1915 } 1921 }
1916 1922
1917 TEST_F(PictureLayerImplTest, AllHighResRequiredEvenIfShared) { 1923 TEST_F(PictureLayerImplTest, AllHighResRequiredEvenIfShared) {
1918 gfx::Size layer_bounds(400, 400); 1924 gfx::Size layer_bounds(400, 400);
1919 gfx::Size tile_size(100, 100); 1925 gfx::Size tile_size(100, 100);
1926
1927 host_impl_.SetViewportSize(layer_bounds);
1928
1920 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); 1929 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
1921 1930
1922 CreateHighLowResAndSetAllTilesVisible(); 1931 CreateHighLowResAndSetAllTilesVisible();
1923 1932
1924 Tile* some_active_tile = 1933 Tile* some_active_tile =
1925 active_layer_->HighResTiling()->AllTilesForTesting()[0]; 1934 active_layer_->HighResTiling()->AllTilesForTesting()[0];
1926 EXPECT_FALSE(some_active_tile->IsReadyToDraw()); 1935 EXPECT_FALSE(some_active_tile->IsReadyToDraw());
1927 1936
1928 // All tiles shared (no invalidation), so even though the active tree's 1937 // All tiles shared (no invalidation), so even though the active tree's
1929 // tiles aren't ready, the high res tiles are required for activation. 1938 // tiles aren't ready, the high res tiles are required for activation.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting(); 1993 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting();
1985 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting(); 1994 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting();
1986 1995
1987 AssertNoTilesRequired(pending_layer_->HighResTiling()); 1996 AssertNoTilesRequired(pending_layer_->HighResTiling());
1988 AssertNoTilesRequired(pending_layer_->LowResTiling()); 1997 AssertNoTilesRequired(pending_layer_->LowResTiling());
1989 } 1998 }
1990 1999
1991 TEST_F(PictureLayerImplTest, HighResRequiredIfActiveCantHaveTiles) { 2000 TEST_F(PictureLayerImplTest, HighResRequiredIfActiveCantHaveTiles) {
1992 gfx::Size layer_bounds(400, 400); 2001 gfx::Size layer_bounds(400, 400);
1993 gfx::Size tile_size(100, 100); 2002 gfx::Size tile_size(100, 100);
2003
2004 host_impl_.SetViewportSize(layer_bounds);
2005
1994 scoped_refptr<FakePicturePileImpl> pending_pile = 2006 scoped_refptr<FakePicturePileImpl> pending_pile =
1995 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); 2007 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
1996 scoped_refptr<FakePicturePileImpl> active_pile = 2008 scoped_refptr<FakePicturePileImpl> active_pile =
1997 FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds); 2009 FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds);
1998 SetupTrees(pending_pile, active_pile); 2010 SetupTrees(pending_pile, active_pile);
1999 pending_layer_->set_fixed_tile_size(tile_size); 2011 pending_layer_->set_fixed_tile_size(tile_size);
2000 active_layer_->set_fixed_tile_size(tile_size); 2012 active_layer_->set_fixed_tile_size(tile_size);
2001 2013
2002 CreateHighLowResAndSetAllTilesVisible(); 2014 CreateHighLowResAndSetAllTilesVisible();
2003 2015
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
3130 page_scale, 3142 page_scale,
3131 maximum_animation_scale, 3143 maximum_animation_scale,
3132 animating_transform); 3144 animating_transform);
3133 EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 1.f); 3145 EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 1.f);
3134 } 3146 }
3135 3147
3136 TEST_F(PictureLayerImplTest, LowResReadyToDrawNotEnoughToActivate) { 3148 TEST_F(PictureLayerImplTest, LowResReadyToDrawNotEnoughToActivate) {
3137 gfx::Size tile_size(100, 100); 3149 gfx::Size tile_size(100, 100);
3138 gfx::Size layer_bounds(1000, 1000); 3150 gfx::Size layer_bounds(1000, 1000);
3139 3151
3152 host_impl_.SetViewportSize(layer_bounds);
3153
3140 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); 3154 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
3141 3155
3142 // Make sure some tiles are not shared. 3156 // Make sure some tiles are not shared.
3143 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); 3157 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size));
3144 3158
3145 CreateHighLowResAndSetAllTilesVisible(); 3159 CreateHighLowResAndSetAllTilesVisible();
3146 active_layer_->SetAllTilesReady(); 3160 active_layer_->SetAllTilesReady();
3147 3161
3148 // All pending layer tiles required are not ready. 3162 // All pending layer tiles required are not ready.
3149 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); 3163 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
3150 3164
3151 // Initialize all low-res tiles. 3165 // Initialize all low-res tiles.
3152 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->LowResTiling()); 3166 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->LowResTiling());
3153 3167
3154 // Low-res tiles should not be enough. 3168 // Low-res tiles should not be enough.
3155 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); 3169 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
3156 3170
3157 // Initialize remaining tiles. 3171 // Initialize remaining tiles.
3158 pending_layer_->SetAllTilesReady(); 3172 pending_layer_->SetAllTilesReady();
3159 3173
3160 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); 3174 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
3161 } 3175 }
3162 3176
3163 TEST_F(PictureLayerImplTest, HighResReadyToDrawEnoughToActivate) { 3177 TEST_F(PictureLayerImplTest, HighResReadyToDrawEnoughToActivate) {
3164 gfx::Size tile_size(100, 100); 3178 gfx::Size tile_size(100, 100);
3165 gfx::Size layer_bounds(1000, 1000); 3179 gfx::Size layer_bounds(1000, 1000);
3166 3180
3181 host_impl_.SetViewportSize(layer_bounds);
3182
3167 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); 3183 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
3168 3184
3169 // Make sure some tiles are not shared. 3185 // Make sure some tiles are not shared.
3170 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); 3186 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size));
3171 3187
3172 CreateHighLowResAndSetAllTilesVisible(); 3188 CreateHighLowResAndSetAllTilesVisible();
3173 active_layer_->SetAllTilesReady(); 3189 active_layer_->SetAllTilesReady();
3174 3190
3175 // All pending layer tiles required are not ready. 3191 // All pending layer tiles required are not ready.
3176 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); 3192 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
3177 3193
3178 // Initialize all high-res tiles. 3194 // Initialize all high-res tiles.
3179 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling()); 3195 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling());
3180 3196
3181 // High-res tiles should be enough, since they cover everything visible. 3197 // High-res tiles should be enough, since they cover everything visible.
3182 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); 3198 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
3183 } 3199 }
3184 3200
3185 TEST_F(PictureLayerImplTest, 3201 TEST_F(PictureLayerImplTest,
3186 SharedActiveHighResReadyAndPendingLowResReadyNotEnoughToActivate) { 3202 SharedActiveHighResReadyAndPendingLowResReadyNotEnoughToActivate) {
3187 gfx::Size tile_size(100, 100); 3203 gfx::Size tile_size(100, 100);
3188 gfx::Size layer_bounds(1000, 1000); 3204 gfx::Size layer_bounds(1000, 1000);
3189 3205
3206 host_impl_.SetViewportSize(layer_bounds);
3207
3190 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); 3208 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
3191 3209
3192 // Make sure some tiles are not shared. 3210 // Make sure some tiles are not shared.
3193 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); 3211 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size));
3194 3212
3195 CreateHighLowResAndSetAllTilesVisible(); 3213 CreateHighLowResAndSetAllTilesVisible();
3196 3214
3197 // Initialize all high-res tiles in the active layer. 3215 // Initialize all high-res tiles in the active layer.
3198 active_layer_->SetAllTilesReadyInTiling(active_layer_->HighResTiling()); 3216 active_layer_->SetAllTilesReadyInTiling(active_layer_->HighResTiling());
3199 // And all the low-res tiles in the pending layer. 3217 // And all the low-res tiles in the pending layer.
3200 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->LowResTiling()); 3218 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->LowResTiling());
3201 3219
3202 // The unshared high-res tiles are not ready, so we cannot activate. 3220 // The unshared high-res tiles are not ready, so we cannot activate.
3203 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); 3221 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
3204 3222
3205 // When the unshared pending high-res tiles are ready, we can activate. 3223 // When the unshared pending high-res tiles are ready, we can activate.
3206 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling()); 3224 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling());
3207 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); 3225 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw());
3208 } 3226 }
3209 3227
3210 TEST_F(PictureLayerImplTest, SharedActiveHighResReadyNotEnoughToActivate) { 3228 TEST_F(PictureLayerImplTest, SharedActiveHighResReadyNotEnoughToActivate) {
3211 gfx::Size tile_size(100, 100); 3229 gfx::Size tile_size(100, 100);
3212 gfx::Size layer_bounds(1000, 1000); 3230 gfx::Size layer_bounds(1000, 1000);
3213 3231
3232 host_impl_.SetViewportSize(layer_bounds);
3233
3214 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); 3234 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
3215 3235
3216 // Make sure some tiles are not shared. 3236 // Make sure some tiles are not shared.
3217 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); 3237 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size));
3218 3238
3219 CreateHighLowResAndSetAllTilesVisible(); 3239 CreateHighLowResAndSetAllTilesVisible();
3220 3240
3221 // Initialize all high-res tiles in the active layer. 3241 // Initialize all high-res tiles in the active layer.
3222 active_layer_->SetAllTilesReadyInTiling(active_layer_->HighResTiling()); 3242 active_layer_->SetAllTilesReadyInTiling(active_layer_->HighResTiling());
3223 3243
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
3291 1.f, // maximum animation scale 3311 1.f, // maximum animation scale
3292 false); 3312 false);
3293 ASSERT_EQ(3u, pending_layer_->tilings()->num_tilings()); 3313 ASSERT_EQ(3u, pending_layer_->tilings()->num_tilings());
3294 EXPECT_FLOAT_EQ(7.26f, 3314 EXPECT_FLOAT_EQ(7.26f,
3295 pending_layer_->tilings()->tiling_at(0)->contents_scale()); 3315 pending_layer_->tilings()->tiling_at(0)->contents_scale());
3296 } 3316 }
3297 3317
3298 TEST_F(NoLowResPictureLayerImplTest, AllHighResRequiredEvenIfShared) { 3318 TEST_F(NoLowResPictureLayerImplTest, AllHighResRequiredEvenIfShared) {
3299 gfx::Size layer_bounds(400, 400); 3319 gfx::Size layer_bounds(400, 400);
3300 gfx::Size tile_size(100, 100); 3320 gfx::Size tile_size(100, 100);
3321
3322 host_impl_.SetViewportSize(layer_bounds);
3323
3301 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); 3324 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size);
3302 3325
3303 CreateHighLowResAndSetAllTilesVisible(); 3326 CreateHighLowResAndSetAllTilesVisible();
3304 3327
3305 Tile* some_active_tile = 3328 Tile* some_active_tile =
3306 active_layer_->HighResTiling()->AllTilesForTesting()[0]; 3329 active_layer_->HighResTiling()->AllTilesForTesting()[0];
3307 EXPECT_FALSE(some_active_tile->IsReadyToDraw()); 3330 EXPECT_FALSE(some_active_tile->IsReadyToDraw());
3308 3331
3309 // All tiles shared (no invalidation), so even though the active tree's 3332 // All tiles shared (no invalidation), so even though the active tree's
3310 // tiles aren't ready, there is nothing required. 3333 // tiles aren't ready, there is nothing required.
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
3652 false); 3675 false);
3653 EXPECT_EQ(1u, pending_layer_->tilings()->num_tilings()); 3676 EXPECT_EQ(1u, pending_layer_->tilings()->num_tilings());
3654 } 3677 }
3655 3678
3656 TEST_F(PictureLayerImplTest, SharedQuadStateContainsMaxTilingScale) { 3679 TEST_F(PictureLayerImplTest, SharedQuadStateContainsMaxTilingScale) {
3657 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); 3680 scoped_ptr<RenderPass> render_pass = RenderPass::Create();
3658 3681
3659 gfx::Size tile_size(400, 400); 3682 gfx::Size tile_size(400, 400);
3660 gfx::Size layer_bounds(1000, 2000); 3683 gfx::Size layer_bounds(1000, 2000);
3661 3684
3685 host_impl_.SetViewportSize(layer_bounds);
3686
3662 scoped_refptr<FakePicturePileImpl> pending_pile = 3687 scoped_refptr<FakePicturePileImpl> pending_pile =
3663 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); 3688 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
3664 scoped_refptr<FakePicturePileImpl> active_pile = 3689 scoped_refptr<FakePicturePileImpl> active_pile =
3665 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); 3690 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds);
3666 3691
3667 SetupTrees(pending_pile, active_pile); 3692 SetupTrees(pending_pile, active_pile);
3668 3693
3669 SetupDrawPropertiesAndUpdateTiles(pending_layer_, 2.5f, 1.f, 1.f, 1.f, false); 3694 SetupDrawPropertiesAndUpdateTiles(pending_layer_, 2.5f, 1.f, 1.f, 1.f, false);
3670 host_impl_.pending_tree()->UpdateDrawProperties(); 3695 host_impl_.pending_tree()->UpdateDrawProperties();
3671 3696
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after
4722 result = layer->CalculateTileSize(gfx::Size(447, 400)); 4747 result = layer->CalculateTileSize(gfx::Size(447, 400));
4723 EXPECT_EQ(result.width(), 448); 4748 EXPECT_EQ(result.width(), 448);
4724 EXPECT_EQ(result.height(), 448); 4749 EXPECT_EQ(result.height(), 448);
4725 result = layer->CalculateTileSize(gfx::Size(500, 499)); 4750 result = layer->CalculateTileSize(gfx::Size(500, 499));
4726 EXPECT_EQ(result.width(), 512); 4751 EXPECT_EQ(result.width(), 512);
4727 EXPECT_EQ(result.height(), 500 + 2); 4752 EXPECT_EQ(result.height(), 500 + 2);
4728 } 4753 }
4729 4754
4730 } // namespace 4755 } // namespace
4731 } // namespace cc 4756 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/tiled_layer_unittest.cc » ('j') | cc/trees/layer_tree_host_common.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698