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/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "cc/debug/lap_timer.h" | 12 #include "cc/debug/lap_timer.h" |
13 #include "cc/raster/raster_buffer.h" | 13 #include "cc/raster/raster_buffer.h" |
14 #include "cc/test/begin_frame_args_test.h" | 14 #include "cc/test/begin_frame_args_test.h" |
| 15 #include "cc/test/fake_compositor_frame_sink.h" |
| 16 #include "cc/test/fake_compositor_frame_sink_client.h" |
15 #include "cc/test/fake_impl_task_runner_provider.h" | 17 #include "cc/test/fake_impl_task_runner_provider.h" |
16 #include "cc/test/fake_layer_tree_host_impl.h" | 18 #include "cc/test/fake_layer_tree_host_impl.h" |
17 #include "cc/test/fake_output_surface.h" | |
18 #include "cc/test/fake_output_surface_client.h" | |
19 #include "cc/test/fake_picture_layer_impl.h" | 19 #include "cc/test/fake_picture_layer_impl.h" |
20 #include "cc/test/fake_raster_source.h" | 20 #include "cc/test/fake_raster_source.h" |
21 #include "cc/test/fake_tile_manager.h" | 21 #include "cc/test/fake_tile_manager.h" |
22 #include "cc/test/fake_tile_manager_client.h" | 22 #include "cc/test/fake_tile_manager_client.h" |
23 #include "cc/test/fake_tile_task_manager.h" | 23 #include "cc/test/fake_tile_task_manager.h" |
24 #include "cc/test/test_layer_tree_host_base.h" | 24 #include "cc/test/test_layer_tree_host_base.h" |
25 #include "cc/test/test_shared_bitmap_manager.h" | 25 #include "cc/test/test_shared_bitmap_manager.h" |
26 #include "cc/test/test_task_graph_runner.h" | 26 #include "cc/test/test_task_graph_runner.h" |
27 #include "cc/test/test_tile_priorities.h" | 27 #include "cc/test/test_tile_priorities.h" |
28 #include "cc/tiles/tile.h" | 28 #include "cc/tiles/tile.h" |
(...skipping 15 matching lines...) Expand all Loading... |
44 | 44 |
45 class TileManagerPerfTest : public TestLayerTreeHostBase { | 45 class TileManagerPerfTest : public TestLayerTreeHostBase { |
46 public: | 46 public: |
47 TileManagerPerfTest() | 47 TileManagerPerfTest() |
48 : timer_(kWarmupRuns, | 48 : timer_(kWarmupRuns, |
49 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), | 49 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), |
50 kTimeCheckInterval) {} | 50 kTimeCheckInterval) {} |
51 | 51 |
52 void InitializeRenderer() override { | 52 void InitializeRenderer() override { |
53 host_impl()->SetVisible(true); | 53 host_impl()->SetVisible(true); |
54 host_impl()->InitializeRenderer(output_surface()); | 54 host_impl()->InitializeRenderer(compositor_frame_sink()); |
55 tile_manager()->SetTileTaskManagerForTesting( | 55 tile_manager()->SetTileTaskManagerForTesting( |
56 g_fake_tile_task_manager.Pointer()); | 56 g_fake_tile_task_manager.Pointer()); |
57 } | 57 } |
58 | 58 |
59 void SetupDefaultTreesWithFixedTileSize(const gfx::Size& layer_bounds, | 59 void SetupDefaultTreesWithFixedTileSize(const gfx::Size& layer_bounds, |
60 const gfx::Size& tile_size) { | 60 const gfx::Size& tile_size) { |
61 scoped_refptr<FakeRasterSource> pending_raster_source = | 61 scoped_refptr<FakeRasterSource> pending_raster_source = |
62 FakeRasterSource::CreateFilled(layer_bounds); | 62 FakeRasterSource::CreateFilled(layer_bounds); |
63 scoped_refptr<FakeRasterSource> active_raster_source = | 63 scoped_refptr<FakeRasterSource> active_raster_source = |
64 FakeRasterSource::CreateFilled(layer_bounds); | 64 FakeRasterSource::CreateFilled(layer_bounds); |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); | 349 RunEvictionQueueConstructAndIterateTest("10_64", 10, 64); |
350 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); | 350 RunEvictionQueueConstructAndIterateTest("10_128", 10, 128); |
351 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); | 351 RunEvictionQueueConstructAndIterateTest("50_16", 50, 16); |
352 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); | 352 RunEvictionQueueConstructAndIterateTest("50_32", 50, 32); |
353 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); | 353 RunEvictionQueueConstructAndIterateTest("50_64", 50, 64); |
354 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); | 354 RunEvictionQueueConstructAndIterateTest("50_128", 50, 128); |
355 } | 355 } |
356 | 356 |
357 } // namespace | 357 } // namespace |
358 } // namespace cc | 358 } // namespace cc |
OLD | NEW |