| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "gm_expectations.h" | 8 #include "gm_expectations.h" |
| 9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
| 10 #include "SkColorPriv.h" | 10 #include "SkColorPriv.h" |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 SkCommandLineFlags::Parse(argc, argv); | 477 SkCommandLineFlags::Parse(argc, argv); |
| 478 | 478 |
| 479 if (FLAGS_readPath.count() < 1) { | 479 if (FLAGS_readPath.count() < 1) { |
| 480 SkDebugf("Folder(s) or image(s) to decode are required.\n"); | 480 SkDebugf("Folder(s) or image(s) to decode are required.\n"); |
| 481 return -1; | 481 return -1; |
| 482 } | 482 } |
| 483 | 483 |
| 484 | 484 |
| 485 SkAutoGraphics ag; | 485 SkAutoGraphics ag; |
| 486 | 486 |
| 487 if (!FLAGS_readExpectationsPath.isEmpty()) { | 487 if (!FLAGS_readExpectationsPath.isEmpty() && sk_exists(FLAGS_readExpectation
sPath[0])) { |
| 488 gJsonExpectations.reset(SkNEW_ARGS(skiagm::JsonExpectationsSource, | 488 gJsonExpectations.reset(SkNEW_ARGS(skiagm::JsonExpectationsSource, |
| 489 (FLAGS_readExpectationsPath[0]))); | 489 (FLAGS_readExpectationsPath[0]))); |
| 490 } | 490 } |
| 491 | 491 |
| 492 SkString outDir; | 492 SkString outDir; |
| 493 SkString* outDirPtr; | 493 SkString* outDirPtr; |
| 494 | 494 |
| 495 if (FLAGS_writePath.count() == 1) { | 495 if (FLAGS_writePath.count() == 1) { |
| 496 outDir.set(FLAGS_writePath[0]); | 496 outDir.set(FLAGS_writePath[0]); |
| 497 append_path_separator_if_necessary(&outDir); | 497 append_path_separator_if_necessary(&outDir); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 } | 544 } |
| 545 | 545 |
| 546 return failed ? -1 : 0; | 546 return failed ? -1 : 0; |
| 547 } | 547 } |
| 548 | 548 |
| 549 #if !defined SK_BUILD_FOR_IOS | 549 #if !defined SK_BUILD_FOR_IOS |
| 550 int main(int argc, char * const argv[]) { | 550 int main(int argc, char * const argv[]) { |
| 551 return tool_main(argc, (char**) argv); | 551 return tool_main(argc, (char**) argv); |
| 552 } | 552 } |
| 553 #endif | 553 #endif |
| OLD | NEW |