| 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 "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 FakeRasterSource::CreateFilled(layer_bounds); | 781 FakeRasterSource::CreateFilled(layer_bounds); |
| 782 SetupPendingTree(pending_raster_source); | 782 SetupPendingTree(pending_raster_source); |
| 783 | 783 |
| 784 std::unique_ptr<FakePictureLayerImpl> pending_child = | 784 std::unique_ptr<FakePictureLayerImpl> pending_child = |
| 785 FakePictureLayerImpl::CreateWithRasterSource(host_impl()->pending_tree(), | 785 FakePictureLayerImpl::CreateWithRasterSource(host_impl()->pending_tree(), |
| 786 2, pending_raster_source); | 786 2, pending_raster_source); |
| 787 int child_id = pending_child->id(); | 787 int child_id = pending_child->id(); |
| 788 pending_layer()->AddChild(std::move(pending_child)); | 788 pending_layer()->AddChild(std::move(pending_child)); |
| 789 | 789 |
| 790 FakePictureLayerImpl* pending_child_layer = | 790 FakePictureLayerImpl* pending_child_layer = |
| 791 static_cast<FakePictureLayerImpl*>(pending_layer()->children()[0]); | 791 static_cast<FakePictureLayerImpl*>( |
| 792 pending_layer()->test_properties()->children[0]); |
| 792 pending_child_layer->SetDrawsContent(true); | 793 pending_child_layer->SetDrawsContent(true); |
| 793 | 794 |
| 794 host_impl()->AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); | 795 host_impl()->AdvanceToNextFrame(base::TimeDelta::FromMilliseconds(1)); |
| 795 bool update_lcd_text = false; | 796 bool update_lcd_text = false; |
| 796 host_impl()->pending_tree()->property_trees()->needs_rebuild = true; | 797 host_impl()->pending_tree()->property_trees()->needs_rebuild = true; |
| 797 host_impl()->pending_tree()->BuildLayerListAndPropertyTreesForTesting(); | 798 host_impl()->pending_tree()->BuildLayerListAndPropertyTreesForTesting(); |
| 798 host_impl()->pending_tree()->UpdateDrawProperties(update_lcd_text); | 799 host_impl()->pending_tree()->UpdateDrawProperties(update_lcd_text); |
| 799 | 800 |
| 800 ActivateTree(); | 801 ActivateTree(); |
| 801 SetupPendingTree(pending_raster_source); | 802 SetupPendingTree(pending_raster_source); |
| (...skipping 1081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 } | 1884 } |
| 1884 | 1885 |
| 1885 // Ensures that the tile manager does not attempt to reuse tiles when partial | 1886 // Ensures that the tile manager does not attempt to reuse tiles when partial |
| 1886 // raster is disabled. | 1887 // raster is disabled. |
| 1887 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { | 1888 TEST_F(TileManagerTest, PartialRasterSuccessfullyDisabled) { |
| 1888 RunPartialRasterCheck(TakeHostImpl(), false /* partial_raster_enabled */); | 1889 RunPartialRasterCheck(TakeHostImpl(), false /* partial_raster_enabled */); |
| 1889 } | 1890 } |
| 1890 | 1891 |
| 1891 } // namespace | 1892 } // namespace |
| 1892 } // namespace cc | 1893 } // namespace cc |
| OLD | NEW |