| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
| 8 #include "cc/debug/lap_timer.h" | 8 #include "cc/debug/lap_timer.h" |
| 9 #include "cc/test/fake_display_list_raster_source.h" | 9 #include "cc/test/fake_display_list_raster_source.h" |
| 10 #include "cc/test/fake_impl_task_runner_provider.h" | 10 #include "cc/test/fake_impl_task_runner_provider.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 FakeDisplayListRasterSource::CreateFilled(layer_bounds); | 60 FakeDisplayListRasterSource::CreateFilled(layer_bounds); |
| 61 host_impl_.CreatePendingTree(); | 61 host_impl_.CreatePendingTree(); |
| 62 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); | 62 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); |
| 63 pending_tree->DetachLayerTree(); | 63 pending_tree->DetachLayerTree(); |
| 64 | 64 |
| 65 scoped_ptr<FakePictureLayerImpl> pending_layer = | 65 scoped_ptr<FakePictureLayerImpl> pending_layer = |
| 66 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, 7, | 66 FakePictureLayerImpl::CreateWithRasterSource(pending_tree, 7, |
| 67 raster_source); | 67 raster_source); |
| 68 pending_layer->SetDrawsContent(true); | 68 pending_layer->SetDrawsContent(true); |
| 69 pending_layer->SetHasRenderSurface(true); | 69 pending_layer->SetHasRenderSurface(true); |
| 70 pending_tree->SetRootLayer(pending_layer.Pass()); | 70 pending_tree->SetRootLayer(std::move(pending_layer)); |
| 71 | 71 |
| 72 pending_layer_ = static_cast<FakePictureLayerImpl*>( | 72 pending_layer_ = static_cast<FakePictureLayerImpl*>( |
| 73 host_impl_.pending_tree()->LayerById(7)); | 73 host_impl_.pending_tree()->LayerById(7)); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void RunRasterQueueConstructAndIterateTest(const std::string& test_name, | 76 void RunRasterQueueConstructAndIterateTest(const std::string& test_name, |
| 77 int num_tiles, | 77 int num_tiles, |
| 78 const gfx::Size& viewport_size) { | 78 const gfx::Size& viewport_size) { |
| 79 host_impl_.SetViewportSize(viewport_size); | 79 host_impl_.SetViewportSize(viewport_size); |
| 80 bool update_lcd_text = false; | 80 bool update_lcd_text = false; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 ASSERT_TRUE(host_impl_.tile_manager() != nullptr); | 247 ASSERT_TRUE(host_impl_.tile_manager() != nullptr); |
| 248 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); | 248 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); |
| 249 | 249 |
| 250 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); | 250 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); |
| 251 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100)); | 251 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100)); |
| 252 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100)); | 252 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100)); |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace | 255 } // namespace |
| 256 } // namespace cc | 256 } // namespace cc |
| OLD | NEW |