aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r--dm/DM.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 11527bfdaf..6d35391de7 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -60,6 +60,7 @@ extern void SkPDFImageDumpStats();
extern bool gSkForceRasterPipelineBlitter;
+DECLARE_bool(undefok);
DEFINE_string(src, "tests gm skp image", "Source types to test.");
DEFINE_bool(nameByHash, false,
"If true, write to FLAGS_writePath[0]/<hash>.png instead of "
@@ -979,9 +980,15 @@ static bool gather_sinks(const GrContextOptions& grCtxOptions) {
}
// If no configs were requested (just running tests, perhaps?), then we're okay.
- // Otherwise, make sure that at least one sink was constructed correctly. This catches
- // the case of bots without a GPU being assigned GPU configs.
- return (configs.count() == 0) || (gSinks.count() > 0);
+ if (configs.count() == 0 || FLAGS_config.count() == 0 ||
+ // If we've been told to ignore undefined flags, we're okay.
+ FLAGS_undefok ||
+ // Otherwise, make sure that all specified configs have become sinks.
+ configs.count() == gSinks.count()) {
+ return true;
+ }
+ info("Invalid --config. Use --undefok to bypass this warning.\n");
+ return false;
}
static bool dump_png(SkBitmap bitmap, const char* path, const char* md5) {