Skip to content

Commit 8f8d9fb

Browse files
author
Romain Guy
committed
Keep opaque bitmaps opaque after scaling
Bug #6293845 Change-Id: If9e82993f4c9702244ddedb5667421a6fcc7a0c5
1 parent fc8e5ea commit 8f8d9fb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/jni/android/graphics/BitmapFactory.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ static jobject doDecode(JNIEnv* env, SkStream* stream, jobject padding,
322322
const float sy = scaledHeight / float(decoded->height());
323323

324324
bitmap->setConfig(decoded->getConfig(), scaledWidth, scaledHeight);
325+
bitmap->setIsOpaque(decoded->isOpaque());
325326
bitmap->allocPixels(&javaAllocator, NULL);
326327
bitmap->eraseColor(0);
327328

0 commit comments

Comments
 (0)