diff options
Diffstat (limited to 'tests/ReadWriteAlphaTest.cpp')
-rw-r--r-- | tests/ReadWriteAlphaTest.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp index ba1022c689..68a3ee0983 100644 --- a/tests/ReadWriteAlphaTest.cpp +++ b/tests/ReadWriteAlphaTest.cpp @@ -25,17 +25,11 @@ static const int X_SIZE = 13; static const int Y_SIZE = 13; static void validate_alpha_data(skiatest::Reporter* reporter, int w, int h, const uint8_t* actual, - size_t actualRowBytes, const uint8_t* expected, SkString extraMsg, - GrPixelConfig config) { + size_t actualRowBytes, const uint8_t* expected, SkString extraMsg) { for (int y = 0; y < h; ++y) { for (int x = 0; x < w; ++x) { uint8_t a = actual[y * actualRowBytes + x]; uint8_t e = expected[y * w + x]; - if (kRGBA_1010102_GrPixelConfig == config) { - // This config only preserves two bits of alpha - a >>= 6; - e >>= 6; - } if (e != a) { ERRORF(reporter, "Failed alpha readback. Expected: 0x%02x, Got: 0x%02x at (%d,%d), %s", @@ -105,7 +99,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) { SkString msg; msg.printf("rb:%d A8", SkToU32(rowBytes)); validate_alpha_data(reporter, X_SIZE, Y_SIZE, readback.get(), nonZeroRowBytes, - alphaData, msg, kAlpha_8_GrPixelConfig); + alphaData, msg); // Now try writing to a single channel surface (if we could create one). if (surf) { @@ -142,8 +136,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) { static const GrPixelConfig kRGBAConfigs[] { kRGBA_8888_GrPixelConfig, kBGRA_8888_GrPixelConfig, - kSRGBA_8888_GrPixelConfig, - kRGBA_1010102_GrPixelConfig, + kSRGBA_8888_GrPixelConfig }; for (int y = 0; y < Y_SIZE; ++y) { @@ -207,7 +200,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) { SkString msg; msg.printf("rt:%d, rb:%d 8888", rt, SkToU32(rowBytes)); validate_alpha_data(reporter, X_SIZE, Y_SIZE, readback.get(), nonZeroRowBytes, - alphaData, msg, config); + alphaData, msg); } } } |