diff options
author | epoger <epoger@google.com> | 2014-08-14 07:32:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-14 07:32:50 -0700 |
commit | b492c6ff308013eab3398992c10948997e348c45 (patch) | |
tree | d8016b51a74b3d8cca9390073c810a8890bff9bc /tools/render_pictures_main.cpp | |
parent | e1c78ae55311e647a856809843f0135d4c807bee (diff) |
add --descriptions flag to render_pictures tool
Needed because right now, when you look at the full set of SKP results in
rebaseline_server, you can't tell which renderMode (or builder) generated each
one.
BUG=skia:2833
R=borenet@google.com
Author: epoger@google.com
Review URL: https://codereview.chromium.org/466153006
Diffstat (limited to 'tools/render_pictures_main.cpp')
-rw-r--r-- | tools/render_pictures_main.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/render_pictures_main.cpp b/tools/render_pictures_main.cpp index 23d973f901..13cef09bc5 100644 --- a/tools/render_pictures_main.cpp +++ b/tools/render_pictures_main.cpp @@ -26,12 +26,16 @@ #include "picture_utils.h" // Flags used by this file, alphabetically: +DEFINE_bool(bench_record, false, "If true, drop into an infinite loop of recording the picture."); DECLARE_bool(deferImageDecoding); +DEFINE_string(descriptions, "", "one or more key=value pairs to add to the descriptions section " + "of the JSON summary."); DEFINE_int32(maxComponentDiff, 256, "Maximum diff on a component, 0 - 256. Components that differ " "by more than this amount are considered errors, though all diffs are reported. " "Requires --validate."); DEFINE_string(mismatchPath, "", "Write images for tests that failed due to " "pixel mismatches into this directory."); +DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing before rendering."); DEFINE_string(readJsonSummaryPath, "", "JSON file to read image expectations from."); DECLARE_string(readPath); DEFINE_bool(writeChecksumBasedFilenames, false, @@ -47,10 +51,6 @@ DEFINE_bool(validate, false, "Verify that the rendered image contains the same p "the picture rendered in simple mode. When used in conjunction with --bbh, results " "are validated against the picture rendered in the same mode, but without the bbh."); -DEFINE_bool(bench_record, false, "If true, drop into an infinite loop of recording the picture."); - -DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing before rendering."); - //////////////////////////////////////////////////////////////////////////////////////////////////// /** @@ -486,6 +486,13 @@ int tool_main(int argc, char** argv) { #endif #endif if (FLAGS_writeJsonSummaryPath.count() == 1) { + // If there were any descriptions on the command line, insert them now. + for (int i=0; i<FLAGS_descriptions.count(); i++) { + SkTArray<SkString> tokens; + SkStrSplit(FLAGS_descriptions[i], "=", &tokens); + SkASSERT(tokens.count() == 2); + jsonSummary.addDescription(tokens[0].c_str(), tokens[1].c_str()); + } jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); } return 0; |