Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: tools/skpdiff/SkDiffContext.h

Issue 457203003: Modify skpdiff to write diffs directly to provided directories (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed issue that broke windows build (hopefully) Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/tools.gyp ('k') | tools/skpdiff/SkDiffContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skpdiff/SkDiffContext.h
diff --git a/tools/skpdiff/SkDiffContext.h b/tools/skpdiff/SkDiffContext.h
index 996737f2eed6e3ac1ce89411c8fde4b4e9e4aa02..8f4789fea6556376dff5e3fdaa166ef5993064aa 100644
--- a/tools/skpdiff/SkDiffContext.h
+++ b/tools/skpdiff/SkDiffContext.h
@@ -52,6 +52,25 @@ public:
void setWhiteDiffDir(const SkString& directory);
/**
+ * Modify the pattern used to generate commonName (= the
+ * basename of rgb/white diff files).
+ *
+ * - true: basename is a combination of the input file names.
+ * - false: basename is the common prefix of the input file names.
+ *
+ * For example, for:
+ * baselinePath=/tmp/dir/image-before.png
+ * testPath=/tmp/dir/image-after.png
+ *
+ * If setLongNames(true), commonName would be:
+ * image-before-png-vs-image-after-png.png
+ *
+ * If setLongNames(false), commonName would be:
+ * image-.png
+ */
+ void setLongNames(const bool useLongNames);
+
+ /**
* Sets the differs to be used in each diff. Already started diffs will not retroactively use
* these.
* @param differs An array of differs to use. The array is copied, but not the differs
@@ -85,8 +104,9 @@ public:
*
* The format of the JSON document is one top level array named "records".
* Each record in the array is an object with the following values:
- * "commonName" : string containing the common prefix of the baselinePath
- * and testPath filenames
+ * "commonName" : string containing the output filename (basename)
+ * depending on the value of 'longNames'.
+ * (see 'setLongNames' for an explanation and example).
* "baselinePath" : string containing the path to the baseline image
* "testPath" : string containing the path to the test image
* "differencePath" : (optional) string containing the path to an alpha
@@ -177,6 +197,7 @@ private:
SkString fAlphaMaskDir;
SkString fRgbDiffDir;
SkString fWhiteDiffDir;
+ bool longNames;
};
#endif
« no previous file with comments | « gyp/tools.gyp ('k') | tools/skpdiff/SkDiffContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698