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" |
13 #include "SkGraphics.h" | 14 #include "SkGraphics.h" |
14 #include "SkImageDecoder.h" | 15 #include "SkImageDecoder.h" |
15 #include "SkImageEncoder.h" | 16 #include "SkImageEncoder.h" |
16 #include "SkOSFile.h" | 17 #include "SkOSFile.h" |
17 #include "SkRandom.h" | 18 #include "SkRandom.h" |
18 #include "SkStream.h" | 19 #include "SkStream.h" |
19 #include "SkTArray.h" | 20 #include "SkTArray.h" |
20 #include "SkTemplates.h" | 21 #include "SkTemplates.h" |
21 | 22 |
| 23 __SK_FORCE_IMAGE_DECODER_LINKING; |
| 24 |
22 DEFINE_string(createExpectationsPath, "", "Path to write JSON expectations."); | 25 DEFINE_string(createExpectationsPath, "", "Path to write JSON expectations."); |
23 DEFINE_string2(readPath, r, "", "Folder(s) and files to decode images. Required.
"); | 26 DEFINE_string2(readPath, r, "", "Folder(s) and files to decode images. Required.
"); |
24 DEFINE_string(readExpectationsPath, "", "Path to read JSON expectations from."); | 27 DEFINE_string(readExpectationsPath, "", "Path to read JSON expectations from."); |
25 DEFINE_string2(writePath, w, "", "Write rendered images into this directory."); | 28 DEFINE_string2(writePath, w, "", "Write rendered images into this directory."); |
26 DEFINE_bool(reencode, true, "Reencode the images to test encoding."); | 29 DEFINE_bool(reencode, true, "Reencode the images to test encoding."); |
27 DEFINE_bool(testSubsetDecoding, true, "Test decoding subsets of images."); | 30 DEFINE_bool(testSubsetDecoding, true, "Test decoding subsets of images."); |
28 | 31 |
29 struct Format { | 32 struct Format { |
30 SkImageEncoder::Type fType; | 33 SkImageEncoder::Type fType; |
31 SkImageDecoder::Format fFormat; | 34 SkImageDecoder::Format fFormat; |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 } | 550 } |
548 | 551 |
549 return failed ? -1 : 0; | 552 return failed ? -1 : 0; |
550 } | 553 } |
551 | 554 |
552 #if !defined SK_BUILD_FOR_IOS | 555 #if !defined SK_BUILD_FOR_IOS |
553 int main(int argc, char * const argv[]) { | 556 int main(int argc, char * const argv[]) { |
554 return tool_main(argc, (char**) argv); | 557 return tool_main(argc, (char**) argv); |
555 } | 558 } |
556 #endif | 559 #endif |
OLD | NEW |