diff options
author | Brian Osman <brianosman@google.com> | 2018-03-01 20:10:11 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-01 20:10:15 +0000 |
commit | ded47a50143470d1acdafa03e878cc7da5608038 (patch) | |
tree | 45eb5ca0de078bd3abe6f56a121d5d76abe6ae96 /tests/ReadWriteAlphaTest.cpp | |
parent | caf1ebb95f7fea81d416b81beb4b46c25643c714 (diff) |
Revert "Add 1010102 support to Ganesh"
This reverts commit 44b61204d9f5681b9474db017577d56f42a32d66.
Reason for revert: TSAN bot crashing
Original change's description:
> Add 1010102 support to Ganesh
>
> Adds gl1010102, gles1010102, vk1010102, and mtl1010102
> configs to DM.
>
> This uses the same saveLayer approach as CPU, switching
> to 8888 so that we have enough alpha precision.
>
> Change-Id: I9f5b63747ec01031c8db97dadfc42f77e4863ccb
> Reviewed-on: https://skia-review.googlesource.com/110500
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=mtklein@google.com,bsalomon@google.com,brianosman@google.com
Change-Id: I782e740763044c1ae78fb219161e37eec7617c74
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/111580
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
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); } } } |