OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "CrashHandler.h" | 8 #include "CrashHandler.h" |
9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
469 CodecSrc::kIndex8_Always_DstColorType, | 469 CodecSrc::kIndex8_Always_DstColorType, |
470 CodecSrc::kGrayscale_Always_DstColorType, | 470 CodecSrc::kGrayscale_Always_DstColorType, |
471 }; | 471 }; |
472 | 472 |
473 const BRDSrc::Mode modes[] = { | 473 const BRDSrc::Mode modes[] = { |
474 BRDSrc::kFullImage_Mode, | 474 BRDSrc::kFullImage_Mode, |
475 BRDSrc::kDivisor_Mode, | 475 BRDSrc::kDivisor_Mode, |
476 }; | 476 }; |
477 | 477 |
478 for (SkBitmapRegionDecoder::Strategy strategy : strategies) { | 478 for (SkBitmapRegionDecoder::Strategy strategy : strategies) { |
479 | |
msarett
2015/11/10 16:39:09
Missed this in DM CL.
| |
480 // We disable png testing for kOriginal_Strategy because the implementat ion leaks | |
481 // memory in our forked libpng. | |
482 // TODO (msarett): Decide if we want to test pngs in this mode and how w e might do this. | |
483 if (SkBitmapRegionDecoder::kOriginal_Strategy == strategy && | |
484 (path.endsWith(".png") || path.endsWith(".PNG"))) { | |
485 continue; | |
486 } | |
487 for (uint32_t sampleSize : sampleSizes) { | 479 for (uint32_t sampleSize : sampleSizes) { |
488 | |
489 // kOriginal_Strategy does not work for jpegs that are scaled to non -powers of two. | |
490 // We don't need to test this. We know it doesn't work, and it caus es images with | |
491 // uninitialized memory to show up on Gold. | |
492 if (SkBitmapRegionDecoder::kOriginal_Strategy == strategy && | |
493 (path.endsWith(".jpg") || path.endsWith(".JPG") || | |
494 path.endsWith(".jpeg") || path.endsWith(".JPEG")) && !SkIsPo w2(sampleSize)) { | |
495 continue; | |
496 } | |
497 for (CodecSrc::DstColorType dstColorType : dstColorTypes) { | 480 for (CodecSrc::DstColorType dstColorType : dstColorTypes) { |
498 if (brd_color_type_supported(strategy, dstColorType)) { | 481 if (brd_color_type_supported(strategy, dstColorType)) { |
499 for (BRDSrc::Mode mode : modes) { | 482 for (BRDSrc::Mode mode : modes) { |
500 push_brd_src(path, strategy, dstColorType, mode, sampleS ize); | 483 push_brd_src(path, strategy, dstColorType, mode, sampleS ize); |
501 } | 484 } |
502 } | 485 } |
503 } | 486 } |
504 } | 487 } |
505 } | 488 } |
506 } | 489 } |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1149 #endif // SK_PDF_IMAGE_STATS | 1132 #endif // SK_PDF_IMAGE_STATS |
1150 return 0; | 1133 return 0; |
1151 } | 1134 } |
1152 | 1135 |
1153 #if !defined(SK_BUILD_FOR_IOS) | 1136 #if !defined(SK_BUILD_FOR_IOS) |
1154 int main(int argc, char** argv) { | 1137 int main(int argc, char** argv) { |
1155 SkCommandLineFlags::Parse(argc, argv); | 1138 SkCommandLineFlags::Parse(argc, argv); |
1156 return dm_main(); | 1139 return dm_main(); |
1157 } | 1140 } |
1158 #endif | 1141 #endif |
OLD | NEW |