From f494bd2ebb0160f381feeb9d3a241343935546dc Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Thu, 12 Jul 2018 10:47:01 -0400 Subject: Update SRGBReadWritePixelsTest again, to only test opaque colors With our new world (never doing linear blending), the read-back conversion from premul sRGB to premul linear no longer produces the same answer. By always using opaque pixels, the existing check functions in this test can continue to verify that the sRGB <-> linear conversion is happening correctly during read/write, independent of any color space transformation (which is now altering the outcome). Bug: skia: Change-Id: Id8e28b3bc4b9674043bd870a39d229207ccdc6d7 Reviewed-on: https://skia-review.googlesource.com/140987 Auto-Submit: Brian Osman Reviewed-by: Mike Klein Commit-Queue: Brian Osman --- tests/SRGBReadWritePixelsTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/SRGBReadWritePixelsTest.cpp') diff --git a/tests/SRGBReadWritePixelsTest.cpp b/tests/SRGBReadWritePixelsTest.cpp index 6e8edce784..af46d7d260 100644 --- a/tests/SRGBReadWritePixelsTest.cpp +++ b/tests/SRGBReadWritePixelsTest.cpp @@ -188,7 +188,7 @@ static std::unique_ptr make_data() { std::unique_ptr data(new uint32_t[kW * kH]); for (int j = 0; j < kH; ++j) { for (int i = 0; i < kW; ++i) { - data[j * kW + i] = (SkTMax(j, i) << 24) | (i << 16) | (i << 8) | i; + data[j * kW + i] = (0xFF << 24) | (i << 16) | (i << 8) | i; } } return data; -- cgit v1.2.3