| 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_proxy.h" | 10 #include "cc/test/fake_impl_proxy.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 output_surface_(FakeOutputSurface::Create3d()), | 44 output_surface_(FakeOutputSurface::Create3d()), |
| 45 host_impl_(LayerTreeSettings(), | 45 host_impl_(LayerTreeSettings(), |
| 46 &proxy_, | 46 &proxy_, |
| 47 &shared_bitmap_manager_, | 47 &shared_bitmap_manager_, |
| 48 &task_graph_runner_), | 48 &task_graph_runner_), |
| 49 timer_(kWarmupRuns, | 49 timer_(kWarmupRuns, |
| 50 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), | 50 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), |
| 51 kTimeCheckInterval) {} | 51 kTimeCheckInterval) {} |
| 52 | 52 |
| 53 void SetUp() override { | 53 void SetUp() override { |
| 54 host_impl_.SetVisible(true); |
| 54 host_impl_.InitializeRenderer(output_surface_.get()); | 55 host_impl_.InitializeRenderer(output_surface_.get()); |
| 55 } | 56 } |
| 56 | 57 |
| 57 void SetupPendingTree(const gfx::Size& layer_bounds) { | 58 void SetupPendingTree(const gfx::Size& layer_bounds) { |
| 58 scoped_refptr<FakeDisplayListRasterSource> raster_source = | 59 scoped_refptr<FakeDisplayListRasterSource> raster_source = |
| 59 FakeDisplayListRasterSource::CreateFilled(layer_bounds); | 60 FakeDisplayListRasterSource::CreateFilled(layer_bounds); |
| 60 host_impl_.CreatePendingTree(); | 61 host_impl_.CreatePendingTree(); |
| 61 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); | 62 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); |
| 62 pending_tree->DetachLayerTree(); | 63 pending_tree->DetachLayerTree(); |
| 63 | 64 |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 ASSERT_TRUE(host_impl_.tile_manager() != nullptr); | 247 ASSERT_TRUE(host_impl_.tile_manager() != nullptr); |
| 247 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); | 248 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); |
| 248 | 249 |
| 249 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); | 250 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); |
| 250 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100)); | 251 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100)); |
| 251 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100)); | 252 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100)); |
| 252 } | 253 } |
| 253 | 254 |
| 254 } // namespace | 255 } // namespace |
| 255 } // namespace cc | 256 } // namespace cc |
| OLD | NEW |