Remove redundant bitmask in RGB->RGBA conversion

This commit is contained in:
Anthony Kim
2026-03-07 23:32:02 -08:00
parent f5e81afba7
commit 163868ff60
@@ -752,9 +752,9 @@ export class KittyGraphicsHandler implements IApcHandler, IResetHandler, IDispos
const b1 = src32[srcOffset++];
const b2 = src32[srcOffset++];
// Little-endian: pixel bytes are [R,G,B] → uint32 ABGR layout
dst32[dstOffset++] = (b0 & 0x00FFFFFF) | 0xFF000000;
dst32[dstOffset++] = ((b0 >>> 24) | (b1 << 8)) & 0x00FFFFFF | 0xFF000000;
dst32[dstOffset++] = ((b1 >>> 16) | (b2 << 16)) & 0x00FFFFFF | 0xFF000000;
dst32[dstOffset++] = b0 | 0xFF000000;
dst32[dstOffset++] = ((b0 >>> 24) | (b1 << 8)) | 0xFF000000;
dst32[dstOffset++] = ((b1 >>> 16) | (b2 << 16)) | 0xFF000000;
dst32[dstOffset++] = (b2 >>> 8) | 0xFF000000;
}