fix wrong read size in ToColor_S4444_Opaque

- S4444 takes 16bits, not 32bits
- This caused sporadic failure in CTS BitmapFactoryTest#testDecodeStream4

Bug: 7179389
Change-Id: Ib36a3a569b3149d74f36ae67a069a7b65a72e895
This commit is contained in:
Keun young Park
2012-10-12 11:36:13 -07:00
parent 4cce397c0d
commit 038953da05

View File

@@ -145,7 +145,7 @@ static void ToColor_S4444_Alpha(SkColor dst[], const void* src, int width,
static void ToColor_S4444_Opaque(SkColor dst[], const void* src, int width,
SkColorTable*) {
SkASSERT(width > 0);
const SkPMColor* s = (const SkPMColor*)src;
const SkPMColor16* s = (const SkPMColor16*)src;
do {
SkPMColor c = SkPixel4444ToPixel32(*s++);
*dst++ = SkColorSetRGB(SkGetPackedR32(c), SkGetPackedG32(c),