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

Unified 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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 900eb58a0322aad2f1016f6b1c99f8987bcbd64a..dd4e48fc5dd116cacee09ad87806182b2bd53564 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -122,10 +122,15 @@ static void gather_srcs() {
for (const skiagm::GMRegistry* r = skiagm::GMRegistry::Head(); r; r = r->next()) {
push_src("gm", new GMSrc(r->factory()));
}
- if (!FLAGS_skps.isEmpty()) {
- SkOSFile::Iter it(FLAGS_skps[0], "skp");
- for (SkString file; it.next(&file); ) {
- push_src("skp", new SKPSrc(SkOSPath::Join(FLAGS_skps[0], file.c_str())));
+ for (int i = 0; i < FLAGS_skps.count(); i++) {
+ const char* path = FLAGS_skps[i];
+ if (sk_isdir(path)) {
+ SkOSFile::Iter it(path, "skp");
+ for (SkString file; it.next(&file); ) {
+ push_src("skp", new SKPSrc(SkOSPath::Join(path, file.c_str())));
+ }
+ } else {
+ push_src("skp", new SKPSrc(SkString(path)));
}
}
if (!FLAGS_images.isEmpty()) {
« 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