| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "BenchTimer.h" | 8 #include "BenchTimer.h" |
| 9 #include "CopyTilesRenderer.h" | 9 #include "CopyTilesRenderer.h" |
| 10 #include "LazyDecodeBitmap.h" | 10 #include "LazyDecodeBitmap.h" |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 } | 342 } |
| 343 benchmark->setTimeIndividualTiles(true); | 343 benchmark->setTimeIndividualTiles(true); |
| 344 } | 344 } |
| 345 | 345 |
| 346 if (FLAGS_readPath.count() < 1) { | 346 if (FLAGS_readPath.count() < 1) { |
| 347 gLogger.logError(".skp files or directories are required.\n"); | 347 gLogger.logError(".skp files or directories are required.\n"); |
| 348 exit(-1); | 348 exit(-1); |
| 349 } | 349 } |
| 350 | 350 |
| 351 renderer->setDrawFilters(drawFilters, filtersName(drawFilters)); | 351 renderer->setDrawFilters(drawFilters, filtersName(drawFilters)); |
| 352 benchmark->setPrintMin(FLAGS_min); | 352 if (FLAGS_logPerIter) { |
| 353 benchmark->setLogPerIter(FLAGS_logPerIter); | 353 benchmark->setTimerResultType(TimerData::kPerIter_Result); |
| 354 } else if (FLAGS_min) { |
| 355 benchmark->setTimerResultType(TimerData::kMin_Result); |
| 356 } else { |
| 357 benchmark->setTimerResultType(TimerData::kAvg_Result); |
| 358 } |
| 354 benchmark->setRenderer(renderer); | 359 benchmark->setRenderer(renderer); |
| 355 benchmark->setRepeats(FLAGS_repeat); | 360 benchmark->setRepeats(FLAGS_repeat); |
| 356 benchmark->setLogger(&gLogger); | 361 benchmark->setLogger(&gLogger); |
| 357 } | 362 } |
| 358 | 363 |
| 359 static int process_input(const char* input, | 364 static int process_input(const char* input, |
| 360 sk_tools::PictureBenchmark& benchmark) { | 365 sk_tools::PictureBenchmark& benchmark) { |
| 361 SkString inputAsSkString(input); | 366 SkString inputAsSkString(input); |
| 362 SkOSFile::Iter iter(input, "skp"); | 367 SkOSFile::Iter iter(input, "skp"); |
| 363 SkString inputFilename; | 368 SkString inputFilename; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 } | 443 } |
| 439 #endif | 444 #endif |
| 440 return 0; | 445 return 0; |
| 441 } | 446 } |
| 442 | 447 |
| 443 #if !defined SK_BUILD_FOR_IOS | 448 #if !defined SK_BUILD_FOR_IOS |
| 444 int main(int argc, char * const argv[]) { | 449 int main(int argc, char * const argv[]) { |
| 445 return tool_main(argc, (char**) argv); | 450 return tool_main(argc, (char**) argv); |
| 446 } | 451 } |
| 447 #endif | 452 #endif |
| OLD | NEW |