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 "base/time/time.h" | 5 #include "base/time/time.h" |
6 #include "cc/resources/tile.h" | 6 #include "cc/resources/tile.h" |
7 #include "cc/resources/tile_priority.h" | 7 #include "cc/resources/tile_priority.h" |
8 #include "cc/test/fake_impl_proxy.h" | 8 #include "cc/test/fake_impl_proxy.h" |
9 #include "cc/test/fake_layer_tree_host_impl.h" | 9 #include "cc/test/fake_layer_tree_host_impl.h" |
10 #include "cc/test/fake_output_surface.h" | 10 #include "cc/test/fake_output_surface.h" |
11 #include "cc/test/fake_output_surface_client.h" | 11 #include "cc/test/fake_output_surface_client.h" |
12 #include "cc/test/fake_picture_layer_impl.h" | 12 #include "cc/test/fake_picture_layer_impl.h" |
13 #include "cc/test/fake_picture_pile_impl.h" | 13 #include "cc/test/fake_picture_pile_impl.h" |
14 #include "cc/test/fake_tile_manager.h" | 14 #include "cc/test/fake_tile_manager.h" |
15 #include "cc/test/fake_tile_manager_client.h" | 15 #include "cc/test/fake_tile_manager_client.h" |
16 #include "cc/test/impl_side_painting_settings.h" | |
17 #include "cc/test/lap_timer.h" | 16 #include "cc/test/lap_timer.h" |
18 #include "cc/test/test_shared_bitmap_manager.h" | 17 #include "cc/test/test_shared_bitmap_manager.h" |
19 #include "cc/test/test_tile_priorities.h" | 18 #include "cc/test/test_tile_priorities.h" |
20 #include "cc/trees/layer_tree_impl.h" | 19 #include "cc/trees/layer_tree_impl.h" |
21 | 20 |
22 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
23 #include "testing/perf/perf_test.h" | 22 #include "testing/perf/perf_test.h" |
24 | 23 |
25 namespace cc { | 24 namespace cc { |
26 | 25 |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 196 |
198 class TileManagerTileIteratorPerfTest : public testing::Test, | 197 class TileManagerTileIteratorPerfTest : public testing::Test, |
199 public TileManagerClient { | 198 public TileManagerClient { |
200 public: | 199 public: |
201 TileManagerTileIteratorPerfTest() | 200 TileManagerTileIteratorPerfTest() |
202 : memory_limit_policy_(ALLOW_ANYTHING), | 201 : memory_limit_policy_(ALLOW_ANYTHING), |
203 max_tiles_(10000), | 202 max_tiles_(10000), |
204 ready_to_activate_(false), | 203 ready_to_activate_(false), |
205 id_(7), | 204 id_(7), |
206 proxy_(base::MessageLoopProxy::current()), | 205 proxy_(base::MessageLoopProxy::current()), |
207 host_impl_(ImplSidePaintingSettings(), | 206 host_impl_(LayerTreeSettings(true), |
208 &proxy_, | 207 &proxy_, |
209 &shared_bitmap_manager_), | 208 &shared_bitmap_manager_), |
210 timer_(kWarmupRuns, | 209 timer_(kWarmupRuns, |
211 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), | 210 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), |
212 kTimeCheckInterval) {} | 211 kTimeCheckInterval) {} |
213 | 212 |
214 void SetTreePriority(TreePriority tree_priority) { | 213 void SetTreePriority(TreePriority tree_priority) { |
215 GlobalStateThatImpactsTilePriority state; | 214 GlobalStateThatImpactsTilePriority state; |
216 gfx::Size tile_size(256, 256); | 215 gfx::Size tile_size(256, 256); |
217 | 216 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 | 340 |
342 RunTest("2_16", 16); | 341 RunTest("2_16", 16); |
343 RunTest("2_32", 32); | 342 RunTest("2_32", 32); |
344 RunTest("2_64", 64); | 343 RunTest("2_64", 64); |
345 RunTest("2_128", 128); | 344 RunTest("2_128", 128); |
346 } | 345 } |
347 | 346 |
348 } // namespace | 347 } // namespace |
349 | 348 |
350 } // namespace cc | 349 } // namespace cc |
OLD | NEW |