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 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1275 pending_mask->RecreateResources(); | 1275 pending_mask->RecreateResources(); |
1276 active_mask->RecreateResources(); | 1276 active_mask->RecreateResources(); |
1277 SetupDrawPropertiesAndUpdateTiles(active_mask, 1.f, 1.f, 1.f, 1.f, 0.f, | 1277 SetupDrawPropertiesAndUpdateTiles(active_mask, 1.f, 1.f, 1.f, 1.f, 0.f, |
1278 false); | 1278 false); |
1279 active_mask->HighResTiling()->CreateAllTilesForTesting(); | 1279 active_mask->HighResTiling()->CreateAllTilesForTesting(); |
1280 EXPECT_EQ(1u, active_mask->HighResTiling()->AllTilesForTesting().size()); | 1280 EXPECT_EQ(1u, active_mask->HighResTiling()->AllTilesForTesting().size()); |
1281 EXPECT_NE(0u, mask_resource_id); | 1281 EXPECT_NE(0u, mask_resource_id); |
1282 EXPECT_EQ(active_mask->bounds(), mask_texture_size); | 1282 EXPECT_EQ(active_mask->bounds(), mask_texture_size); |
1283 | 1283 |
1284 // Resize larger than the max texture size. | 1284 // Resize larger than the max texture size. |
1285 int max_texture_size = host_impl()->resource_provider()->max_texture_size(); | 1285 int max_texture_size = |
| 1286 host_impl()->GetRendererCapabilities().max_texture_size; |
1286 gfx::Size huge_bounds(max_texture_size + 1, 10); | 1287 gfx::Size huge_bounds(max_texture_size + 1, 10); |
1287 scoped_refptr<FakeRasterSource> huge_raster_source = | 1288 scoped_refptr<FakeRasterSource> huge_raster_source = |
1288 FakeRasterSource::CreateFilled(huge_bounds); | 1289 FakeRasterSource::CreateFilled(huge_bounds); |
1289 | 1290 |
1290 SetupPendingTree(huge_raster_source); | 1291 SetupPendingTree(huge_raster_source); |
1291 pending_mask->SetBounds(huge_bounds); | 1292 pending_mask->SetBounds(huge_bounds); |
1292 pending_mask->SetRasterSourceOnPending(huge_raster_source, Region()); | 1293 pending_mask->SetRasterSourceOnPending(huge_raster_source, Region()); |
1293 | 1294 |
1294 host_impl()->AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); | 1295 host_impl()->AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); |
1295 host_impl()->pending_tree()->UpdateDrawProperties(update_lcd_text); | 1296 host_impl()->pending_tree()->UpdateDrawProperties(update_lcd_text); |
(...skipping 3726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5022 EXPECT_FLOAT_EQ(expected_contents_scale, | 5023 EXPECT_FLOAT_EQ(expected_contents_scale, |
5023 pending_layer_ptr->picture_layer_tiling_set() | 5024 pending_layer_ptr->picture_layer_tiling_set() |
5024 ->FindTilingWithResolution(HIGH_RESOLUTION) | 5025 ->FindTilingWithResolution(HIGH_RESOLUTION) |
5025 ->contents_scale()) | 5026 ->contents_scale()) |
5026 << "ideal_contents_scale: " << ideal_contents_scale; | 5027 << "ideal_contents_scale: " << ideal_contents_scale; |
5027 } | 5028 } |
5028 } | 5029 } |
5029 | 5030 |
5030 } // namespace | 5031 } // namespace |
5031 } // namespace cc | 5032 } // namespace cc |
OLD | NEW |