Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Side by Side Diff: dm/DM.cpp

Issue 1520403003: Prototype of RAW decoding in Skia. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « DEPS ('k') | gyp/android_deps.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « DEPS ('k') | gyp/android_deps.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698