Chromium Code Reviews| 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 514 for (SkString file; it.next(&file); ) { | 514 for (SkString file; it.next(&file); ) { |
| 515 push_src("skp", "", new SKPSrc(SkOSPath::Join(path, file.c_str() ))); | 515 push_src("skp", "", new SKPSrc(SkOSPath::Join(path, file.c_str() ))); |
| 516 } | 516 } |
| 517 } else { | 517 } else { |
| 518 push_src("skp", "", new SKPSrc(path)); | 518 push_src("skp", "", new SKPSrc(path)); |
| 519 } | 519 } |
| 520 } | 520 } |
| 521 static const char* const exts[] = { | 521 static const char* const exts[] = { |
| 522 "bmp", "gif", "jpg", "jpeg", "png", "webp", "ktx", "astc", "wbmp", "ico" , | 522 "bmp", "gif", "jpg", "jpeg", "png", "webp", "ktx", "astc", "wbmp", "ico" , |
| 523 "BMP", "GIF", "JPG", "JPEG", "PNG", "WEBP", "KTX", "ASTC", "WBMP", "ICO" , | 523 "BMP", "GIF", "JPG", "JPEG", "PNG", "WEBP", "KTX", "ASTC", "WBMP", "ICO" , |
| 524 "arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw", | |
| 525 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW", | |
| 524 }; | 526 }; |
| 525 for (int i = 0; i < FLAGS_images.count(); i++) { | 527 for (int i = 0; i < FLAGS_images.count(); i++) { |
| 526 const char* flag = FLAGS_images[i]; | 528 const char* flag = FLAGS_images[i]; |
| 527 if (sk_isdir(flag)) { | 529 if (sk_isdir(flag)) { |
| 528 for (size_t j = 0; j < SK_ARRAY_COUNT(exts); j++) { | 530 for (size_t j = 0; j < SK_ARRAY_COUNT(exts); j++) { |
| 529 SkOSFile::Iter it(flag, exts[j]); | 531 SkOSFile::Iter it(flag, exts[j]); |
| 530 for (SkString file; it.next(&file); ) { | 532 for (SkString file; it.next(&file); ) { |
| 531 SkString path = SkOSPath::Join(flag, file.c_str()); | 533 SkString path = SkOSPath::Join(flag, file.c_str()); |
| 532 push_src("image", "decode", new ImageSrc(path)); // Decode e ntire image | 534 push_src("image", "decode", new ImageSrc(path)); // Decode e ntire image |
|
msarett
2016/01/22 14:20:50
Don't do this for RAW.
yujieqin
2016/01/22 20:18:08
Done.
| |
| 533 push_codec_srcs(path); | 535 push_codec_srcs(path); |
| 534 if (brd_supported(exts[j])) { | 536 if (brd_supported(exts[j])) { |
| 535 push_brd_srcs(path); | 537 push_brd_srcs(path); |
| 536 } | 538 } |
| 537 } | 539 } |
| 538 } | 540 } |
| 539 } else if (sk_exists(flag)) { | 541 } else if (sk_exists(flag)) { |
| 540 // assume that FLAGS_images[i] is a valid image if it is a file. | 542 // assume that FLAGS_images[i] is a valid image if it is a file. |
| 541 push_src("image", "decode", new ImageSrc(flag)); // Decode entire im age. | 543 push_src("image", "decode", new ImageSrc(flag)); // Decode entire im age. |
|
msarett
2016/01/22 14:20:50
Also don't do this for RAW.
yujieqin
2016/01/22 20:18:08
Done.
| |
| 542 push_codec_srcs(flag); | 544 push_codec_srcs(flag); |
| 543 push_brd_srcs(flag); | 545 push_brd_srcs(flag); |
| 544 } | 546 } |
| 545 } | 547 } |
| 546 } | 548 } |
| 547 | 549 |
| 548 static void push_sink(const SkCommandLineConfig& config, Sink* s) { | 550 static void push_sink(const SkCommandLineConfig& config, Sink* s) { |
| 549 SkAutoTDelete<Sink> sink(s); | 551 SkAutoTDelete<Sink> sink(s); |
| 550 | 552 |
| 551 // Try a simple Src as a canary. If it fails, skip this sink. | 553 // Try a simple Src as a canary. If it fails, skip this sink. |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1244 Reporter* reporter, | 1246 Reporter* reporter, |
| 1245 GrContextFactory* fac tory); | 1247 GrContextFactory* fac tory); |
| 1246 } // namespace skiatest | 1248 } // namespace skiatest |
| 1247 | 1249 |
| 1248 #if !defined(SK_BUILD_FOR_IOS) | 1250 #if !defined(SK_BUILD_FOR_IOS) |
| 1249 int main(int argc, char** argv) { | 1251 int main(int argc, char** argv) { |
| 1250 SkCommandLineFlags::Parse(argc, argv); | 1252 SkCommandLineFlags::Parse(argc, argv); |
| 1251 return dm_main(); | 1253 return dm_main(); |
| 1252 } | 1254 } |
| 1253 #endif | 1255 #endif |
| OLD | NEW |