Index: tools/skpdiff/SkImageDiffer.h |
diff --git a/tools/skpdiff/SkImageDiffer.h b/tools/skpdiff/SkImageDiffer.h |
index 6c570cbb8e41bc3d8437937047f55396cd262258..3b50d5775d2e8f23bbcfd0acab0fd9ddf73a9c3a 100644 |
--- a/tools/skpdiff/SkImageDiffer.h |
+++ b/tools/skpdiff/SkImageDiffer.h |
@@ -19,6 +19,9 @@ public: |
SkImageDiffer(); |
virtual ~SkImageDiffer(); |
+ static const double RESULT_CORRECT = 1.0f; |
+ static const double RESULT_INCORRECT = 0.0f; |
+ |
/** |
* Gets a unique and descriptive name of this differ |
* @return A statically allocated null terminated string that is the name of this differ |
@@ -37,6 +40,12 @@ public: |
virtual bool requiresOpenCL() { return false; } |
/** |
+ * Enables the generation of an alpha mask for all points of interest. |
+ * @return True if the differ supports generating an alpha mask and false otherwise. |
+ */ |
+ virtual bool enablePOIAlphaMask() { return false; } |
+ |
+ /** |
* Wraps a call to queueDiff by loading the given filenames into SkBitmaps |
* @param baseline The file path of the baseline image |
* @param test The file path of the test image |
@@ -87,6 +96,13 @@ public: |
*/ |
virtual SkIPoint* getPointsOfInterest(int id) = 0; |
+ /* |
+ * Gets a bitmap containing an alpha mask containing transparent pixels at the points of |
+ * interest for the diff of the given id. The results are only meaningful after the |
+ * queued diff has finished. |
+ * @param id The id of the queued diff to query |
+ */ |
+ virtual SkBitmap* getPointsOfInterestAlphaMask(int id) { return NULL; } |
protected: |