diff options
author | Keun young Park <keunyoung@google.com> | 2012-10-12 11:36:13 -0700 |
---|---|---|
committer | Keun young Park <keunyoung@google.com> | 2012-10-12 11:36:13 -0700 |
commit | 038953da05c641f6551134f710ac0e4f46b624b7 (patch) | |
tree | 19b3d51be60e335d0d7edaf830aa145373788358 /core/jni | |
parent | 4cce397c0dab44cf7b1b657d0e5410b5970eef55 (diff) | |
download | frameworks_base-038953da05c641f6551134f710ac0e4f46b624b7.zip frameworks_base-038953da05c641f6551134f710ac0e4f46b624b7.tar.gz frameworks_base-038953da05c641f6551134f710ac0e4f46b624b7.tar.bz2 |
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
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/android/graphics/Bitmap.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp index 1bba5b4..fd7a6a7 100644 --- a/core/jni/android/graphics/Bitmap.cpp +++ b/core/jni/android/graphics/Bitmap.cpp @@ -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),
|