| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 4190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4201 EXPECT_TRUE(pending_layer()->GetPendingOrActiveTwinLayer()); | 4201 EXPECT_TRUE(pending_layer()->GetPendingOrActiveTwinLayer()); |
| 4202 EXPECT_TRUE(active_layer()->GetPendingOrActiveTwinLayer()); | 4202 EXPECT_TRUE(active_layer()->GetPendingOrActiveTwinLayer()); |
| 4203 EXPECT_EQ(pending_layer(), active_layer()->GetPendingOrActiveTwinLayer()); | 4203 EXPECT_EQ(pending_layer(), active_layer()->GetPendingOrActiveTwinLayer()); |
| 4204 EXPECT_EQ(active_layer(), pending_layer()->GetPendingOrActiveTwinLayer()); | 4204 EXPECT_EQ(active_layer(), pending_layer()->GetPendingOrActiveTwinLayer()); |
| 4205 | 4205 |
| 4206 ActivateTree(); | 4206 ActivateTree(); |
| 4207 EXPECT_FALSE(active_layer()->GetPendingOrActiveTwinLayer()); | 4207 EXPECT_FALSE(active_layer()->GetPendingOrActiveTwinLayer()); |
| 4208 | 4208 |
| 4209 // Make an empty pending tree. | 4209 // Make an empty pending tree. |
| 4210 host_impl()->CreatePendingTree(); | 4210 host_impl()->CreatePendingTree(); |
| 4211 host_impl()->pending_tree()->ClearLayers(); | 4211 host_impl()->pending_tree()->DetachLayers(); |
| 4212 EXPECT_FALSE(active_layer()->GetPendingOrActiveTwinLayer()); | 4212 EXPECT_FALSE(active_layer()->GetPendingOrActiveTwinLayer()); |
| 4213 } | 4213 } |
| 4214 | 4214 |
| 4215 void PictureLayerImplTest::TestQuadsForSolidColor(bool test_for_solid) { | 4215 void PictureLayerImplTest::TestQuadsForSolidColor(bool test_for_solid) { |
| 4216 host_impl()->AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); | 4216 host_impl()->AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); |
| 4217 | 4217 |
| 4218 gfx::Size tile_size(100, 100); | 4218 gfx::Size tile_size(100, 100); |
| 4219 gfx::Size layer_bounds(200, 200); | 4219 gfx::Size layer_bounds(200, 200); |
| 4220 gfx::Rect layer_rect(layer_bounds); | 4220 gfx::Rect layer_rect(layer_bounds); |
| 4221 | 4221 |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4762 // New low res tiling. | 4762 // New low res tiling. |
| 4763 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); | 4763 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); |
| 4764 | 4764 |
| 4765 // This tiling will be high res now, it won't contain low res content since it | 4765 // This tiling will be high res now, it won't contain low res content since it |
| 4766 // was all destroyed. | 4766 // was all destroyed. |
| 4767 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); | 4767 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); |
| 4768 } | 4768 } |
| 4769 | 4769 |
| 4770 } // namespace | 4770 } // namespace |
| 4771 } // namespace cc | 4771 } // namespace cc |
| OLD | NEW |