OLD | NEW |
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 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1883 | 1883 |
1884 // Neither the high res nor the ideal tiles were considered as incomplete. | 1884 // Neither the high res nor the ideal tiles were considered as incomplete. |
1885 EXPECT_EQ(0u, data.num_missing_tiles); | 1885 EXPECT_EQ(0u, data.num_missing_tiles); |
1886 EXPECT_EQ(0u, data.num_incomplete_tiles); | 1886 EXPECT_EQ(0u, data.num_incomplete_tiles); |
1887 EXPECT_FALSE(active_layer_->only_used_low_res_last_append_quads()); | 1887 EXPECT_FALSE(active_layer_->only_used_low_res_last_append_quads()); |
1888 } | 1888 } |
1889 | 1889 |
1890 TEST_F(PictureLayerImplTest, HighResRequiredWhenUnsharedActiveAllReady) { | 1890 TEST_F(PictureLayerImplTest, HighResRequiredWhenUnsharedActiveAllReady) { |
1891 gfx::Size layer_bounds(400, 400); | 1891 gfx::Size layer_bounds(400, 400); |
1892 gfx::Size tile_size(100, 100); | 1892 gfx::Size tile_size(100, 100); |
| 1893 |
| 1894 host_impl_.SetViewportSize(layer_bounds); |
| 1895 |
1893 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); | 1896 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); |
1894 | 1897 |
1895 // No tiles shared. | 1898 // No tiles shared. |
1896 pending_layer_->set_invalidation(gfx::Rect(layer_bounds)); | 1899 pending_layer_->set_invalidation(gfx::Rect(layer_bounds)); |
1897 | 1900 |
1898 CreateHighLowResAndSetAllTilesVisible(); | 1901 CreateHighLowResAndSetAllTilesVisible(); |
1899 | 1902 |
1900 active_layer_->SetAllTilesReady(); | 1903 active_layer_->SetAllTilesReady(); |
1901 | 1904 |
1902 // No shared tiles and all active tiles ready, so pending can only | 1905 // No shared tiles and all active tiles ready, so pending can only |
1903 // activate with all high res tiles. | 1906 // activate with all high res tiles. |
1904 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting(); | 1907 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting(); |
1905 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting(); | 1908 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting(); |
1906 | 1909 |
1907 AssertAllTilesRequired(pending_layer_->HighResTiling()); | 1910 AssertAllTilesRequired(pending_layer_->HighResTiling()); |
1908 AssertNoTilesRequired(pending_layer_->LowResTiling()); | 1911 AssertNoTilesRequired(pending_layer_->LowResTiling()); |
1909 } | 1912 } |
1910 | 1913 |
1911 TEST_F(PictureLayerImplTest, HighResRequiredWhenMissingHighResFlagOn) { | 1914 TEST_F(PictureLayerImplTest, HighResRequiredWhenMissingHighResFlagOn) { |
1912 gfx::Size layer_bounds(400, 400); | 1915 gfx::Size layer_bounds(400, 400); |
1913 gfx::Size tile_size(100, 100); | 1916 gfx::Size tile_size(100, 100); |
| 1917 |
| 1918 host_impl_.SetViewportSize(layer_bounds); |
| 1919 |
1914 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); | 1920 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); |
1915 | 1921 |
1916 // All tiles shared (no invalidation). | 1922 // All tiles shared (no invalidation). |
1917 CreateHighLowResAndSetAllTilesVisible(); | 1923 CreateHighLowResAndSetAllTilesVisible(); |
1918 | 1924 |
1919 // Verify active tree not ready. | 1925 // Verify active tree not ready. |
1920 Tile* some_active_tile = | 1926 Tile* some_active_tile = |
1921 active_layer_->HighResTiling()->AllTilesForTesting()[0]; | 1927 active_layer_->HighResTiling()->AllTilesForTesting()[0]; |
1922 EXPECT_FALSE(some_active_tile->IsReadyToDraw()); | 1928 EXPECT_FALSE(some_active_tile->IsReadyToDraw()); |
1923 | 1929 |
1924 // When high res are required, even if the active tree is not ready, | 1930 // When high res are required, even if the active tree is not ready, |
1925 // the high res tiles must be ready. | 1931 // the high res tiles must be ready. |
1926 host_impl_.SetRequiresHighResToDraw(); | 1932 host_impl_.SetRequiresHighResToDraw(); |
1927 | 1933 |
1928 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting(); | 1934 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting(); |
1929 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting(); | 1935 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting(); |
1930 | 1936 |
1931 AssertAllTilesRequired(pending_layer_->HighResTiling()); | 1937 AssertAllTilesRequired(pending_layer_->HighResTiling()); |
1932 AssertNoTilesRequired(pending_layer_->LowResTiling()); | 1938 AssertNoTilesRequired(pending_layer_->LowResTiling()); |
1933 } | 1939 } |
1934 | 1940 |
1935 TEST_F(PictureLayerImplTest, AllHighResRequiredEvenIfShared) { | 1941 TEST_F(PictureLayerImplTest, AllHighResRequiredEvenIfShared) { |
1936 gfx::Size layer_bounds(400, 400); | 1942 gfx::Size layer_bounds(400, 400); |
1937 gfx::Size tile_size(100, 100); | 1943 gfx::Size tile_size(100, 100); |
| 1944 |
| 1945 host_impl_.SetViewportSize(layer_bounds); |
| 1946 |
1938 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); | 1947 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); |
1939 | 1948 |
1940 CreateHighLowResAndSetAllTilesVisible(); | 1949 CreateHighLowResAndSetAllTilesVisible(); |
1941 | 1950 |
1942 Tile* some_active_tile = | 1951 Tile* some_active_tile = |
1943 active_layer_->HighResTiling()->AllTilesForTesting()[0]; | 1952 active_layer_->HighResTiling()->AllTilesForTesting()[0]; |
1944 EXPECT_FALSE(some_active_tile->IsReadyToDraw()); | 1953 EXPECT_FALSE(some_active_tile->IsReadyToDraw()); |
1945 | 1954 |
1946 // All tiles shared (no invalidation), so even though the active tree's | 1955 // All tiles shared (no invalidation), so even though the active tree's |
1947 // tiles aren't ready, the high res tiles are required for activation. | 1956 // tiles aren't ready, the high res tiles are required for activation. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2002 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting(); | 2011 pending_layer_->HighResTiling()->UpdateAllTilePrioritiesForTesting(); |
2003 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting(); | 2012 pending_layer_->LowResTiling()->UpdateAllTilePrioritiesForTesting(); |
2004 | 2013 |
2005 AssertNoTilesRequired(pending_layer_->HighResTiling()); | 2014 AssertNoTilesRequired(pending_layer_->HighResTiling()); |
2006 AssertNoTilesRequired(pending_layer_->LowResTiling()); | 2015 AssertNoTilesRequired(pending_layer_->LowResTiling()); |
2007 } | 2016 } |
2008 | 2017 |
2009 TEST_F(PictureLayerImplTest, HighResRequiredIfActiveCantHaveTiles) { | 2018 TEST_F(PictureLayerImplTest, HighResRequiredIfActiveCantHaveTiles) { |
2010 gfx::Size layer_bounds(400, 400); | 2019 gfx::Size layer_bounds(400, 400); |
2011 gfx::Size tile_size(100, 100); | 2020 gfx::Size tile_size(100, 100); |
| 2021 |
| 2022 host_impl_.SetViewportSize(layer_bounds); |
| 2023 |
2012 scoped_refptr<FakePicturePileImpl> pending_pile = | 2024 scoped_refptr<FakePicturePileImpl> pending_pile = |
2013 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); | 2025 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
2014 scoped_refptr<FakePicturePileImpl> active_pile = | 2026 scoped_refptr<FakePicturePileImpl> active_pile = |
2015 FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds); | 2027 FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds); |
2016 SetupTrees(pending_pile, active_pile); | 2028 SetupTrees(pending_pile, active_pile); |
2017 pending_layer_->set_fixed_tile_size(tile_size); | 2029 pending_layer_->set_fixed_tile_size(tile_size); |
2018 active_layer_->set_fixed_tile_size(tile_size); | 2030 active_layer_->set_fixed_tile_size(tile_size); |
2019 | 2031 |
2020 CreateHighLowResAndSetAllTilesVisible(); | 2032 CreateHighLowResAndSetAllTilesVisible(); |
2021 | 2033 |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3148 page_scale, | 3160 page_scale, |
3149 maximum_animation_scale, | 3161 maximum_animation_scale, |
3150 animating_transform); | 3162 animating_transform); |
3151 EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 1.f); | 3163 EXPECT_BOTH_EQ(HighResTiling()->contents_scale(), 1.f); |
3152 } | 3164 } |
3153 | 3165 |
3154 TEST_F(PictureLayerImplTest, LowResReadyToDrawNotEnoughToActivate) { | 3166 TEST_F(PictureLayerImplTest, LowResReadyToDrawNotEnoughToActivate) { |
3155 gfx::Size tile_size(100, 100); | 3167 gfx::Size tile_size(100, 100); |
3156 gfx::Size layer_bounds(1000, 1000); | 3168 gfx::Size layer_bounds(1000, 1000); |
3157 | 3169 |
| 3170 host_impl_.SetViewportSize(layer_bounds); |
| 3171 |
3158 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); | 3172 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); |
3159 | 3173 |
3160 // Make sure some tiles are not shared. | 3174 // Make sure some tiles are not shared. |
3161 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); | 3175 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); |
3162 | 3176 |
3163 CreateHighLowResAndSetAllTilesVisible(); | 3177 CreateHighLowResAndSetAllTilesVisible(); |
3164 active_layer_->SetAllTilesReady(); | 3178 active_layer_->SetAllTilesReady(); |
3165 | 3179 |
3166 // All pending layer tiles required are not ready. | 3180 // All pending layer tiles required are not ready. |
3167 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); | 3181 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); |
3168 | 3182 |
3169 // Initialize all low-res tiles. | 3183 // Initialize all low-res tiles. |
3170 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->LowResTiling()); | 3184 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->LowResTiling()); |
3171 | 3185 |
3172 // Low-res tiles should not be enough. | 3186 // Low-res tiles should not be enough. |
3173 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); | 3187 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); |
3174 | 3188 |
3175 // Initialize remaining tiles. | 3189 // Initialize remaining tiles. |
3176 pending_layer_->SetAllTilesReady(); | 3190 pending_layer_->SetAllTilesReady(); |
3177 | 3191 |
3178 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); | 3192 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); |
3179 } | 3193 } |
3180 | 3194 |
3181 TEST_F(PictureLayerImplTest, HighResReadyToDrawEnoughToActivate) { | 3195 TEST_F(PictureLayerImplTest, HighResReadyToDrawEnoughToActivate) { |
3182 gfx::Size tile_size(100, 100); | 3196 gfx::Size tile_size(100, 100); |
3183 gfx::Size layer_bounds(1000, 1000); | 3197 gfx::Size layer_bounds(1000, 1000); |
3184 | 3198 |
| 3199 host_impl_.SetViewportSize(layer_bounds); |
| 3200 |
3185 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); | 3201 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); |
3186 | 3202 |
3187 // Make sure some tiles are not shared. | 3203 // Make sure some tiles are not shared. |
3188 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); | 3204 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); |
3189 | 3205 |
3190 CreateHighLowResAndSetAllTilesVisible(); | 3206 CreateHighLowResAndSetAllTilesVisible(); |
3191 active_layer_->SetAllTilesReady(); | 3207 active_layer_->SetAllTilesReady(); |
3192 | 3208 |
3193 // All pending layer tiles required are not ready. | 3209 // All pending layer tiles required are not ready. |
3194 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); | 3210 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); |
3195 | 3211 |
3196 // Initialize all high-res tiles. | 3212 // Initialize all high-res tiles. |
3197 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling()); | 3213 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling()); |
3198 | 3214 |
3199 // High-res tiles should be enough, since they cover everything visible. | 3215 // High-res tiles should be enough, since they cover everything visible. |
3200 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); | 3216 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); |
3201 } | 3217 } |
3202 | 3218 |
3203 TEST_F(PictureLayerImplTest, | 3219 TEST_F(PictureLayerImplTest, |
3204 SharedActiveHighResReadyAndPendingLowResReadyNotEnoughToActivate) { | 3220 SharedActiveHighResReadyAndPendingLowResReadyNotEnoughToActivate) { |
3205 gfx::Size tile_size(100, 100); | 3221 gfx::Size tile_size(100, 100); |
3206 gfx::Size layer_bounds(1000, 1000); | 3222 gfx::Size layer_bounds(1000, 1000); |
3207 | 3223 |
| 3224 host_impl_.SetViewportSize(layer_bounds); |
| 3225 |
3208 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); | 3226 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); |
3209 | 3227 |
3210 // Make sure some tiles are not shared. | 3228 // Make sure some tiles are not shared. |
3211 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); | 3229 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); |
3212 | 3230 |
3213 CreateHighLowResAndSetAllTilesVisible(); | 3231 CreateHighLowResAndSetAllTilesVisible(); |
3214 | 3232 |
3215 // Initialize all high-res tiles in the active layer. | 3233 // Initialize all high-res tiles in the active layer. |
3216 active_layer_->SetAllTilesReadyInTiling(active_layer_->HighResTiling()); | 3234 active_layer_->SetAllTilesReadyInTiling(active_layer_->HighResTiling()); |
3217 // And all the low-res tiles in the pending layer. | 3235 // And all the low-res tiles in the pending layer. |
3218 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->LowResTiling()); | 3236 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->LowResTiling()); |
3219 | 3237 |
3220 // The unshared high-res tiles are not ready, so we cannot activate. | 3238 // The unshared high-res tiles are not ready, so we cannot activate. |
3221 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); | 3239 EXPECT_FALSE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); |
3222 | 3240 |
3223 // When the unshared pending high-res tiles are ready, we can activate. | 3241 // When the unshared pending high-res tiles are ready, we can activate. |
3224 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling()); | 3242 pending_layer_->SetAllTilesReadyInTiling(pending_layer_->HighResTiling()); |
3225 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); | 3243 EXPECT_TRUE(pending_layer_->AllTilesRequiredForActivationAreReadyToDraw()); |
3226 } | 3244 } |
3227 | 3245 |
3228 TEST_F(PictureLayerImplTest, SharedActiveHighResReadyNotEnoughToActivate) { | 3246 TEST_F(PictureLayerImplTest, SharedActiveHighResReadyNotEnoughToActivate) { |
3229 gfx::Size tile_size(100, 100); | 3247 gfx::Size tile_size(100, 100); |
3230 gfx::Size layer_bounds(1000, 1000); | 3248 gfx::Size layer_bounds(1000, 1000); |
3231 | 3249 |
| 3250 host_impl_.SetViewportSize(layer_bounds); |
| 3251 |
3232 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); | 3252 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); |
3233 | 3253 |
3234 // Make sure some tiles are not shared. | 3254 // Make sure some tiles are not shared. |
3235 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); | 3255 pending_layer_->set_invalidation(gfx::Rect(gfx::Point(50, 50), tile_size)); |
3236 | 3256 |
3237 CreateHighLowResAndSetAllTilesVisible(); | 3257 CreateHighLowResAndSetAllTilesVisible(); |
3238 | 3258 |
3239 // Initialize all high-res tiles in the active layer. | 3259 // Initialize all high-res tiles in the active layer. |
3240 active_layer_->SetAllTilesReadyInTiling(active_layer_->HighResTiling()); | 3260 active_layer_->SetAllTilesReadyInTiling(active_layer_->HighResTiling()); |
3241 | 3261 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3309 1.f, // maximum animation scale | 3329 1.f, // maximum animation scale |
3310 false); | 3330 false); |
3311 ASSERT_EQ(3u, pending_layer_->tilings()->num_tilings()); | 3331 ASSERT_EQ(3u, pending_layer_->tilings()->num_tilings()); |
3312 EXPECT_FLOAT_EQ(7.26f, | 3332 EXPECT_FLOAT_EQ(7.26f, |
3313 pending_layer_->tilings()->tiling_at(0)->contents_scale()); | 3333 pending_layer_->tilings()->tiling_at(0)->contents_scale()); |
3314 } | 3334 } |
3315 | 3335 |
3316 TEST_F(NoLowResPictureLayerImplTest, AllHighResRequiredEvenIfShared) { | 3336 TEST_F(NoLowResPictureLayerImplTest, AllHighResRequiredEvenIfShared) { |
3317 gfx::Size layer_bounds(400, 400); | 3337 gfx::Size layer_bounds(400, 400); |
3318 gfx::Size tile_size(100, 100); | 3338 gfx::Size tile_size(100, 100); |
| 3339 |
| 3340 host_impl_.SetViewportSize(layer_bounds); |
| 3341 |
3319 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); | 3342 SetupDefaultTreesWithFixedTileSize(layer_bounds, tile_size); |
3320 | 3343 |
3321 CreateHighLowResAndSetAllTilesVisible(); | 3344 CreateHighLowResAndSetAllTilesVisible(); |
3322 | 3345 |
3323 Tile* some_active_tile = | 3346 Tile* some_active_tile = |
3324 active_layer_->HighResTiling()->AllTilesForTesting()[0]; | 3347 active_layer_->HighResTiling()->AllTilesForTesting()[0]; |
3325 EXPECT_FALSE(some_active_tile->IsReadyToDraw()); | 3348 EXPECT_FALSE(some_active_tile->IsReadyToDraw()); |
3326 | 3349 |
3327 // All tiles shared (no invalidation), so even though the active tree's | 3350 // All tiles shared (no invalidation), so even though the active tree's |
3328 // tiles aren't ready, there is nothing required. | 3351 // tiles aren't ready, there is nothing required. |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3670 false); | 3693 false); |
3671 EXPECT_EQ(1u, pending_layer_->tilings()->num_tilings()); | 3694 EXPECT_EQ(1u, pending_layer_->tilings()->num_tilings()); |
3672 } | 3695 } |
3673 | 3696 |
3674 TEST_F(PictureLayerImplTest, SharedQuadStateContainsMaxTilingScale) { | 3697 TEST_F(PictureLayerImplTest, SharedQuadStateContainsMaxTilingScale) { |
3675 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); | 3698 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); |
3676 | 3699 |
3677 gfx::Size tile_size(400, 400); | 3700 gfx::Size tile_size(400, 400); |
3678 gfx::Size layer_bounds(1000, 2000); | 3701 gfx::Size layer_bounds(1000, 2000); |
3679 | 3702 |
| 3703 host_impl_.SetViewportSize(layer_bounds); |
| 3704 |
3680 scoped_refptr<FakePicturePileImpl> pending_pile = | 3705 scoped_refptr<FakePicturePileImpl> pending_pile = |
3681 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); | 3706 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
3682 scoped_refptr<FakePicturePileImpl> active_pile = | 3707 scoped_refptr<FakePicturePileImpl> active_pile = |
3683 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); | 3708 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
3684 | 3709 |
3685 SetupTrees(pending_pile, active_pile); | 3710 SetupTrees(pending_pile, active_pile); |
3686 | 3711 |
3687 SetupDrawPropertiesAndUpdateTiles(pending_layer_, 2.5f, 1.f, 1.f, 1.f, false); | 3712 SetupDrawPropertiesAndUpdateTiles(pending_layer_, 2.5f, 1.f, 1.f, 1.f, false); |
3688 host_impl_.pending_tree()->UpdateDrawProperties(); | 3713 host_impl_.pending_tree()->UpdateDrawProperties(); |
3689 | 3714 |
(...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4740 result = layer->CalculateTileSize(gfx::Size(447, 400)); | 4765 result = layer->CalculateTileSize(gfx::Size(447, 400)); |
4741 EXPECT_EQ(result.width(), 448); | 4766 EXPECT_EQ(result.width(), 448); |
4742 EXPECT_EQ(result.height(), 448); | 4767 EXPECT_EQ(result.height(), 448); |
4743 result = layer->CalculateTileSize(gfx::Size(500, 499)); | 4768 result = layer->CalculateTileSize(gfx::Size(500, 499)); |
4744 EXPECT_EQ(result.width(), 512); | 4769 EXPECT_EQ(result.width(), 512); |
4745 EXPECT_EQ(result.height(), 500 + 2); | 4770 EXPECT_EQ(result.height(), 500 + 2); |
4746 } | 4771 } |
4747 | 4772 |
4748 } // namespace | 4773 } // namespace |
4749 } // namespace cc | 4774 } // namespace cc |
OLD | NEW |