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 |