diff options
author | Leon Scroggins III <scroggo@google.com> | 2013-08-26 14:27:15 -0400 |
---|---|---|
committer | Leon Scroggins III <scroggo@google.com> | 2013-08-26 14:41:58 -0400 |
commit | 2cc409ae52a2a50f54195579a000e98f403de9be (patch) | |
tree | 548008c672e64328765c2e5a744f3f38bbd226de /core/jni | |
parent | fead1290d74492af5fdf3dcb6739fbd1898dc239 (diff) | |
download | frameworks_base-2cc409ae52a2a50f54195579a000e98f403de9be.zip frameworks_base-2cc409ae52a2a50f54195579a000e98f403de9be.tar.gz frameworks_base-2cc409ae52a2a50f54195579a000e98f403de9be.tar.bz2 |
Fix unpremul setting in BitmapRegionDecoder.
requireUnpremultiplied should be the opposite of BitmapOptions.
inPremultiplied, as in BitmapFactory.
Fixes CTS tests.
BUG=10490308
Change-Id: I21b8c057ccdc9b35c69730a7fe8c3b6802ee6dd8
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/android/graphics/BitmapRegionDecoder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android/graphics/BitmapRegionDecoder.cpp b/core/jni/android/graphics/BitmapRegionDecoder.cpp index 0c0ebbb..8867a11 100644 --- a/core/jni/android/graphics/BitmapRegionDecoder.cpp +++ b/core/jni/android/graphics/BitmapRegionDecoder.cpp @@ -217,7 +217,7 @@ static jobject nativeDecodeRegion(JNIEnv* env, jobject, SkBitmapRegionDecoder *b gOptions_preferQualityOverSpeedFieldID); // Get the bitmap for re-use if it exists. tileBitmap = env->GetObjectField(options, gOptions_bitmapFieldID); - requireUnpremultiplied = env->GetBooleanField(options, gOptions_premultipliedFieldID); + requireUnpremultiplied = !env->GetBooleanField(options, gOptions_premultipliedFieldID); } decoder->setDitherImage(doDither); |