Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: cc/resources/tile_manager_perftest.cc

Issue 343653004: cc: Don't add new tilings while syncing a tiling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: managetilingsinsync: perftest Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/debug/lap_timer.h" 6 #include "cc/debug/lap_timer.h"
7 #include "cc/resources/tile.h" 7 #include "cc/resources/tile.h"
8 #include "cc/resources/tile_priority.h" 8 #include "cc/resources/tile_priority.h"
9 #include "cc/test/fake_impl_proxy.h" 9 #include "cc/test/fake_impl_proxy.h"
10 #include "cc/test/fake_layer_tree_host_impl.h" 10 #include "cc/test/fake_layer_tree_host_impl.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 void RunManageTilesTest(const std::string& test_name, 271 void RunManageTilesTest(const std::string& test_name,
272 int layer_count, 272 int layer_count,
273 int approximate_tile_count_per_layer) { 273 int approximate_tile_count_per_layer) {
274 std::vector<LayerImpl*> layers = 274 std::vector<LayerImpl*> layers =
275 CreateLayers(layer_count, approximate_tile_count_per_layer); 275 CreateLayers(layer_count, approximate_tile_count_per_layer);
276 timer_.Reset(); 276 timer_.Reset();
277 do { 277 do {
278 host_impl_.UpdateCurrentFrameTime(); 278 host_impl_.UpdateCurrentFrameTime();
279 for (unsigned i = 0; i < layers.size(); ++i) 279 for (unsigned i = 0; i < layers.size(); ++i)
280 layers[i]->UpdateTilePriorities(); 280 layers[i]->UpdateTiles();
281 281
282 GlobalStateThatImpactsTilePriority global_state(GlobalStateForTest()); 282 GlobalStateThatImpactsTilePriority global_state(GlobalStateForTest());
283 tile_manager()->ManageTiles(global_state); 283 tile_manager()->ManageTiles(global_state);
284 tile_manager()->UpdateVisibleTiles(); 284 tile_manager()->UpdateVisibleTiles();
285 timer_.NextLap(); 285 timer_.NextLap();
286 host_impl_.ResetCurrentFrameTimeForNextFrame(); 286 host_impl_.ResetCurrentFrameTimeForNextFrame();
287 } while (!timer_.HasTimeLimitExpired()); 287 } while (!timer_.HasTimeLimitExpired());
288 288
289 perf_test::PrintResult( 289 perf_test::PrintResult(
290 "manage_tiles", "", test_name, timer_.LapsPerSecond(), "runs/s", true); 290 "manage_tiles", "", test_name, timer_.LapsPerSecond(), "runs/s", true);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 330
331 RunRasterIteratorTest("2_16", 16); 331 RunRasterIteratorTest("2_16", 16);
332 RunRasterIteratorTest("2_32", 32); 332 RunRasterIteratorTest("2_32", 32);
333 RunRasterIteratorTest("2_64", 64); 333 RunRasterIteratorTest("2_64", 64);
334 RunRasterIteratorTest("2_128", 128); 334 RunRasterIteratorTest("2_128", 128);
335 } 335 }
336 336
337 } // namespace 337 } // namespace
338 338
339 } // namespace cc 339 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698