| 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" |
| 11 #include "SkCommandLineFlags.h" | 11 #include "SkCommandLineFlags.h" |
| 12 #include "SkData.h" | 12 #include "SkData.h" |
| 13 #include "SkForceLinking.h" | |
| 14 #include "SkGraphics.h" | 13 #include "SkGraphics.h" |
| 15 #include "SkImageDecoder.h" | 14 #include "SkImageDecoder.h" |
| 16 #include "SkImageEncoder.h" | 15 #include "SkImageEncoder.h" |
| 17 #include "SkOSFile.h" | 16 #include "SkOSFile.h" |
| 18 #include "SkRandom.h" | 17 #include "SkRandom.h" |
| 19 #include "SkStream.h" | 18 #include "SkStream.h" |
| 20 #include "SkTArray.h" | 19 #include "SkTArray.h" |
| 21 #include "SkTemplates.h" | 20 #include "SkTemplates.h" |
| 22 | 21 |
| 23 __SK_FORCE_IMAGE_DECODER_LINKING; | |
| 24 | |
| 25 DEFINE_string(config, "None", "Preferred config to decode into. [None|8888|565|A
8]"); | 22 DEFINE_string(config, "None", "Preferred config to decode into. [None|8888|565|A
8]"); |
| 26 DEFINE_string(createExpectationsPath, "", "Path to write JSON expectations."); | 23 DEFINE_string(createExpectationsPath, "", "Path to write JSON expectations."); |
| 27 DEFINE_string(mismatchPath, "", "Folder to write mismatched images to."); | 24 DEFINE_string(mismatchPath, "", "Folder to write mismatched images to."); |
| 28 DEFINE_string2(readPath, r, "", "Folder(s) and files to decode images. Required.
"); | 25 DEFINE_string2(readPath, r, "", "Folder(s) and files to decode images. Required.
"); |
| 29 DEFINE_string(readExpectationsPath, "", "Path to read JSON expectations from."); | 26 DEFINE_string(readExpectationsPath, "", "Path to read JSON expectations from."); |
| 30 DEFINE_bool(reencode, true, "Reencode the images to test encoding."); | 27 DEFINE_bool(reencode, true, "Reencode the images to test encoding."); |
| 31 DEFINE_int32(sampleSize, 1, "Set the sampleSize for decoding."); | 28 DEFINE_int32(sampleSize, 1, "Set the sampleSize for decoding."); |
| 32 DEFINE_bool(skip, false, "Skip writing zeroes."); | 29 DEFINE_bool(skip, false, "Skip writing zeroes."); |
| 33 DEFINE_bool(testSubsetDecoding, true, "Test decoding subsets of images."); | 30 DEFINE_bool(testSubsetDecoding, true, "Test decoding subsets of images."); |
| 34 DEFINE_bool(writeChecksumBasedFilenames, false, "When writing out actual images
, use checksum-" | 31 DEFINE_bool(writeChecksumBasedFilenames, false, "When writing out actual images
, use checksum-" |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 836 print_strings("Known failures", gKnownFailures); | 833 print_strings("Known failures", gKnownFailures); |
| 837 | 834 |
| 838 return failed ? -1 : 0; | 835 return failed ? -1 : 0; |
| 839 } | 836 } |
| 840 | 837 |
| 841 #if !defined SK_BUILD_FOR_IOS | 838 #if !defined SK_BUILD_FOR_IOS |
| 842 int main(int argc, char * const argv[]) { | 839 int main(int argc, char * const argv[]) { |
| 843 return tool_main(argc, (char**) argv); | 840 return tool_main(argc, (char**) argv); |
| 844 } | 841 } |
| 845 #endif | 842 #endif |
| OLD | NEW |