Index: experimental/skpdiff/main.cpp |
=================================================================== |
--- experimental/skpdiff/main.cpp (revision 10232) |
+++ experimental/skpdiff/main.cpp (working copy) |
@@ -32,6 +32,7 @@ |
DEFINE_string2(patterns, p, "", "Use two patterns to compare images: <baseline> <test>"); |
DEFINE_string2(output, o, "skpdiff_output.json", "Writes the output of these diffs to output: <output>"); |
DEFINE_bool(jsonp, true, "Output JSON with padding"); |
+DEFINE_string(csv, "", "Writes the output of these diffs to a csv file"); |
#if SK_SUPPORT_OPENCL |
/// A callback for any OpenCL errors |
@@ -169,6 +170,13 @@ |
} |
} |
+ if (!FLAGS_csv.isEmpty()) { |
+ if (1 != FLAGS_csv.count()) { |
+ SkDebugf("csv flag expects one argument: <csv file>\n"); |
+ return 1; |
+ } |
+ } |
+ |
SkDiffContext ctx; |
ctx.setDiffers(chosenDiffers); |
@@ -188,5 +196,10 @@ |
ctx.outputRecords(outputStream, FLAGS_jsonp); |
} |
+ if (!FLAGS_csv.isEmpty()) { |
+ SkFILEWStream outputStream(FLAGS_csv[0]); |
+ ctx.outputCsv(outputStream); |
+ } |
+ |
return 0; |
} |