Merge "Keep opaque bitmaps opaque after scaling Bug #6293845" into jb-dev

This commit is contained in:
Romain Guy
2012-04-26 13:37:11 -07:00
committed by Android (Google) Code Review

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);