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

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: Rebase; remove DNG specific changes 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
« no previous file with comments | « 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 127d37328eb1b05981e72414ce94a33e837a6b27..8e00e7516c14419d8fee650e540fc38d96fe6cc9 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);
@@ -30,4 +32,18 @@ DECLARE_bool(pre_log);
DECLARE_string(key);
DECLARE_string(properties);
+/**
+ * Helper to assist in collecting image paths from --images.
+ *
+ * Populates an array of strings with paths to images to test.
+ *
+ * Returns true if each argument to --images is meaningful:
+ * - If the file/directory does not exist, return false.
+ * - If a directory passed to --images does not have any supported images (based on file
+ * type), return false.
+ * - If a file is passed to --images, assume the user is deliberately testing this image,
+ * regardless of file type.
+ */
+bool CollectImages(SkTArray<SkString>*);
+
#endif
« no previous file with comments | « dm/DM.cpp ('k') | tools/flags/SkCommonFlags.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698