Chromium Code Reviews| 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 "base/run_loop.h" | 5 #include "base/run_loop.h" |
| 6 #include "base/thread_task_runner_handle.h" | 6 #include "base/thread_task_runner_handle.h" |
| 7 #include "cc/playback/display_list_raster_source.h" | 7 #include "cc/playback/display_list_raster_source.h" |
| 8 #include "cc/playback/display_list_recording_source.h" | 8 #include "cc/playback/display_list_recording_source.h" |
| 9 #include "cc/raster/raster_buffer.h" | 9 #include "cc/raster/raster_buffer.h" |
| 10 #include "cc/resources/resource_pool.h" | 10 #include "cc/resources/resource_pool.h" |
| (...skipping 1434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1445 scoped_ptr<TilingSetRasterQueueAll> queue( | 1445 scoped_ptr<TilingSetRasterQueueAll> queue( |
| 1446 new TilingSetRasterQueueAll(tiling_set.get(), false)); | 1446 new TilingSetRasterQueueAll(tiling_set.get(), false)); |
| 1447 EXPECT_FALSE(queue->IsEmpty()); | 1447 EXPECT_FALSE(queue->IsEmpty()); |
| 1448 } | 1448 } |
| 1449 } | 1449 } |
| 1450 | 1450 |
| 1451 class TileManagerTest : public testing::Test { | 1451 class TileManagerTest : public testing::Test { |
| 1452 public: | 1452 public: |
| 1453 TileManagerTest() | 1453 TileManagerTest() |
| 1454 : output_surface_(FakeOutputSurface::CreateSoftware( | 1454 : output_surface_(FakeOutputSurface::CreateSoftware( |
| 1455 make_scoped_ptr(new SoftwareOutputDevice))), | 1455 make_scoped_ptr(new SoftwareOutputDevice))) {} |
| 1456 host_impl_(new MockLayerTreeHostImpl(&proxy_, | 1456 |
| 1457 &shared_bitmap_manager_, | 1457 void SetUp() override { |
| 1458 &task_graph_runner_)) { | 1458 LayerTreeSettings settings; |
| 1459 CustomizeSettings(&settings); | |
| 1460 host_impl_.reset(new MockLayerTreeHostImpl( | |
| 1461 settings, &proxy_, &shared_bitmap_manager_, &task_graph_runner_)); | |
| 1459 host_impl_->SetVisible(true); | 1462 host_impl_->SetVisible(true); |
| 1460 host_impl_->InitializeRenderer(output_surface_.get()); | 1463 host_impl_->InitializeRenderer(output_surface_.get()); |
| 1461 } | 1464 } |
| 1462 | 1465 |
| 1463 protected: | 1466 protected: |
| 1464 // MockLayerTreeHostImpl allows us to intercept tile manager callbacks. | 1467 // MockLayerTreeHostImpl allows us to intercept tile manager callbacks. |
| 1465 class MockLayerTreeHostImpl : public FakeLayerTreeHostImpl { | 1468 class MockLayerTreeHostImpl : public FakeLayerTreeHostImpl { |
| 1466 public: | 1469 public: |
| 1467 MockLayerTreeHostImpl(Proxy* proxy, | 1470 MockLayerTreeHostImpl(const LayerTreeSettings& settings, |
| 1471 Proxy* proxy, | |
| 1468 SharedBitmapManager* manager, | 1472 SharedBitmapManager* manager, |
| 1469 TaskGraphRunner* task_graph_runner) | 1473 TaskGraphRunner* task_graph_runner) |
| 1470 : FakeLayerTreeHostImpl(proxy, manager, task_graph_runner) {} | 1474 : FakeLayerTreeHostImpl(settings, proxy, manager, task_graph_runner) {} |
| 1471 | 1475 |
| 1472 MOCK_METHOD0(NotifyAllTileTasksCompleted, void()); | 1476 MOCK_METHOD0(NotifyAllTileTasksCompleted, void()); |
| 1473 }; | 1477 }; |
| 1474 | 1478 |
| 1479 // By default do no customization. | |
| 1480 virtual void CustomizeSettings(LayerTreeSettings* settings) {} | |
| 1481 | |
| 1475 TestSharedBitmapManager shared_bitmap_manager_; | 1482 TestSharedBitmapManager shared_bitmap_manager_; |
| 1476 TestTaskGraphRunner task_graph_runner_; | 1483 TestTaskGraphRunner task_graph_runner_; |
| 1477 FakeImplProxy proxy_; | 1484 FakeImplProxy proxy_; |
| 1478 scoped_ptr<OutputSurface> output_surface_; | 1485 scoped_ptr<OutputSurface> output_surface_; |
| 1479 scoped_ptr<MockLayerTreeHostImpl> host_impl_; | 1486 scoped_ptr<MockLayerTreeHostImpl> host_impl_; |
| 1480 }; | 1487 }; |
| 1481 | 1488 |
| 1482 // Test to ensure that we call NotifyAllTileTasksCompleted when PrepareTiles is | 1489 // Test to ensure that we call NotifyAllTileTasksCompleted when PrepareTiles is |
| 1483 // called. | 1490 // called. |
| 1484 TEST_F(TileManagerTest, AllWorkFinishedTest) { | 1491 TEST_F(TileManagerTest, AllWorkFinishedTest) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1585 EXPECT_EQ(HIGH_RESOLUTION, resolutions[i]); | 1592 EXPECT_EQ(HIGH_RESOLUTION, resolutions[i]); |
| 1586 // Since it's high res, the bitmap (blue) was drawn, and the | 1593 // Since it's high res, the bitmap (blue) was drawn, and the |
| 1587 // background is not visible. | 1594 // background is not visible. |
| 1588 ASSERT_EQ(SK_ColorBLUE, bitmap->getColor(x, y)); | 1595 ASSERT_EQ(SK_ColorBLUE, bitmap->getColor(x, y)); |
| 1589 } | 1596 } |
| 1590 } | 1597 } |
| 1591 } | 1598 } |
| 1592 } | 1599 } |
| 1593 } | 1600 } |
| 1594 | 1601 |
| 1595 // Fake TileTaskRunner that just cancels all scheduled tasks immediately. | 1602 // Fake TileTaskRunner that just no-ops all calls. |
| 1596 class CancellingTileTaskRunner : public TileTaskRunner, public TileTaskClient { | 1603 class FakeTileTaskRunner : public TileTaskRunner, public TileTaskClient { |
| 1597 public: | 1604 public: |
| 1598 CancellingTileTaskRunner() {} | 1605 FakeTileTaskRunner() {} |
| 1606 ~FakeTileTaskRunner() override {} | |
| 1599 | 1607 |
| 1600 // TileTaskRunner methods. | 1608 // TileTaskRunner methods. |
| 1601 void SetClient(TileTaskRunnerClient* client) override {} | 1609 void SetClient(TileTaskRunnerClient* client) override {} |
| 1602 void Shutdown() override {} | 1610 void Shutdown() override {} |
| 1603 void CheckForCompletedTasks() override {} | 1611 void CheckForCompletedTasks() override {} |
| 1604 ResourceFormat GetResourceFormat(bool must_support_alpha) const override { | 1612 ResourceFormat GetResourceFormat(bool must_support_alpha) const override { |
| 1605 return ResourceFormat::RGBA_8888; | 1613 return ResourceFormat::RGBA_8888; |
| 1606 } | 1614 } |
| 1607 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override { | 1615 bool GetResourceRequiresSwizzle(bool must_support_alpha) const override { |
| 1608 return false; | 1616 return false; |
| 1609 } | 1617 } |
| 1610 | 1618 |
| 1611 void ScheduleTasks(TileTaskQueue* queue) override { | 1619 void ScheduleTasks(TileTaskQueue* queue) override {} |
| 1612 // Just call CompleteOnOriginThread on each item in the queue. As none of | |
| 1613 // these items have run yet, they will be treated as cancelled tasks. | |
| 1614 for (const auto& task : queue->items) { | |
| 1615 task.task->CompleteOnOriginThread(this); | |
| 1616 } | |
| 1617 } | |
| 1618 | 1620 |
| 1619 // TileTaskClient methods. | 1621 // TileTaskClient methods. |
| 1620 scoped_ptr<RasterBuffer> AcquireBufferForRaster( | 1622 scoped_ptr<RasterBuffer> AcquireBufferForRaster( |
| 1621 const Resource* resource, | 1623 const Resource* resource, |
| 1622 uint64_t resource_content_id, | 1624 uint64_t resource_content_id, |
| 1623 uint64_t previous_content_id) override { | 1625 uint64_t previous_content_id) override { |
| 1624 NOTREACHED(); | 1626 NOTREACHED(); |
| 1625 return nullptr; | 1627 return nullptr; |
| 1626 } | 1628 } |
| 1627 void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {} | 1629 void ReleaseBufferForRaster(scoped_ptr<RasterBuffer> buffer) override {} |
| 1630 }; | |
| 1628 | 1631 |
| 1632 // Fake TileTaskRunner that just cancels all scheduled tasks immediately. | |
| 1633 class CancellingTileTaskRunner : public FakeTileTaskRunner { | |
| 1634 public: | |
| 1635 CancellingTileTaskRunner() {} | |
| 1629 ~CancellingTileTaskRunner() override {} | 1636 ~CancellingTileTaskRunner() override {} |
| 1637 | |
| 1638 void ScheduleTasks(TileTaskQueue* queue) override { | |
| 1639 // Just call CompleteOnOriginThread on each item in the queue. As none of | |
| 1640 // these items have run yet, they will be treated as cancelled tasks. | |
| 1641 for (const auto& task : queue->items) { | |
| 1642 task.task->CompleteOnOriginThread(this); | |
| 1643 } | |
| 1644 } | |
| 1645 }; | |
| 1646 | |
| 1647 class PartialRasterTileManagerTest : public TileManagerTest { | |
| 1648 public: | |
| 1649 void CustomizeSettings(LayerTreeSettings* settings) override { | |
| 1650 settings->use_partial_raster = true; | |
| 1651 } | |
| 1630 }; | 1652 }; |
| 1631 | 1653 |
| 1632 // Ensures that if a raster task is cancelled, it gets returned to the resource | 1654 // Ensures that if a raster task is cancelled, it gets returned to the resource |
| 1633 // pool with an invalid content ID, not with its invalidated content ID. | 1655 // pool with an invalid content ID, not with its invalidated content ID. |
| 1634 TEST_F(TileManagerTest, CancelledTasksHaveNoContentId) { | 1656 TEST_F(PartialRasterTileManagerTest, CancelledTasksHaveNoContentId) { |
| 1635 // Create a CancellingTaskRunner and set it on the tile manager so that all | 1657 // Create a CancellingTaskRunner and set it on the tile manager so that all |
| 1636 // scheduled work is immediately cancelled. | 1658 // scheduled work is immediately cancelled. |
| 1637 CancellingTileTaskRunner cancelling_runner; | 1659 CancellingTileTaskRunner cancelling_runner; |
| 1638 host_impl_->tile_manager()->SetTileTaskRunnerForTesting(&cancelling_runner); | 1660 host_impl_->tile_manager()->SetTileTaskRunnerForTesting(&cancelling_runner); |
| 1639 | 1661 |
| 1640 // Pick arbitrary IDs - they don't really matter as long as they're constant. | 1662 // Pick arbitrary IDs - they don't really matter as long as they're constant. |
| 1641 int layer_id = 7; | 1663 const int kLayerId = 7; |
| 1642 int invalidated_id = 43; | 1664 const uint64_t kInvalidatedId = 43; |
| 1665 const gfx::Size kTileSize(128, 128); | |
| 1643 | 1666 |
| 1644 scoped_refptr<FakeDisplayListRasterSource> pending_raster_source = | 1667 scoped_refptr<FakeDisplayListRasterSource> pending_raster_source = |
| 1645 FakeDisplayListRasterSource::CreateFilled(gfx::Size(128, 128)); | 1668 FakeDisplayListRasterSource::CreateFilled(kTileSize); |
| 1646 host_impl_->CreatePendingTree(); | 1669 host_impl_->CreatePendingTree(); |
| 1647 LayerTreeImpl* pending_tree = host_impl_->pending_tree(); | 1670 LayerTreeImpl* pending_tree = host_impl_->pending_tree(); |
| 1648 | 1671 |
| 1649 // Steal from the recycled tree. | 1672 // Steal from the recycled tree. |
| 1650 scoped_ptr<FakePictureLayerImpl> pending_layer = | 1673 scoped_ptr<FakePictureLayerImpl> pending_layer = |
| 1651 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, layer_id, | 1674 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, kLayerId, |
| 1652 pending_raster_source); | 1675 pending_raster_source); |
| 1653 pending_layer->SetDrawsContent(true); | 1676 pending_layer->SetDrawsContent(true); |
| 1654 pending_layer->SetHasRenderSurface(true); | 1677 pending_layer->SetHasRenderSurface(true); |
| 1655 | 1678 |
| 1656 // The bounds() just mirror the raster source size. | 1679 // The bounds() just mirror the raster source size. |
| 1657 pending_layer->SetBounds(pending_layer->raster_source()->GetSize()); | 1680 pending_layer->SetBounds(pending_layer->raster_source()->GetSize()); |
| 1658 pending_tree->SetRootLayer(pending_layer.Pass()); | 1681 pending_tree->SetRootLayer(pending_layer.Pass()); |
| 1659 | 1682 |
| 1660 // Add tilings/tiles for the layer. | 1683 // Add tilings/tiles for the layer. |
| 1661 host_impl_->pending_tree()->UpdateDrawProperties(false /* update_lcd_text */); | 1684 host_impl_->pending_tree()->UpdateDrawProperties(false /* update_lcd_text */); |
| 1662 | 1685 |
| 1663 // Build the raster queue and invalidate the top tile. | 1686 // Build the raster queue and invalidate the top tile. |
| 1664 scoped_ptr<RasterTilePriorityQueue> queue(host_impl_->BuildRasterQueue( | 1687 scoped_ptr<RasterTilePriorityQueue> queue(host_impl_->BuildRasterQueue( |
| 1665 SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL)); | 1688 SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL)); |
| 1666 EXPECT_FALSE(queue->IsEmpty()); | 1689 EXPECT_FALSE(queue->IsEmpty()); |
| 1667 queue->Top().tile()->SetInvalidated(gfx::Rect(), invalidated_id); | 1690 queue->Top().tile()->SetInvalidated(gfx::Rect(), kInvalidatedId); |
| 1668 | 1691 |
| 1669 // PrepareTiles to schedule tasks. Due to the CancellingTileTaskRunner, these | 1692 // PrepareTiles to schedule tasks. Due to the CancellingTileTaskRunner, these |
| 1670 // tasks will immediately be canceled. | 1693 // tasks will immediately be canceled. |
| 1671 host_impl_->tile_manager()->PrepareTiles(host_impl_->global_tile_state()); | 1694 host_impl_->tile_manager()->PrepareTiles(host_impl_->global_tile_state()); |
| 1672 | 1695 |
| 1673 // Make sure that the tile we invalidated above was not returned to the pool | 1696 // Make sure that the tile we invalidated above was not returned to the pool |
| 1674 // with its invalidated resource ID. | 1697 // with its invalidated resource ID. |
| 1675 host_impl_->resource_pool()->CheckBusyResources(); | 1698 host_impl_->resource_pool()->CheckBusyResources(); |
| 1676 EXPECT_FALSE(host_impl_->resource_pool()->TryAcquireResourceWithContentId( | 1699 EXPECT_FALSE(host_impl_->resource_pool()->TryAcquireResourceWithContentId( |
| 1677 invalidated_id)); | 1700 kInvalidatedId)); |
| 1678 | 1701 |
| 1679 // Free our host_impl_ before the cancelling_runner we passed it, as it will | 1702 // Free our host_impl_ before the cancelling_runner we passed it, as it will |
| 1680 // use that class in clean up. | 1703 // use that class in clean up. |
| 1704 host_impl_ = nullptr; | |
| 1705 } | |
| 1706 | |
| 1707 // Fake TileTaskRunner that verifies the resource content ID of raster tasks. | |
| 1708 class VerifyResourceContentIdTileTaskRunner : public FakeTileTaskRunner { | |
| 1709 public: | |
| 1710 explicit VerifyResourceContentIdTileTaskRunner(uint64_t expected_resource_id) | |
| 1711 : expected_resource_id_(expected_resource_id) {} | |
| 1712 ~VerifyResourceContentIdTileTaskRunner() override {} | |
| 1713 | |
| 1714 void ScheduleTasks(TileTaskQueue* queue) override { | |
| 1715 for (const auto& task : queue->items) { | |
| 1716 // Triggers a call to AcquireBufferForRaster. | |
| 1717 task.task->ScheduleOnOriginThread(this); | |
| 1718 // Calls TileManager as though task was cancelled. | |
| 1719 task.task->CompleteOnOriginThread(this); | |
| 1720 } | |
| 1721 } | |
| 1722 | |
| 1723 // TileTaskClient methods. | |
| 1724 scoped_ptr<RasterBuffer> AcquireBufferForRaster( | |
| 1725 const Resource* resource, | |
| 1726 uint64_t resource_content_id, | |
| 1727 uint64_t previous_content_id) override { | |
| 1728 EXPECT_EQ(expected_resource_id_, resource_content_id); | |
| 1729 return nullptr; | |
| 1730 } | |
| 1731 | |
| 1732 private: | |
| 1733 uint64_t expected_resource_id_; | |
| 1734 }; | |
| 1735 | |
| 1736 // Ensures that the tile manager does not attempt to reuse tiles when partial | |
| 1737 // raster is disabled. | |
|
danakj
2015/10/16 18:13:08
copypasta alert: comment does not match test
ericrk
2015/10/16 20:27:13
Done.
| |
| 1738 TEST_F(PartialRasterTileManagerTest, PartialRasterSuccessfullyEnabled) { | |
| 1739 // Pick arbitrary IDs - they don't really matter as long as they're constant. | |
| 1740 const int kLayerId = 7; | |
|
danakj
2015/10/16 18:13:08
It would be nice to share code. It looks like you
ericrk
2015/10/16 20:27:13
yup, done - had to transfer ownership of host_impl
| |
| 1741 const uint64_t kInvalidatedId = 43; | |
| 1742 const gfx::Size kTileSize(128, 128); | |
| 1743 | |
| 1744 // Create a VerifyResourceContentIdTileTaskRunner to ensure that the raster | |
| 1745 // task we see is created with |kInvalidatedId|. | |
| 1746 VerifyResourceContentIdTileTaskRunner verifying_runner(kInvalidatedId); | |
| 1747 host_impl_->tile_manager()->SetTileTaskRunnerForTesting(&verifying_runner); | |
| 1748 | |
| 1749 // Ensure there's a resource with our |kInvalidatedId| in the resource pool. | |
| 1750 host_impl_->resource_pool()->ReleaseResource( | |
| 1751 host_impl_->resource_pool()->AcquireResource(kTileSize, RGBA_8888), | |
| 1752 kInvalidatedId); | |
| 1753 host_impl_->resource_pool()->CheckBusyResources(); | |
| 1754 | |
| 1755 scoped_refptr<FakeDisplayListRasterSource> pending_raster_source = | |
| 1756 FakeDisplayListRasterSource::CreateFilled(kTileSize); | |
| 1757 host_impl_->CreatePendingTree(); | |
| 1758 LayerTreeImpl* pending_tree = host_impl_->pending_tree(); | |
| 1759 | |
| 1760 // Steal from the recycled tree. | |
| 1761 scoped_ptr<FakePictureLayerImpl> pending_layer = | |
| 1762 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, kLayerId, | |
| 1763 pending_raster_source); | |
| 1764 pending_layer->SetDrawsContent(true); | |
| 1765 pending_layer->SetHasRenderSurface(true); | |
| 1766 | |
| 1767 // The bounds() just mirror the raster source size. | |
| 1768 pending_layer->SetBounds(pending_layer->raster_source()->GetSize()); | |
| 1769 pending_tree->SetRootLayer(pending_layer.Pass()); | |
| 1770 | |
| 1771 // Add tilings/tiles for the layer. | |
| 1772 host_impl_->pending_tree()->UpdateDrawProperties(false /* update_lcd_text */); | |
| 1773 | |
| 1774 // Build the raster queue and invalidate the top tile. | |
| 1775 scoped_ptr<RasterTilePriorityQueue> queue(host_impl_->BuildRasterQueue( | |
| 1776 SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL)); | |
| 1777 EXPECT_FALSE(queue->IsEmpty()); | |
| 1778 queue->Top().tile()->SetInvalidated(gfx::Rect(), kInvalidatedId); | |
| 1779 | |
| 1780 // PrepareTiles to schedule tasks. Due to the | |
| 1781 // VerifyPreviousContentTileTaskRunner, these tasks will verified and | |
| 1782 // cancelled. | |
| 1783 host_impl_->tile_manager()->PrepareTiles(host_impl_->global_tile_state()); | |
| 1784 | |
| 1785 // Free our host_impl_ before the cancelling_runner we passed it, as it will | |
| 1786 // use that class in clean up. | |
| 1787 host_impl_ = nullptr; | |
| 1788 } | |
| 1789 | |
| 1790 // Ensures that the tile manager does not attempt to reuse tiles when partial | |
| 1791 // raster is disabled. | |
| 1792 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { | |
| 1793 // Pick arbitrary IDs - they don't really matter as long as they're constant. | |
| 1794 const int kLayerId = 7; | |
| 1795 const uint64_t kInvalidatedId = 43; | |
| 1796 const gfx::Size kTileSize(128, 128); | |
| 1797 | |
| 1798 // Create a VerifyResourceContentIdTileTaskRunner to ensure that the raster | |
| 1799 // task we see is 0, not our |kInvalidatedId|. | |
| 1800 VerifyResourceContentIdTileTaskRunner verifying_runner(0u); | |
| 1801 host_impl_->tile_manager()->SetTileTaskRunnerForTesting(&verifying_runner); | |
| 1802 | |
| 1803 // Ensure there's a resource with our |kInvalidatedId| in the resource pool. | |
| 1804 host_impl_->resource_pool()->ReleaseResource( | |
| 1805 host_impl_->resource_pool()->AcquireResource(kTileSize, RGBA_8888), | |
| 1806 kInvalidatedId); | |
| 1807 host_impl_->resource_pool()->CheckBusyResources(); | |
| 1808 | |
| 1809 scoped_refptr<FakeDisplayListRasterSource> pending_raster_source = | |
| 1810 FakeDisplayListRasterSource::CreateFilled(kTileSize); | |
| 1811 host_impl_->CreatePendingTree(); | |
| 1812 LayerTreeImpl* pending_tree = host_impl_->pending_tree(); | |
| 1813 | |
| 1814 // Steal from the recycled tree. | |
| 1815 scoped_ptr<FakePictureLayerImpl> pending_layer = | |
| 1816 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, kLayerId, | |
| 1817 pending_raster_source); | |
| 1818 pending_layer->SetDrawsContent(true); | |
| 1819 pending_layer->SetHasRenderSurface(true); | |
| 1820 | |
| 1821 // The bounds() just mirror the raster source size. | |
| 1822 pending_layer->SetBounds(pending_layer->raster_source()->GetSize()); | |
| 1823 pending_tree->SetRootLayer(pending_layer.Pass()); | |
| 1824 | |
| 1825 // Add tilings/tiles for the layer. | |
| 1826 host_impl_->pending_tree()->UpdateDrawProperties(false /* update_lcd_text */); | |
| 1827 | |
| 1828 // Build the raster queue and invalidate the top tile. | |
| 1829 scoped_ptr<RasterTilePriorityQueue> queue(host_impl_->BuildRasterQueue( | |
| 1830 SAME_PRIORITY_FOR_BOTH_TREES, RasterTilePriorityQueue::Type::ALL)); | |
| 1831 EXPECT_FALSE(queue->IsEmpty()); | |
| 1832 queue->Top().tile()->SetInvalidated(gfx::Rect(), kInvalidatedId); | |
| 1833 | |
| 1834 // PrepareTiles to schedule tasks. Due to the | |
| 1835 // VerifyPreviousContentTileTaskRunner, these tasks will verified and | |
| 1836 // cancelled. | |
| 1837 host_impl_->tile_manager()->PrepareTiles(host_impl_->global_tile_state()); | |
| 1838 | |
| 1839 // Free our host_impl_ before the cancelling_runner we passed it, as it will | |
| 1840 // use that class in clean up. | |
| 1681 host_impl_ = nullptr; | 1841 host_impl_ = nullptr; |
| 1682 } | 1842 } |
| 1683 | 1843 |
| 1684 } // namespace | 1844 } // namespace |
| 1685 } // namespace cc | 1845 } // namespace cc |
| OLD | NEW |