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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 i += 100 / priority_change_percent) { | 147 i += 100 / priority_change_percent) { |
148 Tile* tile = tiles[i].first.get(); | 148 Tile* tile = tiles[i].first.get(); |
149 ManagedTileBin bin = GetNextBin(tiles[i].second); | 149 ManagedTileBin bin = GetNextBin(tiles[i].second); |
150 tile->SetPriority(ACTIVE_TREE, GetTilePriorityFromBin(bin)); | 150 tile->SetPriority(ACTIVE_TREE, GetTilePriorityFromBin(bin)); |
151 tile->SetPriority(PENDING_TREE, GetTilePriorityFromBin(bin)); | 151 tile->SetPriority(PENDING_TREE, GetTilePriorityFromBin(bin)); |
152 tiles[i].second = bin; | 152 tiles[i].second = bin; |
153 } | 153 } |
154 } | 154 } |
155 | 155 |
156 tile_manager_->ManageTiles(GlobalStateForTest()); | 156 tile_manager_->ManageTiles(GlobalStateForTest()); |
157 tile_manager_->CheckForCompletedTasks(); | 157 tile_manager_->UpdateVisibleTiles(); |
158 timer_.NextLap(); | 158 timer_.NextLap(); |
159 } while (!timer_.HasTimeLimitExpired()); | 159 } while (!timer_.HasTimeLimitExpired()); |
160 | 160 |
161 perf_test::PrintResult( | 161 perf_test::PrintResult( |
162 "manage_tiles", "", test_name, timer_.LapsPerSecond(), "runs/s", true); | 162 "manage_tiles", "", test_name, timer_.LapsPerSecond(), "runs/s", true); |
163 } | 163 } |
164 | 164 |
165 private: | 165 private: |
166 FakeTileManagerClient tile_manager_client_; | 166 FakeTileManagerClient tile_manager_client_; |
167 LayerTreeSettings settings_; | 167 LayerTreeSettings settings_; |
(...skipping 13 matching lines...) Expand all Loading... |
181 RunManageTilesTest("1000_10", 1000, 10); | 181 RunManageTilesTest("1000_10", 1000, 10); |
182 RunManageTilesTest("10000_10", 10000, 10); | 182 RunManageTilesTest("10000_10", 10000, 10); |
183 RunManageTilesTest("100_100", 100, 100); | 183 RunManageTilesTest("100_100", 100, 100); |
184 RunManageTilesTest("1000_100", 1000, 100); | 184 RunManageTilesTest("1000_100", 1000, 100); |
185 RunManageTilesTest("10000_100", 10000, 100); | 185 RunManageTilesTest("10000_100", 10000, 100); |
186 } | 186 } |
187 | 187 |
188 } // namespace | 188 } // namespace |
189 | 189 |
190 } // namespace cc | 190 } // namespace cc |
OLD | NEW |