Skip to content

Commit 038953d

Browse files
author
Keun young Park
committed
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
1 parent 4cce397 commit 038953d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/jni/android/graphics/Bitmap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static void ToColor_S4444_Alpha(SkColor dst[], const void* src, int width,
145145
static void ToColor_S4444_Opaque(SkColor dst[], const void* src, int width,
146146
SkColorTable*) {
147147
SkASSERT(width > 0);
148-
const SkPMColor* s = (const SkPMColor*)src;
148+
const SkPMColor16* s = (const SkPMColor16*)src;
149149
do {
150150
SkPMColor c = SkPixel4444ToPixel32(*s++);
151151
*dst++ = SkColorSetRGB(SkGetPackedR32(c), SkGetPackedG32(c),

0 commit comments

Comments
 (0)