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

Unified Diff: tools/flags/SkCommonFlags.h

Issue 1611323004: Treat bad values passed to --images as a fatal error (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Share code 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 side-by-side diff with in-line comments
Download patch
« dm/DM.cpp ('K') | « dm/DM.cpp ('k') | tools/flags/SkCommonFlags.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/flags/SkCommonFlags.h
diff --git a/tools/flags/SkCommonFlags.h b/tools/flags/SkCommonFlags.h
index ddd8d3a4a2f86022becfefcbdbad9f3fae604048..f1aa1f398751453d89a8e8fb5fbd556ba3fe6c60 100644
--- a/tools/flags/SkCommonFlags.h
+++ b/tools/flags/SkCommonFlags.h
@@ -9,6 +9,8 @@
#define SK_COMMON_FLAGS_H
#include "SkCommandLineFlags.h"
+#include "SkTArray.h"
+#include "SkString.h"
DECLARE_bool(cpu);
DECLARE_bool(dryRun);
@@ -29,4 +31,19 @@ DECLARE_string(writePath);
DECLARE_string(key);
DECLARE_string(properties);
+namespace SkCommonFlags {
+ /**
+ * Helper to assist in collecting images from --images.
+ *
+ * Populates an input array of strings with paths to images to test.
+ *
+ * If a directory is passed to --images that does not have any supported images (based on file
+ * type), this will exit the program, so the user or bot can rerun using the correct directory.
+ *
+ * If a file is passed to --images, assume the user is deliberately testing this image, regardless
+ * of file type.
+ */
+ void collectImages(SkTArray<SkString>*);
+}
+
#endif
« dm/DM.cpp ('K') | « dm/DM.cpp ('k') | tools/flags/SkCommonFlags.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698