add JSONP option to output of skpdiff
R=bsalomon@google.com
Review URL: https://codereview.chromium.org/18648002
git-svn-id: http://skia.googlecode.com/svn/trunk@9907 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/experimental/skpdiff/main.cpp b/experimental/skpdiff/main.cpp
index de1171f..0843551 100644
--- a/experimental/skpdiff/main.cpp
+++ b/experimental/skpdiff/main.cpp
@@ -29,6 +29,7 @@
DEFINE_string2(folders, f, "", "Compare two folders with identical subfile names: <baseline folder> <test folder>");
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");
/// A callback for any OpenCL errors
CL_CALLBACK void error_notify(const char* errorInfo, const void* privateInfoSize, ::size_t cb, void* userData) {
@@ -181,7 +182,7 @@
// Output to the file specified
if (!FLAGS_output.isEmpty()) {
SkFILEWStream outputStream(FLAGS_output[0]);
- ctx.outputRecords(outputStream);
+ ctx.outputRecords(outputStream, FLAGS_jsonp);
}
return 0;