Fix BC1 SW decompression on platforms with RGBA PM color order
Bug: skia:9680 Change-Id: Ibe802ea574d749ebd601118d0e6da32b2a18fab2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268619 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
2aee7d24da
commit
a2406f9218
@ -190,7 +190,7 @@ static bool decompress_bc1(SkISize dimensions, const uint8_t* srcData,
|
|||||||
|
|
||||||
colors[0] = from565(curBlock->fColor0);
|
colors[0] = from565(curBlock->fColor0);
|
||||||
colors[1] = from565(curBlock->fColor1);
|
colors[1] = from565(curBlock->fColor1);
|
||||||
if (colors[0] <= colors[1]) { // signal for a transparent block
|
if (curBlock->fColor0 <= curBlock->fColor1) { // signal for a transparent block
|
||||||
colors[2] = SkPackARGB32(
|
colors[2] = SkPackARGB32(
|
||||||
0xFF,
|
0xFF,
|
||||||
(SkGetPackedR32(colors[0]) + SkGetPackedR32(colors[1])) >> 1,
|
(SkGetPackedR32(colors[0]) + SkGetPackedR32(colors[1])) >> 1,
|
||||||
|
Loading…
Reference in New Issue
Block a user