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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 push_brd_src(path, strategy, dstColorType, mode, sampleS ize); | 480 push_brd_src(path, strategy, dstColorType, mode, sampleS ize); |
481 } | 481 } |
482 } | 482 } |
483 } | 483 } |
484 } | 484 } |
485 } | 485 } |
486 } | 486 } |
487 | 487 |
488 static bool brd_supported(const char* ext) { | 488 static bool brd_supported(const char* ext) { |
489 static const char* const exts[] = { | 489 static const char* const exts[] = { |
490 "jpg", "jpeg", "png", "webp", | 490 "jpg", "jpeg", "png", "webp", "arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", |
491 "JPG", "JPEG", "PNG", "WEBP", | 491 "JPG", "JPEG", "PNG", "WEBP", "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", |
djsollen
2015/12/16 20:35:34
I don't think we have plans to support RAW for Bit
yujieqin
2016/01/06 18:47:18
Done.
| |
492 }; | 492 }; |
493 | 493 |
494 for (uint32_t i = 0; i < SK_ARRAY_COUNT(exts); i++) { | 494 for (uint32_t i = 0; i < SK_ARRAY_COUNT(exts); i++) { |
495 if (0 == strcmp(exts[i], ext)) { | 495 if (0 == strcmp(exts[i], ext)) { |
496 return true; | 496 return true; |
497 } | 497 } |
498 } | 498 } |
499 return false; | 499 return false; |
500 } | 500 } |
501 | 501 |
502 static void gather_srcs() { | 502 static void gather_srcs() { |
503 for (const skiagm::GMRegistry* r = skiagm::GMRegistry::Head(); r; r = r->nex t()) { | 503 for (const skiagm::GMRegistry* r = skiagm::GMRegistry::Head(); r; r = r->nex t()) { |
504 push_src("gm", "", new GMSrc(r->factory())); | 504 push_src("gm", "", new GMSrc(r->factory())); |
505 } | 505 } |
506 for (int i = 0; i < FLAGS_skps.count(); i++) { | 506 for (int i = 0; i < FLAGS_skps.count(); i++) { |
507 const char* path = FLAGS_skps[i]; | 507 const char* path = FLAGS_skps[i]; |
508 if (sk_isdir(path)) { | 508 if (sk_isdir(path)) { |
509 SkOSFile::Iter it(path, "skp"); | 509 SkOSFile::Iter it(path, "skp"); |
510 for (SkString file; it.next(&file); ) { | 510 for (SkString file; it.next(&file); ) { |
511 push_src("skp", "", new SKPSrc(SkOSPath::Join(path, file.c_str() ))); | 511 push_src("skp", "", new SKPSrc(SkOSPath::Join(path, file.c_str() ))); |
512 } | 512 } |
513 } else { | 513 } else { |
514 push_src("skp", "", new SKPSrc(path)); | 514 push_src("skp", "", new SKPSrc(path)); |
515 } | 515 } |
516 } | 516 } |
517 static const char* const exts[] = { | 517 static const char* const exts[] = { |
518 "bmp", "gif", "jpg", "jpeg", "png", "webp", "ktx", "astc", "wbmp", "ico" , | 518 "bmp", "gif", "jpg", "jpeg", "png", "webp", "ktx", "astc", "wbmp", "ico" , "arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", |
scroggo
2015/12/18 15:56:26
nit: over 100 chars.
yujieqin
2016/01/06 18:47:18
Done.
| |
519 "BMP", "GIF", "JPG", "JPEG", "PNG", "WEBP", "KTX", "ASTC", "WBMP", "ICO" , | 519 "BMP", "GIF", "JPG", "JPEG", "PNG", "WEBP", "KTX", "ASTC", "WBMP", "ICO" , "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", |
520 }; | 520 }; |
521 for (int i = 0; i < FLAGS_images.count(); i++) { | 521 for (int i = 0; i < FLAGS_images.count(); i++) { |
522 const char* flag = FLAGS_images[i]; | 522 const char* flag = FLAGS_images[i]; |
523 if (sk_isdir(flag)) { | 523 if (sk_isdir(flag)) { |
524 for (size_t j = 0; j < SK_ARRAY_COUNT(exts); j++) { | 524 for (size_t j = 0; j < SK_ARRAY_COUNT(exts); j++) { |
525 SkOSFile::Iter it(flag, exts[j]); | 525 SkOSFile::Iter it(flag, exts[j]); |
526 for (SkString file; it.next(&file); ) { | 526 for (SkString file; it.next(&file); ) { |
527 SkString path = SkOSPath::Join(flag, file.c_str()); | 527 SkString path = SkOSPath::Join(flag, file.c_str()); |
528 push_src("image", "decode", new ImageSrc(path)); // Decode e ntire image | 528 push_src("image", "decode", new ImageSrc(path)); // Decode e ntire image |
529 push_codec_srcs(path); | 529 push_codec_srcs(path); |
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1218 Reporter* reporter, | 1218 Reporter* reporter, |
1219 GrContextFactory* fac tory); | 1219 GrContextFactory* fac tory); |
1220 } // namespace skiatest | 1220 } // namespace skiatest |
1221 | 1221 |
1222 #if !defined(SK_BUILD_FOR_IOS) | 1222 #if !defined(SK_BUILD_FOR_IOS) |
1223 int main(int argc, char** argv) { | 1223 int main(int argc, char** argv) { |
1224 SkCommandLineFlags::Parse(argc, argv); | 1224 SkCommandLineFlags::Parse(argc, argv); |
1225 return dm_main(); | 1225 return dm_main(); |
1226 } | 1226 } |
1227 #endif | 1227 #endif |
OLD | NEW |