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_output_surface.h" | 8 #include "cc/test/fake_output_surface.h" |
9 #include "cc/test/fake_output_surface_client.h" | 9 #include "cc/test/fake_output_surface_client.h" |
10 #include "cc/test/fake_picture_pile_impl.h" | 10 #include "cc/test/fake_picture_pile_impl.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 TileManagerPerfTest() | 32 TileManagerPerfTest() |
33 : timer_(kWarmupRuns, | 33 : timer_(kWarmupRuns, |
34 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), | 34 base::TimeDelta::FromMilliseconds(kTimeLimitMillis), |
35 kTimeCheckInterval) {} | 35 kTimeCheckInterval) {} |
36 | 36 |
37 // Overridden from testing::Test: | 37 // Overridden from testing::Test: |
38 virtual void SetUp() OVERRIDE { | 38 virtual void SetUp() OVERRIDE { |
39 output_surface_ = FakeOutputSurface::Create3d(); | 39 output_surface_ = FakeOutputSurface::Create3d(); |
40 CHECK(output_surface_->BindToClient(&output_surface_client_)); | 40 CHECK(output_surface_->BindToClient(&output_surface_client_)); |
41 | 41 |
42 resource_provider_ = ResourceProvider::Create(output_surface_.get(), 0); | 42 resource_provider_ = |
| 43 ResourceProvider::Create(output_surface_.get(), 0, false); |
43 tile_manager_ = make_scoped_ptr( | 44 tile_manager_ = make_scoped_ptr( |
44 new FakeTileManager(&tile_manager_client_, resource_provider_.get())); | 45 new FakeTileManager(&tile_manager_client_, resource_provider_.get())); |
45 | 46 |
46 GlobalStateThatImpactsTilePriority state; | 47 GlobalStateThatImpactsTilePriority state; |
47 gfx::Size tile_size = settings_.default_tile_size; | 48 gfx::Size tile_size = settings_.default_tile_size; |
48 state.memory_limit_in_bytes = | 49 state.memory_limit_in_bytes = |
49 10000u * 4u * | 50 10000u * 4u * |
50 static_cast<size_t>(tile_size.width() * tile_size.height()); | 51 static_cast<size_t>(tile_size.width() * tile_size.height()); |
51 state.num_resources_limit = 10000; | 52 state.num_resources_limit = 10000; |
52 state.memory_limit_policy = ALLOW_ANYTHING; | 53 state.memory_limit_policy = ALLOW_ANYTHING; |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 RunManageTilesTest("1000_10", 1000, 10); | 179 RunManageTilesTest("1000_10", 1000, 10); |
179 RunManageTilesTest("10000_10", 10000, 10); | 180 RunManageTilesTest("10000_10", 10000, 10); |
180 RunManageTilesTest("100_100", 100, 100); | 181 RunManageTilesTest("100_100", 100, 100); |
181 RunManageTilesTest("1000_100", 1000, 100); | 182 RunManageTilesTest("1000_100", 1000, 100); |
182 RunManageTilesTest("10000_100", 10000, 100); | 183 RunManageTilesTest("10000_100", 10000, 100); |
183 } | 184 } |
184 | 185 |
185 } // namespace | 186 } // namespace |
186 | 187 |
187 } // namespace cc | 188 } // namespace cc |
OLD | NEW |