ComparePixels helper takes GrCPixmaps
Change-Id: I56d902b652663df7893626d19bc88d18f980c02c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/391301
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/tests/TestUtils.h b/tests/TestUtils.h
index 88d8323..bb6037c 100644
--- a/tests/TestUtils.h
+++ b/tests/TestUtils.h
@@ -46,12 +46,12 @@
* Compares pixels pointed to by 'a' with 'infoA' and rowBytesA to pixels pointed to by 'b' with
* 'infoB' and 'rowBytesB'.
*
- * If the infos have different dimensions error is called with negative coordinate values and
+ * If the pixmaps have different dimensions error is called with negative coordinate values and
* zero diffs and no comparisons are made.
*
* Before comparison pixels are converted to a common color type, alpha type, and color space.
- * The color type is always 32 bit float. The alpha type is premul if one of 'infoA' and 'infoB' is
- * premul and the other is unpremul. The color space is linear sRGB if 'infoA' and 'infoB' have
+ * The color type is always 32 bit float. The alpha type is premul if one of the pixmaps is
+ * premul and the other is unpremul. The color space is linear sRGB if the pixmaps have
* different colorspaces, otherwise their common color space is used.
*
* 'tolRGBA' expresses the allowed difference between pixels in the comparison space per channel. If
@@ -61,12 +61,9 @@
* The function quits after a single error is reported and returns false if 'error' was called and
* true otherwise.
*/
-bool ComparePixels(const GrImageInfo& infoA, const char* a, size_t rowBytesA,
- const GrImageInfo& infoB, const char* b, size_t rowBytesB,
- const float tolRGBA[4], std::function<ComparePixmapsErrorReporter>& error);
-
-/** Convenience version of above that takes SkPixmap inputs. */
-bool ComparePixels(const SkPixmap& a, const SkPixmap& b, const float tolRGBA[4],
+bool ComparePixels(const GrCPixmap& a,
+ const GrCPixmap& b,
+ const float tolRGBA[4],
std::function<ComparePixmapsErrorReporter>& error);
/**