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

Side by Side Diff: dm/DM.cpp

Issue 885353002: dm: allow multiple --skp flags, allow single files (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment from sunshine Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "CrashHandler.h" 1 #include "CrashHandler.h"
2 #include "DMJsonWriter.h" 2 #include "DMJsonWriter.h"
3 #include "DMSrcSink.h" 3 #include "DMSrcSink.h"
4 #include "OverwriteLine.h" 4 #include "OverwriteLine.h"
5 #include "ProcStats.h" 5 #include "ProcStats.h"
6 #include "SkBBHFactory.h" 6 #include "SkBBHFactory.h"
7 #include "SkChecksum.h" 7 #include "SkChecksum.h"
8 #include "SkCommonFlags.h" 8 #include "SkCommonFlags.h"
9 #include "SkForceLinking.h" 9 #include "SkForceLinking.h"
10 #include "SkGraphics.h" 10 #include "SkGraphics.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 Tagged<Src>& s = gSrcs.push_back(); 115 Tagged<Src>& s = gSrcs.push_back();
116 s.reset(src.detach()); 116 s.reset(src.detach());
117 s.tag = tag; 117 s.tag = tag;
118 } 118 }
119 } 119 }
120 120
121 static void gather_srcs() { 121 static void gather_srcs() {
122 for (const skiagm::GMRegistry* r = skiagm::GMRegistry::Head(); r; r = r->nex t()) { 122 for (const skiagm::GMRegistry* r = skiagm::GMRegistry::Head(); r; r = r->nex t()) {
123 push_src("gm", new GMSrc(r->factory())); 123 push_src("gm", new GMSrc(r->factory()));
124 } 124 }
125 if (!FLAGS_skps.isEmpty()) { 125 for (int i = 0; i < FLAGS_skps.count(); i++) {
126 SkOSFile::Iter it(FLAGS_skps[0], "skp"); 126 const char* path = FLAGS_skps[i];
127 for (SkString file; it.next(&file); ) { 127 if (sk_isdir(path)) {
128 push_src("skp", new SKPSrc(SkOSPath::Join(FLAGS_skps[0], file.c_str( )))); 128 SkOSFile::Iter it(path, "skp");
129 for (SkString file; it.next(&file); ) {
130 push_src("skp", new SKPSrc(SkOSPath::Join(path, file.c_str())));
131 }
132 } else {
133 push_src("skp", new SKPSrc(SkString(path)));
129 } 134 }
130 } 135 }
131 if (!FLAGS_images.isEmpty()) { 136 if (!FLAGS_images.isEmpty()) {
132 const char* exts[] = { 137 const char* exts[] = {
133 "bmp", "gif", "jpg", "jpeg", "png", "webp", "ktx", "astc", "wbmp", " ico", 138 "bmp", "gif", "jpg", "jpeg", "png", "webp", "ktx", "astc", "wbmp", " ico",
134 "BMP", "GIF", "JPG", "JPEG", "PNG", "WEBP", "KTX", "ASTC", "WBMP", " ICO", 139 "BMP", "GIF", "JPG", "JPEG", "PNG", "WEBP", "KTX", "ASTC", "WBMP", " ICO",
135 }; 140 };
136 for (size_t i = 0; i < SK_ARRAY_COUNT(exts); i++) { 141 for (size_t i = 0; i < SK_ARRAY_COUNT(exts); i++) {
137 SkOSFile::Iter it(FLAGS_images[0], exts[i]); 142 SkOSFile::Iter it(FLAGS_images[0], exts[i]);
138 for (SkString file; it.next(&file); ) { 143 for (SkString file; it.next(&file); ) {
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 } 535 }
531 return 0; 536 return 0;
532 } 537 }
533 538
534 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 539 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
535 int main(int argc, char** argv) { 540 int main(int argc, char** argv) {
536 SkCommandLineFlags::Parse(argc, argv); 541 SkCommandLineFlags::Parse(argc, argv);
537 return dm_main(); 542 return dm_main();
538 } 543 }
539 #endif 544 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698