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 "CrashHandler.h" |
9 #include "CopyTilesRenderer.h" | 10 #include "CopyTilesRenderer.h" |
10 #include "LazyDecodeBitmap.h" | 11 #include "LazyDecodeBitmap.h" |
11 #include "PictureBenchmark.h" | 12 #include "PictureBenchmark.h" |
12 #include "PictureRenderingFlags.h" | 13 #include "PictureRenderingFlags.h" |
13 #include "SkBenchLogger.h" | 14 #include "SkBenchLogger.h" |
14 #include "SkCommandLineFlags.h" | 15 #include "SkCommandLineFlags.h" |
15 #include "SkData.h" | 16 #include "SkData.h" |
16 #include "SkDiscardableMemoryPool.h" | 17 #include "SkDiscardableMemoryPool.h" |
17 #include "SkGraphics.h" | 18 #include "SkGraphics.h" |
18 #include "SkImageDecoder.h" | 19 #include "SkImageDecoder.h" |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 } else { | 387 } else { |
387 SkString warning; | 388 SkString warning; |
388 warning.printf("Warning: skipping %s\n", input); | 389 warning.printf("Warning: skipping %s\n", input); |
389 gLogger.logError(warning); | 390 gLogger.logError(warning); |
390 } | 391 } |
391 return failures; | 392 return failures; |
392 } | 393 } |
393 | 394 |
394 int tool_main(int argc, char** argv); | 395 int tool_main(int argc, char** argv); |
395 int tool_main(int argc, char** argv) { | 396 int tool_main(int argc, char** argv) { |
| 397 SetupCrashHandler(); |
396 SkString usage; | 398 SkString usage; |
397 usage.printf("Time drawing .skp files.\n" | 399 usage.printf("Time drawing .skp files.\n" |
398 "\tPossible arguments for --filter: [%s]\n\t\t[%s]", | 400 "\tPossible arguments for --filter: [%s]\n\t\t[%s]", |
399 filterTypesUsage().c_str(), filterFlagsUsage().c_str()); | 401 filterTypesUsage().c_str(), filterFlagsUsage().c_str()); |
400 SkCommandLineFlags::SetUsage(usage.c_str()); | 402 SkCommandLineFlags::SetUsage(usage.c_str()); |
401 SkCommandLineFlags::Parse(argc, argv); | 403 SkCommandLineFlags::Parse(argc, argv); |
402 | 404 |
403 if (FLAGS_repeat < 1) { | 405 if (FLAGS_repeat < 1) { |
404 SkString error; | 406 SkString error; |
405 error.printf("--repeats must be >= 1. Was %i\n", FLAGS_repeat); | 407 error.printf("--repeats must be >= 1. Was %i\n", FLAGS_repeat); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 #endif | 460 #endif |
459 gWriter.end(); | 461 gWriter.end(); |
460 return 0; | 462 return 0; |
461 } | 463 } |
462 | 464 |
463 #if !defined SK_BUILD_FOR_IOS | 465 #if !defined SK_BUILD_FOR_IOS |
464 int main(int argc, char * const argv[]) { | 466 int main(int argc, char * const argv[]) { |
465 return tool_main(argc, (char**) argv); | 467 return tool_main(argc, (char**) argv); |
466 } | 468 } |
467 #endif | 469 #endif |
OLD | NEW |