add -r to DM
$ out/Debug/dm -w good
$ out/Debug/dm -r good -w bad && echo "hooray no diffs!"
BUG=skia:
Review URL: https://codereview.chromium.org/863093003
diff --git a/dm/DMJsonWriter.h b/dm/DMJsonWriter.h
index 58d85d3..5934846 100644
--- a/dm/DMJsonWriter.h
+++ b/dm/DMJsonWriter.h
@@ -44,7 +44,14 @@
* Write all collected results to the file FLAGS_writePath[0]/dm.json.
*/
static void DumpJson();
+
+ /**
+ * Read JSON file at path written by DumpJson, calling callback for each
+ * BitmapResult recorded in the file. Return success.
+ */
+ static bool ReadJson(const char* path, void(*callback)(BitmapResult));
};
+
} // namespace DM
#endif // DMJsonWriter_DEFINED