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

Unified Diff: tools/skpdiff/SkDiffContext.h

Issue 325413003: rebaseline_server: use just skpdiff, not Python Image Library (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: attempt to fix "'abs' : ambiguous call to overloaded function" on Windows Created 6 years, 6 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
Index: tools/skpdiff/SkDiffContext.h
diff --git a/tools/skpdiff/SkDiffContext.h b/tools/skpdiff/SkDiffContext.h
index c036c2ef6cd0c169f1a99a38319af124aff9fdcc..996737f2eed6e3ac1ce89411c8fde4b4e9e4aa02 100644
--- a/tools/skpdiff/SkDiffContext.h
+++ b/tools/skpdiff/SkDiffContext.h
@@ -28,10 +28,28 @@ public:
void setThreadCount(int threadCount) { fThreadCount = threadCount; }
/**
- * Creates the directory if it does not exist and uses it to store differences
- * between images.
+ * Sets the directory within which to store alphaMasks (images that
+ * are transparent for each pixel that differs between baseline and test).
+ *
+ * If the directory does not exist yet, it will be created.
+ */
+ void setAlphaMaskDir(const SkString& directory);
+
+ /**
+ * Sets the directory within which to store rgbDiffs (images showing the
+ * per-channel difference between baseline and test at each pixel).
+ *
+ * If the directory does not exist yet, it will be created.
+ */
+ void setRgbDiffDir(const SkString& directory);
+
+ /**
+ * Sets the directory within which to store whiteDiffs (images showing white
+ * for each pixel that differs between baseline and test).
+ *
+ * If the directory does not exist yet, it will be created.
*/
- void setDifferenceDir(const SkString& directory);
+ void setWhiteDiffDir(const SkString& directory);
/**
* Sets the differs to be used in each diff. Already started diffs will not retroactively use
@@ -74,6 +92,14 @@ public:
* "differencePath" : (optional) string containing the path to an alpha
* mask of the pixel difference between the baseline
* and test images
+ * TODO(epoger): consider renaming this "alphaMaskPath"
+ * to distinguish from other difference types?
+ * "rgbDiffPath" : (optional) string containing the path to a bitmap
+ * showing per-channel differences between the
+ * baseline and test images at each pixel
+ * "whiteDiffPath" : (optional) string containing the path to a bitmap
+ * showing every pixel that differs between the
+ * baseline and test images as white
*
* They also have an array named "diffs" with each element being one diff record for the two
* images indicated in the above field.
@@ -117,10 +143,21 @@ private:
};
struct DiffRecord {
+ // TODO(djsollen): Some of these fields are required, while others are optional
+ // (e.g., fRgbDiffPath is only filled in if SkDifferentPixelsMetric
+ // was run). Figure out a way to note that. See http://skbug.com/2712
+ // ('allow skpdiff to report different sets of result fields for
+ // different comparison algorithms')
SkString fCommonName;
- SkString fDifferencePath;
+ SkString fAlphaMaskPath;
+ SkString fRgbDiffPath;
+ SkString fWhiteDiffPath;
SkString fBaselinePath;
SkString fTestPath;
+ SkISize fSize;
+ int fMaxRedDiff;
+ int fMaxGreenDiff;
+ int fMaxBlueDiff;
SkTArray<DiffData> fDiffs;
};
@@ -137,7 +174,9 @@ private:
int fDifferCount;
int fThreadCount;
- SkString fDifferenceDir;
+ SkString fAlphaMaskDir;
+ SkString fRgbDiffDir;
+ SkString fWhiteDiffDir;
};
#endif

Powered by Google App Engine
This is Rietveld 408576698