| 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/resources/tiling_set_raster_queue_all.h" | 9 #include "cc/resources/tiling_set_raster_queue_all.h" |
| 10 #include "cc/test/fake_impl_proxy.h" | 10 #include "cc/test/fake_impl_proxy.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 tiling->CreateAllTilesForTesting(); | 34 tiling->CreateAllTilesForTesting(); |
| 35 std::vector<Tile*> tiling_tiles = tiling->AllTilesForTesting(); | 35 std::vector<Tile*> tiling_tiles = tiling->AllTilesForTesting(); |
| 36 std::copy( | 36 std::copy( |
| 37 tiling_tiles.begin(), tiling_tiles.end(), std::back_inserter(*all_tiles)); | 37 tiling_tiles.begin(), tiling_tiles.end(), std::back_inserter(*all_tiles)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 class PictureLayerImplPerfTest : public testing::Test { | 40 class PictureLayerImplPerfTest : public testing::Test { |
| 41 public: | 41 public: |
| 42 PictureLayerImplPerfTest() | 42 PictureLayerImplPerfTest() |
| 43 : proxy_(base::ThreadTaskRunnerHandle::Get()), | 43 : proxy_(base::ThreadTaskRunnerHandle::Get()), |
| 44 host_impl_(ImplSidePaintingSettings(), | 44 host_impl_(ImplSidePaintingSettings(10000), |
| 45 &proxy_, | 45 &proxy_, |
| 46 &shared_bitmap_manager_, | 46 &shared_bitmap_manager_, |
| 47 &task_graph_runner_), | 47 &task_graph_runner_), |
| 48 timer_(kWarmupRuns, | 48 timer_(kWarmupRuns, |
| 49 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), | 49 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), |
| 50 kTimeCheckInterval) {} | 50 kTimeCheckInterval) {} |
| 51 | 51 |
| 52 void SetUp() override { | 52 void SetUp() override { |
| 53 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d()); | 53 host_impl_.InitializeRenderer(FakeOutputSurface::Create3d()); |
| 54 } | 54 } |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 ASSERT_TRUE(host_impl_.tile_manager() != nullptr); | 244 ASSERT_TRUE(host_impl_.tile_manager() != nullptr); |
| 245 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); | 245 host_impl_.tile_manager()->InitializeTilesWithResourcesForTesting(all_tiles); |
| 246 | 246 |
| 247 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); | 247 RunEvictionQueueConstructTest("0_0_100x100", gfx::Rect(0, 0, 100, 100)); |
| 248 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100)); | 248 RunEvictionQueueConstructTest("5000_0_100x100", gfx::Rect(5000, 0, 100, 100)); |
| 249 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100)); | 249 RunEvictionQueueConstructTest("9999_0_100x100", gfx::Rect(9999, 0, 100, 100)); |
| 250 } | 250 } |
| 251 | 251 |
| 252 } // namespace | 252 } // namespace |
| 253 } // namespace cc | 253 } // namespace cc |
| OLD | NEW |