Keep opaque bitmaps opaque after scaling

Bug #6293845

Change-Id: If9e82993f4c9702244ddedb5667421a6fcc7a0c5
This commit is contained in:
Romain Guy
2012-04-26 13:35:36 -07:00
parent fc8e5eaa03
commit 8f8d9fb52c

View File

@@ -322,6 +322,7 @@ static jobject doDecode(JNIEnv* env, SkStream* stream, jobject padding,
const float sy = scaledHeight / float(decoded->height());
bitmap->setConfig(decoded->getConfig(), scaledWidth, scaledHeight);
bitmap->setIsOpaque(decoded->isOpaque());
bitmap->allocPixels(&javaAllocator, NULL);
bitmap->eraseColor(0);