| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 DEFINE_bool(timeIndividualTiles, false, "Report times for drawing individual til
es, rather than " | 42 DEFINE_bool(timeIndividualTiles, false, "Report times for drawing individual til
es, rather than " |
| 43 "times for drawing the whole page. Requires tiled rendering."); | 43 "times for drawing the whole page. Requires tiled rendering."); |
| 44 DEFINE_bool(purgeDecodedTex, false, "Purge decoded and GPU-uploaded textures " | 44 DEFINE_bool(purgeDecodedTex, false, "Purge decoded and GPU-uploaded textures " |
| 45 "after each iteration."); | 45 "after each iteration."); |
| 46 DEFINE_string(timers, "c", "[wcgWC]*: Display wall, cpu, gpu, truncated wall or
truncated cpu time" | 46 DEFINE_string(timers, "c", "[wcgWC]*: Display wall, cpu, gpu, truncated wall or
truncated cpu time" |
| 47 " for each picture."); | 47 " for each picture."); |
| 48 DEFINE_bool(trackDeferredCaching, false, "Only meaningful with --deferImageDecod
ing and " | 48 DEFINE_bool(trackDeferredCaching, false, "Only meaningful with --deferImageDecod
ing and " |
| 49 "SK_LAZY_CACHE_STATS set to true. Report percentage of cache hits wh
en using " | 49 "SK_LAZY_CACHE_STATS set to true. Report percentage of cache hits wh
en using " |
| 50 "deferred image decoding."); | 50 "deferred image decoding."); |
| 51 | 51 |
| 52 DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing b
efore timing."); |
| 53 |
| 52 static char const * const gFilterTypes[] = { | 54 static char const * const gFilterTypes[] = { |
| 53 "paint", | 55 "paint", |
| 54 "point", | 56 "point", |
| 55 "line", | 57 "line", |
| 56 "bitmap", | 58 "bitmap", |
| 57 "rect", | 59 "rect", |
| 58 "oval", | 60 "oval", |
| 59 "path", | 61 "path", |
| 60 "text", | 62 "text", |
| 61 "all", | 63 "all", |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 gLogger.logError("--timeIndividualTiles requires tiled rendering.\n"
); | 335 gLogger.logError("--timeIndividualTiles requires tiled rendering.\n"
); |
| 334 exit(-1); | 336 exit(-1); |
| 335 } | 337 } |
| 336 if (!tiledRenderer->supportsTimingIndividualTiles()) { | 338 if (!tiledRenderer->supportsTimingIndividualTiles()) { |
| 337 gLogger.logError("This renderer does not support --timeIndividualTil
es.\n"); | 339 gLogger.logError("This renderer does not support --timeIndividualTil
es.\n"); |
| 338 exit(-1); | 340 exit(-1); |
| 339 } | 341 } |
| 340 benchmark->setTimeIndividualTiles(true); | 342 benchmark->setTimeIndividualTiles(true); |
| 341 } | 343 } |
| 342 | 344 |
| 343 benchmark->setPurgeDecodedTex(FLAGS_purgeDecodedTex); | 345 benchmark->setPurgeDecodedTex1(FLAGS_purgeDecodedTex); |
| 346 benchmark->setPreprocess(FLAGS_preprocess); |
| 344 | 347 |
| 345 if (FLAGS_readPath.count() < 1) { | 348 if (FLAGS_readPath.count() < 1) { |
| 346 gLogger.logError(".skp files or directories are required.\n"); | 349 gLogger.logError(".skp files or directories are required.\n"); |
| 347 exit(-1); | 350 exit(-1); |
| 348 } | 351 } |
| 349 | 352 |
| 350 renderer->setDrawFilters(drawFilters, filtersName(drawFilters)); | 353 renderer->setDrawFilters(drawFilters, filtersName(drawFilters)); |
| 351 if (FLAGS_logPerIter) { | 354 if (FLAGS_logPerIter) { |
| 352 benchmark->setTimerResultType(TimerData::kPerIter_Result); | 355 benchmark->setTimerResultType(TimerData::kPerIter_Result); |
| 353 } else if (FLAGS_min) { | 356 } else if (FLAGS_min) { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 } | 445 } |
| 443 #endif | 446 #endif |
| 444 return 0; | 447 return 0; |
| 445 } | 448 } |
| 446 | 449 |
| 447 #if !defined SK_BUILD_FOR_IOS | 450 #if !defined SK_BUILD_FOR_IOS |
| 448 int main(int argc, char * const argv[]) { | 451 int main(int argc, char * const argv[]) { |
| 449 return tool_main(argc, (char**) argv); | 452 return tool_main(argc, (char**) argv); |
| 450 } | 453 } |
| 451 #endif | 454 #endif |
| OLD | NEW |