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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1487 recording_source->Rerecord(); | 1487 recording_source->Rerecord(); |
1488 | 1488 |
1489 scoped_refptr<RasterSource> raster_source = | 1489 scoped_refptr<RasterSource> raster_source = |
1490 RasterSource::CreateFromRecordingSource(recording_source.get(), false); | 1490 RasterSource::CreateFromRecordingSource(recording_source.get(), false); |
1491 | 1491 |
1492 FakePictureLayerTilingClient tiling_client; | 1492 FakePictureLayerTilingClient tiling_client; |
1493 tiling_client.SetTileSize(size); | 1493 tiling_client.SetTileSize(size); |
1494 | 1494 |
1495 std::unique_ptr<PictureLayerImpl> layer_impl = PictureLayerImpl::Create( | 1495 std::unique_ptr<PictureLayerImpl> layer_impl = PictureLayerImpl::Create( |
1496 host_impl()->active_tree(), 1, Layer::LayerMaskType::NOT_MASK); | 1496 host_impl()->active_tree(), 1, Layer::LayerMaskType::NOT_MASK); |
1497 layer_impl->set_is_drawn_render_surface_layer_list_member(true); | 1497 layer_impl->set_contributes_to_drawn_render_surface(true); |
1498 PictureLayerTilingSet* tiling_set = layer_impl->picture_layer_tiling_set(); | 1498 PictureLayerTilingSet* tiling_set = layer_impl->picture_layer_tiling_set(); |
1499 | 1499 |
1500 PictureLayerTiling* tiling = | 1500 PictureLayerTiling* tiling = |
1501 tiling_set->AddTiling(gfx::AxisTransform2d(), raster_source); | 1501 tiling_set->AddTiling(gfx::AxisTransform2d(), raster_source); |
1502 tiling->set_resolution(HIGH_RESOLUTION); | 1502 tiling->set_resolution(HIGH_RESOLUTION); |
1503 tiling->CreateAllTilesForTesting(); | 1503 tiling->CreateAllTilesForTesting(); |
1504 tiling->SetTilePriorityRectsForTesting( | 1504 tiling->SetTilePriorityRectsForTesting( |
1505 gfx::Rect(layer_bounds), // Visible rect. | 1505 gfx::Rect(layer_bounds), // Visible rect. |
1506 gfx::Rect(layer_bounds), // Skewport rect. | 1506 gfx::Rect(layer_bounds), // Skewport rect. |
1507 gfx::Rect(layer_bounds), // Soon rect. | 1507 gfx::Rect(layer_bounds), // Soon rect. |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1692 recording_source->Rerecord(); | 1692 recording_source->Rerecord(); |
1693 scoped_refptr<RasterSource> raster = | 1693 scoped_refptr<RasterSource> raster = |
1694 RasterSource::CreateFromRecordingSource(recording_source.get(), false); | 1694 RasterSource::CreateFromRecordingSource(recording_source.get(), false); |
1695 | 1695 |
1696 FakePictureLayerTilingClient tiling_client; | 1696 FakePictureLayerTilingClient tiling_client; |
1697 tiling_client.SetTileSize(size); | 1697 tiling_client.SetTileSize(size); |
1698 | 1698 |
1699 std::unique_ptr<PictureLayerImpl> layer = PictureLayerImpl::Create( | 1699 std::unique_ptr<PictureLayerImpl> layer = PictureLayerImpl::Create( |
1700 host_impl()->active_tree(), 1, Layer::LayerMaskType::NOT_MASK); | 1700 host_impl()->active_tree(), 1, Layer::LayerMaskType::NOT_MASK); |
1701 PictureLayerTilingSet* tiling_set = layer->picture_layer_tiling_set(); | 1701 PictureLayerTilingSet* tiling_set = layer->picture_layer_tiling_set(); |
1702 layer->set_is_drawn_render_surface_layer_list_member(true); | 1702 layer->set_contributes_to_drawn_render_surface(true); |
1703 | 1703 |
1704 auto* tiling = tiling_set->AddTiling(gfx::AxisTransform2d(), raster); | 1704 auto* tiling = tiling_set->AddTiling(gfx::AxisTransform2d(), raster); |
1705 tiling->set_resolution(resolutions[i]); | 1705 tiling->set_resolution(resolutions[i]); |
1706 tiling->CreateAllTilesForTesting(); | 1706 tiling->CreateAllTilesForTesting(); |
1707 tiling->SetTilePriorityRectsForTesting( | 1707 tiling->SetTilePriorityRectsForTesting( |
1708 gfx::Rect(size), // Visible rect. | 1708 gfx::Rect(size), // Visible rect. |
1709 gfx::Rect(size), // Skewport rect. | 1709 gfx::Rect(size), // Skewport rect. |
1710 gfx::Rect(size), // Soon rect. | 1710 gfx::Rect(size), // Soon rect. |
1711 gfx::Rect(size)); // Eventually rect. | 1711 gfx::Rect(size)); // Eventually rect. |
1712 | 1712 |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2376 base::MakeUnique<testing::StrictMock<MockImageGenerator>>( | 2376 base::MakeUnique<testing::StrictMock<MockImageGenerator>>( |
2377 gfx::Size(512, 512))); | 2377 gfx::Size(512, 512))); |
2378 recording_source->add_draw_image(image, gfx::Point(0, 0)); | 2378 recording_source->add_draw_image(image, gfx::Point(0, 0)); |
2379 | 2379 |
2380 recording_source->Rerecord(); | 2380 recording_source->Rerecord(); |
2381 scoped_refptr<RasterSource> raster_source = | 2381 scoped_refptr<RasterSource> raster_source = |
2382 RasterSource::CreateFromRecordingSource(recording_source.get(), false); | 2382 RasterSource::CreateFromRecordingSource(recording_source.get(), false); |
2383 | 2383 |
2384 std::unique_ptr<PictureLayerImpl> layer_impl = PictureLayerImpl::Create( | 2384 std::unique_ptr<PictureLayerImpl> layer_impl = PictureLayerImpl::Create( |
2385 host_impl()->active_tree(), 1, Layer::LayerMaskType::NOT_MASK); | 2385 host_impl()->active_tree(), 1, Layer::LayerMaskType::NOT_MASK); |
2386 layer_impl->set_is_drawn_render_surface_layer_list_member(true); | 2386 layer_impl->set_contributes_to_drawn_render_surface(true); |
2387 PictureLayerTilingSet* tiling_set = layer_impl->picture_layer_tiling_set(); | 2387 PictureLayerTilingSet* tiling_set = layer_impl->picture_layer_tiling_set(); |
2388 | 2388 |
2389 PictureLayerTiling* tiling = | 2389 PictureLayerTiling* tiling = |
2390 tiling_set->AddTiling(gfx::AxisTransform2d(), raster_source); | 2390 tiling_set->AddTiling(gfx::AxisTransform2d(), raster_source); |
2391 tiling->set_resolution(HIGH_RESOLUTION); | 2391 tiling->set_resolution(HIGH_RESOLUTION); |
2392 tiling->CreateAllTilesForTesting(); | 2392 tiling->CreateAllTilesForTesting(); |
2393 tiling->SetTilePriorityRectsForTesting( | 2393 tiling->SetTilePriorityRectsForTesting( |
2394 gfx::Rect(layer_bounds), // Visible rect. | 2394 gfx::Rect(layer_bounds), // Visible rect. |
2395 gfx::Rect(layer_bounds), // Skewport rect. | 2395 gfx::Rect(layer_bounds), // Skewport rect. |
2396 gfx::Rect(layer_bounds), // Soon rect. | 2396 gfx::Rect(layer_bounds), // Soon rect. |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2648 EXPECT_TRUE(tile); | 2648 EXPECT_TRUE(tile); |
2649 else | 2649 else |
2650 EXPECT_FALSE(tile); | 2650 EXPECT_FALSE(tile); |
2651 } | 2651 } |
2652 } | 2652 } |
2653 host_impl()->client()->reset_did_request_impl_side_invalidation(); | 2653 host_impl()->client()->reset_did_request_impl_side_invalidation(); |
2654 } | 2654 } |
2655 | 2655 |
2656 } // namespace | 2656 } // namespace |
2657 } // namespace cc | 2657 } // namespace cc |
OLD | NEW |