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

Unified Diff: tools/skpdiff/SkImageDiffer.h

Issue 29103005: update skpdiff visualization (image magnification with alpha mask) (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | « tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp ('k') | tools/skpdiff/diff_viewer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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:
« no previous file with comments | « tools/skpdiff/SkDifferentPixelsMetric_opencl.cpp ('k') | tools/skpdiff/diff_viewer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698