| 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 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1819 TEST_F(DeferredInitPictureLayerImplTest, | 1819 TEST_F(DeferredInitPictureLayerImplTest, |
| 1820 PreventUpdateTilePrioritiesDuringLostContext) { | 1820 PreventUpdateTilePrioritiesDuringLostContext) { |
| 1821 host_impl_.pending_tree()->UpdateDrawProperties(); | 1821 host_impl_.pending_tree()->UpdateDrawProperties(); |
| 1822 host_impl_.active_tree()->UpdateDrawProperties(); | 1822 host_impl_.active_tree()->UpdateDrawProperties(); |
| 1823 EXPECT_FALSE(host_impl_.pending_tree()->needs_update_draw_properties()); | 1823 EXPECT_FALSE(host_impl_.pending_tree()->needs_update_draw_properties()); |
| 1824 EXPECT_FALSE(host_impl_.active_tree()->needs_update_draw_properties()); | 1824 EXPECT_FALSE(host_impl_.active_tree()->needs_update_draw_properties()); |
| 1825 | 1825 |
| 1826 FakeOutputSurface* fake_output_surface = | 1826 FakeOutputSurface* fake_output_surface = |
| 1827 static_cast<FakeOutputSurface*>(host_impl_.output_surface()); | 1827 static_cast<FakeOutputSurface*>(host_impl_.output_surface()); |
| 1828 ASSERT_TRUE(fake_output_surface->InitializeAndSetContext3d( | 1828 ASSERT_TRUE(fake_output_surface->InitializeAndSetContext3d( |
| 1829 TestContextProvider::Create(), NULL)); | 1829 TestContextProvider::Create())); |
| 1830 | 1830 |
| 1831 // These will crash PictureLayerImpl if this is not true. | 1831 // These will crash PictureLayerImpl if this is not true. |
| 1832 ASSERT_TRUE(host_impl_.pending_tree()->needs_update_draw_properties()); | 1832 ASSERT_TRUE(host_impl_.pending_tree()->needs_update_draw_properties()); |
| 1833 ASSERT_TRUE(host_impl_.active_tree()->needs_update_draw_properties()); | 1833 ASSERT_TRUE(host_impl_.active_tree()->needs_update_draw_properties()); |
| 1834 host_impl_.active_tree()->UpdateDrawProperties(); | 1834 host_impl_.active_tree()->UpdateDrawProperties(); |
| 1835 } | 1835 } |
| 1836 | 1836 |
| 1837 TEST_F(PictureLayerImplTest, HighResTilingDuringAnimationForCpuRasterization) { | 1837 TEST_F(PictureLayerImplTest, HighResTilingDuringAnimationForCpuRasterization) { |
| 1838 gfx::Size tile_size(host_impl_.settings().default_tile_size); | 1838 gfx::Size tile_size(host_impl_.settings().default_tile_size); |
| 1839 SetupDefaultTrees(tile_size); | 1839 SetupDefaultTrees(tile_size); |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2274 occluded, | 2274 occluded, |
| 2275 &partially_occluded_count); | 2275 &partially_occluded_count); |
| 2276 // The layer outputs one quad, which is partially occluded. | 2276 // The layer outputs one quad, which is partially occluded. |
| 2277 EXPECT_EQ(100u - 10u, impl.quad_list().size()); | 2277 EXPECT_EQ(100u - 10u, impl.quad_list().size()); |
| 2278 EXPECT_EQ(10u + 10u, partially_occluded_count); | 2278 EXPECT_EQ(10u + 10u, partially_occluded_count); |
| 2279 } | 2279 } |
| 2280 } | 2280 } |
| 2281 | 2281 |
| 2282 } // namespace | 2282 } // namespace |
| 2283 } // namespace cc | 2283 } // namespace cc |
| OLD | NEW |