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 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2270 EXPECT_TRUE(active_tiling->TileAt(1, 0)); | 2270 EXPECT_TRUE(active_tiling->TileAt(1, 0)); |
2271 EXPECT_TRUE(active_tiling->TileAt(0, 1)); | 2271 EXPECT_TRUE(active_tiling->TileAt(0, 1)); |
2272 EXPECT_FALSE(pending_tiling->TileAt(0, 0)); | 2272 EXPECT_FALSE(pending_tiling->TileAt(0, 0)); |
2273 EXPECT_FALSE(pending_tiling->TileAt(1, 0)); | 2273 EXPECT_FALSE(pending_tiling->TileAt(1, 0)); |
2274 EXPECT_FALSE(pending_tiling->TileAt(0, 1)); | 2274 EXPECT_FALSE(pending_tiling->TileAt(0, 1)); |
2275 EXPECT_NE(active_tiling->TileAt(1, 1), pending_tiling->TileAt(1, 1)); | 2275 EXPECT_NE(active_tiling->TileAt(1, 1), pending_tiling->TileAt(1, 1)); |
2276 EXPECT_TRUE(active_tiling->TileAt(1, 1)); | 2276 EXPECT_TRUE(active_tiling->TileAt(1, 1)); |
2277 EXPECT_TRUE(pending_tiling->TileAt(1, 1)); | 2277 EXPECT_TRUE(pending_tiling->TileAt(1, 1)); |
2278 | 2278 |
2279 // Drop the tiles on the active tree and recreate them. | 2279 // Drop the tiles on the active tree and recreate them. |
2280 active_tiling->ComputeTilePriorityRects(gfx::Rect(), 1.f, 1.0, Occlusion()); | 2280 active_layer_->tilings()->UpdateTilePriorities(gfx::Rect(), 1.f, 1.0, |
| 2281 Occlusion(), true); |
2281 EXPECT_TRUE(active_tiling->AllTilesForTesting().empty()); | 2282 EXPECT_TRUE(active_tiling->AllTilesForTesting().empty()); |
2282 active_tiling->CreateAllTilesForTesting(); | 2283 active_tiling->CreateAllTilesForTesting(); |
2283 | 2284 |
2284 // Tile 0,0 not exist on pending, but tile 1,1 should. | 2285 // Tile 0,0 not exist on pending, but tile 1,1 should. |
2285 EXPECT_TRUE(active_tiling->TileAt(0, 0)); | 2286 EXPECT_TRUE(active_tiling->TileAt(0, 0)); |
2286 EXPECT_TRUE(active_tiling->TileAt(1, 0)); | 2287 EXPECT_TRUE(active_tiling->TileAt(1, 0)); |
2287 EXPECT_TRUE(active_tiling->TileAt(0, 1)); | 2288 EXPECT_TRUE(active_tiling->TileAt(0, 1)); |
2288 EXPECT_FALSE(pending_tiling->TileAt(0, 0)); | 2289 EXPECT_FALSE(pending_tiling->TileAt(0, 0)); |
2289 EXPECT_FALSE(pending_tiling->TileAt(1, 0)); | 2290 EXPECT_FALSE(pending_tiling->TileAt(1, 0)); |
2290 EXPECT_FALSE(pending_tiling->TileAt(0, 1)); | 2291 EXPECT_FALSE(pending_tiling->TileAt(0, 1)); |
(...skipping 2599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4890 // New low res tiling. | 4891 // New low res tiling. |
4891 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); | 4892 EXPECT_TRUE(tilings->tiling_at(2)->may_contain_low_resolution_tiles()); |
4892 | 4893 |
4893 // This tiling will be high res now, it won't contain low res content since it | 4894 // This tiling will be high res now, it won't contain low res content since it |
4894 // was all destroyed. | 4895 // was all destroyed. |
4895 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); | 4896 EXPECT_FALSE(tilings->tiling_at(1)->may_contain_low_resolution_tiles()); |
4896 } | 4897 } |
4897 | 4898 |
4898 } // namespace | 4899 } // namespace |
4899 } // namespace cc | 4900 } // namespace cc |
OLD | NEW |