| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This tool is used to benchmark the render model used by the compositor | 5 // This tool is used to benchmark the render model used by the compositor |
| 6 | 6 |
| 7 // Most of this file is derived from the source of the tile_render_bench tool, | 7 // Most of this file is derived from the source of the tile_render_bench tool, |
| 8 // and has been changed to support running a sequence of independent | 8 // and has been changed to support running a sequence of independent |
| 9 // simulations for our different render models and test cases. | 9 // simulations for our different render models and test cases. |
| 10 | 10 |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 while (sims_remaining_.size() && !InitializeNextTest()) { | 318 while (sims_remaining_.size() && !InitializeNextTest()) { |
| 319 sims_remaining_.pop(); | 319 sims_remaining_.pop(); |
| 320 } | 320 } |
| 321 if (sims_remaining_.size()) { | 321 if (sims_remaining_.size()) { |
| 322 sims_remaining_.front().simulation_start_time = TimeTicks::Now(); | 322 sims_remaining_.front().simulation_start_time = TimeTicks::Now(); |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 | 325 |
| 326 if (!sims_remaining_.size()) { | 326 if (!sims_remaining_.size()) { |
| 327 DumpOutput(); | 327 DumpOutput(); |
| 328 base::MessageLoop::current()->Quit(); | 328 base::MessageLoop::current()->QuitWhenIdle(); |
| 329 return false; | 329 return false; |
| 330 } | 330 } |
| 331 | 331 |
| 332 return true; | 332 return true; |
| 333 } | 333 } |
| 334 | 334 |
| 335 void Resize(int width, int height) { | 335 void Resize(int width, int height) { |
| 336 window_width_ = width; | 336 window_width_ = width; |
| 337 window_height_ = height; | 337 window_height_ = height; |
| 338 if (current_sim_) | 338 if (current_sim_) |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 } | 395 } |
| 396 } else { | 396 } else { |
| 397 LOG(INFO) << "(input path is a file)"; | 397 LOG(INFO) << "(input path is a file)"; |
| 398 sim.QueueTest(inPath); | 398 sim.QueueTest(inPath); |
| 399 } | 399 } |
| 400 | 400 |
| 401 sim.Run(); | 401 sim.Run(); |
| 402 | 402 |
| 403 return 0; | 403 return 0; |
| 404 } | 404 } |
| OLD | NEW |