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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 }; | 325 }; |
326 | 326 |
327 TEST_F(PictureLayerImplTest, TileGridAlignment) { | 327 TEST_F(PictureLayerImplTest, TileGridAlignment) { |
328 // Layer to span 4 raster tiles in x and in y | 328 // Layer to span 4 raster tiles in x and in y |
329 ImplSidePaintingSettings settings; | 329 ImplSidePaintingSettings settings; |
330 gfx::Size layer_size(settings.default_tile_size.width() * 7 / 2, | 330 gfx::Size layer_size(settings.default_tile_size.width() * 7 / 2, |
331 settings.default_tile_size.height() * 7 / 2); | 331 settings.default_tile_size.height() * 7 / 2); |
332 | 332 |
333 scoped_refptr<FakePicturePileImpl> pending_pile = | 333 scoped_refptr<FakePicturePileImpl> pending_pile = |
334 FakePicturePileImpl::CreateFilledPile(layer_size, layer_size); | 334 FakePicturePileImpl::CreateFilledPile(layer_size, layer_size); |
| 335 |
| 336 scoped_ptr<FakePicturePile> active_recording = |
| 337 FakePicturePile::CreateFilledPile(layer_size, layer_size); |
335 scoped_refptr<FakePicturePileImpl> active_pile = | 338 scoped_refptr<FakePicturePileImpl> active_pile = |
336 FakePicturePileImpl::CreateFilledPile(layer_size, layer_size); | 339 FakePicturePileImpl::CreateFromPile(active_recording.get(), nullptr); |
337 | 340 |
338 SetupTrees(pending_pile, active_pile); | 341 SetupTrees(pending_pile, active_pile); |
339 | 342 |
340 // Add 1x1 rects at the centers of each tile, then re-record pile contents | 343 // Add 1x1 rects at the centers of each tile, then re-record pile contents |
341 active_layer_->tilings()->tiling_at(0)->CreateAllTilesForTesting(); | 344 active_layer_->tilings()->tiling_at(0)->CreateAllTilesForTesting(); |
342 std::vector<Tile*> tiles = | 345 std::vector<Tile*> tiles = |
343 active_layer_->tilings()->tiling_at(0)->AllTilesForTesting(); | 346 active_layer_->tilings()->tiling_at(0)->AllTilesForTesting(); |
344 EXPECT_EQ(16u, tiles.size()); | 347 EXPECT_EQ(16u, tiles.size()); |
345 std::vector<SkRect> rects; | 348 std::vector<SkRect> rects; |
346 std::vector<Tile*>::const_iterator tile_iter; | 349 std::vector<Tile*>::const_iterator tile_iter; |
347 for (tile_iter = tiles.begin(); tile_iter < tiles.end(); tile_iter++) { | 350 for (tile_iter = tiles.begin(); tile_iter < tiles.end(); tile_iter++) { |
348 gfx::Point tile_center = (*tile_iter)->content_rect().CenterPoint(); | 351 gfx::Point tile_center = (*tile_iter)->content_rect().CenterPoint(); |
349 gfx::Rect rect(tile_center.x(), tile_center.y(), 1, 1); | 352 gfx::Rect rect(tile_center.x(), tile_center.y(), 1, 1); |
350 active_pile->add_draw_rect(rect); | 353 active_recording->add_draw_rect(rect); |
351 rects.push_back(SkRect::MakeXYWH(rect.x(), rect.y(), 1, 1)); | 354 rects.push_back(SkRect::MakeXYWH(rect.x(), rect.y(), 1, 1)); |
352 } | 355 } |
| 356 |
353 // Force re-raster with newly injected content | 357 // Force re-raster with newly injected content |
354 active_pile->RemoveRecordingAt(0, 0); | 358 active_recording->RemoveRecordingAt(0, 0); |
355 active_pile->AddRecordingAt(0, 0); | 359 active_recording->AddRecordingAt(0, 0); |
| 360 |
| 361 scoped_refptr<FakePicturePileImpl> updated_active_pile = |
| 362 FakePicturePileImpl::CreateFromPile(active_recording.get(), nullptr); |
356 | 363 |
357 std::vector<SkRect>::const_iterator rect_iter = rects.begin(); | 364 std::vector<SkRect>::const_iterator rect_iter = rects.begin(); |
358 for (tile_iter = tiles.begin(); tile_iter < tiles.end(); tile_iter++) { | 365 for (tile_iter = tiles.begin(); tile_iter < tiles.end(); tile_iter++) { |
359 MockCanvas mock_canvas(1000, 1000); | 366 MockCanvas mock_canvas(1000, 1000); |
360 active_pile->PlaybackToSharedCanvas(&mock_canvas, | 367 updated_active_pile->PlaybackToSharedCanvas( |
361 (*tile_iter)->content_rect(), 1.0f); | 368 &mock_canvas, (*tile_iter)->content_rect(), 1.0f); |
362 | 369 |
363 // This test verifies that when drawing the contents of a specific tile | 370 // This test verifies that when drawing the contents of a specific tile |
364 // at content scale 1.0, the playback canvas never receives content from | 371 // at content scale 1.0, the playback canvas never receives content from |
365 // neighboring tiles which indicates that the tile grid embedded in | 372 // neighboring tiles which indicates that the tile grid embedded in |
366 // SkPicture is perfectly aligned with the compositor's tiles. | 373 // SkPicture is perfectly aligned with the compositor's tiles. |
367 EXPECT_EQ(1u, mock_canvas.rects_.size()); | 374 EXPECT_EQ(1u, mock_canvas.rects_.size()); |
368 EXPECT_EQ(*rect_iter, mock_canvas.rects_[0]); | 375 EXPECT_EQ(*rect_iter, mock_canvas.rects_[0]); |
369 rect_iter++; | 376 rect_iter++; |
370 } | 377 } |
371 } | 378 } |
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1624 render_pass->quad_list.front()->material); | 1631 render_pass->quad_list.front()->material); |
1625 } | 1632 } |
1626 | 1633 |
1627 TEST_F(PictureLayerImplTest, SolidColorLayerHasVisibleFullCoverage) { | 1634 TEST_F(PictureLayerImplTest, SolidColorLayerHasVisibleFullCoverage) { |
1628 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); | 1635 scoped_ptr<RenderPass> render_pass = RenderPass::Create(); |
1629 | 1636 |
1630 gfx::Size tile_size(1000, 1000); | 1637 gfx::Size tile_size(1000, 1000); |
1631 gfx::Size layer_bounds(1500, 1500); | 1638 gfx::Size layer_bounds(1500, 1500); |
1632 gfx::Rect visible_rect(250, 250, 1000, 1000); | 1639 gfx::Rect visible_rect(250, 250, 1000, 1000); |
1633 | 1640 |
| 1641 scoped_ptr<FakePicturePile> empty_recording = |
| 1642 FakePicturePile::CreateEmptyPile(tile_size, layer_bounds); |
| 1643 empty_recording->SetIsSolidColor(true); |
| 1644 |
1634 scoped_refptr<FakePicturePileImpl> pending_pile = | 1645 scoped_refptr<FakePicturePileImpl> pending_pile = |
1635 FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds); | 1646 FakePicturePileImpl::CreateFromPile(empty_recording.get(), nullptr); |
1636 scoped_refptr<FakePicturePileImpl> active_pile = | 1647 scoped_refptr<FakePicturePileImpl> active_pile = |
1637 FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds); | 1648 FakePicturePileImpl::CreateFromPile(empty_recording.get(), nullptr); |
1638 | |
1639 pending_pile->set_is_solid_color(true); | |
1640 active_pile->set_is_solid_color(true); | |
1641 | 1649 |
1642 SetupTrees(pending_pile, active_pile); | 1650 SetupTrees(pending_pile, active_pile); |
1643 | 1651 |
1644 active_layer_->draw_properties().visible_content_rect = visible_rect; | 1652 active_layer_->draw_properties().visible_content_rect = visible_rect; |
1645 | 1653 |
1646 AppendQuadsData data; | 1654 AppendQuadsData data; |
1647 active_layer_->WillDraw(DRAW_MODE_SOFTWARE, nullptr); | 1655 active_layer_->WillDraw(DRAW_MODE_SOFTWARE, nullptr); |
1648 active_layer_->AppendQuads(render_pass.get(), Occlusion(), &data); | 1656 active_layer_->AppendQuads(render_pass.get(), Occlusion(), &data); |
1649 active_layer_->DidDraw(nullptr); | 1657 active_layer_->DidDraw(nullptr); |
1650 | 1658 |
1651 Region remaining = visible_rect; | 1659 Region remaining = visible_rect; |
1652 for (const auto& quad : render_pass->quad_list) { | 1660 for (const auto& quad : render_pass->quad_list) { |
1653 EXPECT_TRUE(visible_rect.Contains(quad->rect)); | 1661 EXPECT_TRUE(visible_rect.Contains(quad->rect)); |
1654 EXPECT_TRUE(remaining.Contains(quad->rect)); | 1662 EXPECT_TRUE(remaining.Contains(quad->rect)); |
1655 remaining.Subtract(quad->rect); | 1663 remaining.Subtract(quad->rect); |
1656 } | 1664 } |
1657 | 1665 |
1658 EXPECT_TRUE(remaining.IsEmpty()); | 1666 EXPECT_TRUE(remaining.IsEmpty()); |
1659 } | 1667 } |
1660 | 1668 |
1661 TEST_F(PictureLayerImplTest, TileScalesWithSolidColorPile) { | 1669 TEST_F(PictureLayerImplTest, TileScalesWithSolidColorPile) { |
1662 gfx::Size layer_bounds(200, 200); | 1670 gfx::Size layer_bounds(200, 200); |
1663 gfx::Size tile_size(host_impl_.settings().default_tile_size); | 1671 gfx::Size tile_size(host_impl_.settings().default_tile_size); |
1664 scoped_refptr<FakePicturePileImpl> pending_pile = | 1672 scoped_refptr<FakePicturePileImpl> pending_pile = |
1665 FakePicturePileImpl::CreateEmptyPileThatThinksItHasRecordings( | 1673 FakePicturePileImpl::CreateEmptyPileThatThinksItHasRecordings( |
1666 tile_size, layer_bounds); | 1674 tile_size, layer_bounds, false); |
1667 scoped_refptr<FakePicturePileImpl> active_pile = | 1675 scoped_refptr<FakePicturePileImpl> active_pile = |
1668 FakePicturePileImpl::CreateEmptyPileThatThinksItHasRecordings( | 1676 FakePicturePileImpl::CreateEmptyPileThatThinksItHasRecordings( |
1669 tile_size, layer_bounds); | 1677 tile_size, layer_bounds, true); |
1670 | 1678 |
1671 pending_pile->set_is_solid_color(false); | |
1672 active_pile->set_is_solid_color(true); | |
1673 SetupTrees(pending_pile, active_pile); | 1679 SetupTrees(pending_pile, active_pile); |
1674 // Solid color pile should not allow tilings at any scale. | 1680 // Solid color pile should not allow tilings at any scale. |
1675 EXPECT_FALSE(active_layer_->CanHaveTilings()); | 1681 EXPECT_FALSE(active_layer_->CanHaveTilings()); |
1676 EXPECT_EQ(0.f, active_layer_->ideal_contents_scale()); | 1682 EXPECT_EQ(0.f, active_layer_->ideal_contents_scale()); |
1677 | 1683 |
1678 // Activate non-solid-color pending pile makes active layer can have tilings. | 1684 // Activate non-solid-color pending pile makes active layer can have tilings. |
1679 ActivateTree(); | 1685 ActivateTree(); |
1680 EXPECT_TRUE(active_layer_->CanHaveTilings()); | 1686 EXPECT_TRUE(active_layer_->CanHaveTilings()); |
1681 EXPECT_GT(active_layer_->ideal_contents_scale(), 0.f); | 1687 EXPECT_GT(active_layer_->ideal_contents_scale(), 0.f); |
1682 } | 1688 } |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2098 TEST_F(PictureLayerImplTest, NothingRequiredIfActiveMissingTiles) { | 2104 TEST_F(PictureLayerImplTest, NothingRequiredIfActiveMissingTiles) { |
2099 gfx::Size layer_bounds(400, 400); | 2105 gfx::Size layer_bounds(400, 400); |
2100 gfx::Size tile_size(100, 100); | 2106 gfx::Size tile_size(100, 100); |
2101 | 2107 |
2102 scoped_refptr<FakePicturePileImpl> pending_pile = | 2108 scoped_refptr<FakePicturePileImpl> pending_pile = |
2103 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); | 2109 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
2104 // This pile will create tilings, but has no recordings so will not create any | 2110 // This pile will create tilings, but has no recordings so will not create any |
2105 // tiles. This is attempting to simulate scrolling past the end of recorded | 2111 // tiles. This is attempting to simulate scrolling past the end of recorded |
2106 // content on the active layer, where the recordings are so far away that | 2112 // content on the active layer, where the recordings are so far away that |
2107 // no tiles are created. | 2113 // no tiles are created. |
| 2114 bool is_solid_color = false; |
2108 scoped_refptr<FakePicturePileImpl> active_pile = | 2115 scoped_refptr<FakePicturePileImpl> active_pile = |
2109 FakePicturePileImpl::CreateEmptyPileThatThinksItHasRecordings( | 2116 FakePicturePileImpl::CreateEmptyPileThatThinksItHasRecordings( |
2110 tile_size, layer_bounds); | 2117 tile_size, layer_bounds, is_solid_color); |
2111 | 2118 |
2112 SetupTreesWithFixedTileSize(pending_pile, active_pile, tile_size, Region()); | 2119 SetupTreesWithFixedTileSize(pending_pile, active_pile, tile_size, Region()); |
2113 | 2120 |
2114 // Active layer has tilings, but no tiles due to missing recordings. | 2121 // Active layer has tilings, but no tiles due to missing recordings. |
2115 EXPECT_TRUE(active_layer_->CanHaveTilings()); | 2122 EXPECT_TRUE(active_layer_->CanHaveTilings()); |
2116 EXPECT_EQ(active_layer_->tilings()->num_tilings(), 2u); | 2123 EXPECT_EQ(active_layer_->tilings()->num_tilings(), 2u); |
2117 EXPECT_EQ(active_layer_->HighResTiling()->AllTilesForTesting().size(), 0u); | 2124 EXPECT_EQ(active_layer_->HighResTiling()->AllTilesForTesting().size(), 0u); |
2118 | 2125 |
2119 // Since the active layer has no tiles at all, the pending layer doesn't | 2126 // Since the active layer has no tiles at all, the pending layer doesn't |
2120 // need content in order to activate. | 2127 // need content in order to activate. |
(...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3023 queue->Pop(); | 3030 queue->Pop(); |
3024 } | 3031 } |
3025 | 3032 |
3026 queue.reset(new TilingSetRasterQueueRequired( | 3033 queue.reset(new TilingSetRasterQueueRequired( |
3027 active_layer_->picture_layer_tiling_set(), | 3034 active_layer_->picture_layer_tiling_set(), |
3028 RasterTilePriorityQueue::Type::REQUIRED_FOR_ACTIVATION)); | 3035 RasterTilePriorityQueue::Type::REQUIRED_FOR_ACTIVATION)); |
3029 EXPECT_TRUE(queue->IsEmpty()); | 3036 EXPECT_TRUE(queue->IsEmpty()); |
3030 } | 3037 } |
3031 | 3038 |
3032 TEST_F(PictureLayerImplTest, TilingSetRasterQueueRequiredNoHighRes) { | 3039 TEST_F(PictureLayerImplTest, TilingSetRasterQueueRequiredNoHighRes) { |
| 3040 scoped_ptr<FakePicturePile> empty_recording = |
| 3041 FakePicturePile::CreateEmptyPile(gfx::Size(256, 256), |
| 3042 gfx::Size(1024, 1024)); |
| 3043 empty_recording->SetIsSolidColor(true); |
| 3044 |
3033 scoped_refptr<FakePicturePileImpl> pending_pile = | 3045 scoped_refptr<FakePicturePileImpl> pending_pile = |
3034 FakePicturePileImpl::CreateEmptyPile(gfx::Size(256, 256), | 3046 FakePicturePileImpl::CreateFromPile(empty_recording.get(), nullptr); |
3035 gfx::Size(1024, 1024)); | |
3036 pending_pile->set_is_solid_color(true); | |
3037 | 3047 |
3038 SetupPendingTree(pending_pile); | 3048 SetupPendingTree(pending_pile); |
3039 EXPECT_FALSE( | 3049 EXPECT_FALSE( |
3040 pending_layer_->picture_layer_tiling_set()->FindTilingWithResolution( | 3050 pending_layer_->picture_layer_tiling_set()->FindTilingWithResolution( |
3041 HIGH_RESOLUTION)); | 3051 HIGH_RESOLUTION)); |
3042 | 3052 |
3043 scoped_ptr<TilingSetRasterQueueRequired> queue( | 3053 scoped_ptr<TilingSetRasterQueueRequired> queue( |
3044 new TilingSetRasterQueueRequired( | 3054 new TilingSetRasterQueueRequired( |
3045 pending_layer_->picture_layer_tiling_set(), | 3055 pending_layer_->picture_layer_tiling_set(), |
3046 RasterTilePriorityQueue::Type::REQUIRED_FOR_ACTIVATION)); | 3056 RasterTilePriorityQueue::Type::REQUIRED_FOR_ACTIVATION)); |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3514 TEST_F(NoLowResPictureLayerImplTest, NothingRequiredIfActiveMissingTiles) { | 3524 TEST_F(NoLowResPictureLayerImplTest, NothingRequiredIfActiveMissingTiles) { |
3515 gfx::Size layer_bounds(400, 400); | 3525 gfx::Size layer_bounds(400, 400); |
3516 gfx::Size tile_size(100, 100); | 3526 gfx::Size tile_size(100, 100); |
3517 | 3527 |
3518 scoped_refptr<FakePicturePileImpl> pending_pile = | 3528 scoped_refptr<FakePicturePileImpl> pending_pile = |
3519 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); | 3529 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
3520 // This pile will create tilings, but has no recordings so will not create any | 3530 // This pile will create tilings, but has no recordings so will not create any |
3521 // tiles. This is attempting to simulate scrolling past the end of recorded | 3531 // tiles. This is attempting to simulate scrolling past the end of recorded |
3522 // content on the active layer, where the recordings are so far away that | 3532 // content on the active layer, where the recordings are so far away that |
3523 // no tiles are created. | 3533 // no tiles are created. |
| 3534 bool is_solid_color = false; |
3524 scoped_refptr<FakePicturePileImpl> active_pile = | 3535 scoped_refptr<FakePicturePileImpl> active_pile = |
3525 FakePicturePileImpl::CreateEmptyPileThatThinksItHasRecordings( | 3536 FakePicturePileImpl::CreateEmptyPileThatThinksItHasRecordings( |
3526 tile_size, layer_bounds); | 3537 tile_size, layer_bounds, is_solid_color); |
3527 | 3538 |
3528 SetupTreesWithFixedTileSize(pending_pile, active_pile, tile_size, Region()); | 3539 SetupTreesWithFixedTileSize(pending_pile, active_pile, tile_size, Region()); |
3529 | 3540 |
3530 // Active layer has tilings, but no tiles due to missing recordings. | 3541 // Active layer has tilings, but no tiles due to missing recordings. |
3531 EXPECT_TRUE(active_layer_->CanHaveTilings()); | 3542 EXPECT_TRUE(active_layer_->CanHaveTilings()); |
3532 EXPECT_EQ(active_layer_->tilings()->num_tilings(), | 3543 EXPECT_EQ(active_layer_->tilings()->num_tilings(), |
3533 host_impl_.settings().create_low_res_tiling ? 2u : 1u); | 3544 host_impl_.settings().create_low_res_tiling ? 2u : 1u); |
3534 EXPECT_EQ(active_layer_->HighResTiling()->AllTilesForTesting().size(), 0u); | 3545 EXPECT_EQ(active_layer_->HighResTiling()->AllTilesForTesting().size(), 0u); |
3535 | 3546 |
3536 // Since the active layer has no tiles at all, the pending layer doesn't | 3547 // Since the active layer has no tiles at all, the pending layer doesn't |
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4812 // Ensure we can activate. | 4823 // Ensure we can activate. |
4813 EXPECT_TRUE(host_impl_.tile_manager()->IsReadyToActivate()); | 4824 EXPECT_TRUE(host_impl_.tile_manager()->IsReadyToActivate()); |
4814 } | 4825 } |
4815 | 4826 |
4816 TEST_F(PictureLayerImplTest, CloneMissingRecordings) { | 4827 TEST_F(PictureLayerImplTest, CloneMissingRecordings) { |
4817 gfx::Size tile_size(100, 100); | 4828 gfx::Size tile_size(100, 100); |
4818 gfx::Size layer_bounds(400, 400); | 4829 gfx::Size layer_bounds(400, 400); |
4819 | 4830 |
4820 scoped_refptr<FakePicturePileImpl> filled_pile = | 4831 scoped_refptr<FakePicturePileImpl> filled_pile = |
4821 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); | 4832 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
| 4833 |
| 4834 scoped_ptr<FakePicturePile> partial_recording = |
| 4835 FakePicturePile::CreateEmptyPile(tile_size, layer_bounds); |
| 4836 for (int i = 1; i < partial_recording->tiling().num_tiles_x(); ++i) { |
| 4837 for (int j = 1; j < partial_recording->tiling().num_tiles_y(); ++j) |
| 4838 partial_recording->AddRecordingAt(i, j); |
| 4839 } |
4822 scoped_refptr<FakePicturePileImpl> partial_pile = | 4840 scoped_refptr<FakePicturePileImpl> partial_pile = |
4823 FakePicturePileImpl::CreateEmptyPile(tile_size, layer_bounds); | 4841 FakePicturePileImpl::CreateFromPile(partial_recording.get(), nullptr); |
4824 for (int i = 1; i < partial_pile->tiling().num_tiles_x(); ++i) { | |
4825 for (int j = 1; j < partial_pile->tiling().num_tiles_y(); ++j) | |
4826 partial_pile->AddRecordingAt(i, j); | |
4827 } | |
4828 | 4842 |
4829 SetupPendingTreeWithFixedTileSize(filled_pile, tile_size, Region()); | 4843 SetupPendingTreeWithFixedTileSize(filled_pile, tile_size, Region()); |
4830 ActivateTree(); | 4844 ActivateTree(); |
4831 | 4845 |
4832 PictureLayerTiling* pending_tiling = old_pending_layer_->HighResTiling(); | 4846 PictureLayerTiling* pending_tiling = old_pending_layer_->HighResTiling(); |
4833 PictureLayerTiling* active_tiling = active_layer_->HighResTiling(); | 4847 PictureLayerTiling* active_tiling = active_layer_->HighResTiling(); |
4834 | 4848 |
4835 // We should have all tiles in both tile sets. | 4849 // We should have all tiles in both tile sets. |
4836 EXPECT_EQ(5u * 5u, pending_tiling->AllTilesForTesting().size()); | 4850 EXPECT_EQ(5u * 5u, pending_tiling->AllTilesForTesting().size()); |
4837 EXPECT_EQ(5u * 5u, active_tiling->AllTilesForTesting().size()); | 4851 EXPECT_EQ(5u * 5u, active_tiling->AllTilesForTesting().size()); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4933 result = layer->CalculateTileSize(gfx::Size(447, 400)); | 4947 result = layer->CalculateTileSize(gfx::Size(447, 400)); |
4934 EXPECT_EQ(result.width(), 448); | 4948 EXPECT_EQ(result.width(), 448); |
4935 EXPECT_EQ(result.height(), 448); | 4949 EXPECT_EQ(result.height(), 448); |
4936 result = layer->CalculateTileSize(gfx::Size(500, 499)); | 4950 result = layer->CalculateTileSize(gfx::Size(500, 499)); |
4937 EXPECT_EQ(result.width(), 512); | 4951 EXPECT_EQ(result.width(), 512); |
4938 EXPECT_EQ(result.height(), 500 + 2); | 4952 EXPECT_EQ(result.height(), 500 + 2); |
4939 } | 4953 } |
4940 | 4954 |
4941 } // namespace | 4955 } // namespace |
4942 } // namespace cc | 4956 } // namespace cc |
OLD | NEW |