| Index: src/core/SkBitmapScaler.cpp
|
| diff --git a/src/core/SkBitmapScaler.cpp b/src/core/SkBitmapScaler.cpp
|
| index 114836dd7967c72419c4ad92253648467cdf3413..4d8ecbb96fe36d4d8e3656a87e3b68a157032dce 100644
|
| --- a/src/core/SkBitmapScaler.cpp
|
| +++ b/src/core/SkBitmapScaler.cpp
|
| @@ -287,7 +287,8 @@ bool SkBitmapScaler::Resize(SkBitmap* resultPtr,
|
| // Convolve into the result.
|
| SkBitmap result;
|
| result.setConfig(SkBitmap::kARGB_8888_Config,
|
| - destSubset.width(), destSubset.height());
|
| + destSubset.width(), destSubset.height(), 0,
|
| + source.isOpaque() ? kOpaque_SkAlphaType : kPremul_SkAlphaType);
|
| result.allocPixels(allocator, NULL);
|
| if (!result.readyToDraw()) {
|
| return false;
|
| @@ -299,8 +300,6 @@ bool SkBitmapScaler::Resize(SkBitmap* resultPtr,
|
| static_cast<unsigned char*>(result.getPixels()),
|
| convolveProcs, true);
|
|
|
| - // Preserve the "opaque" flag for use as an optimization later.
|
| - result.setIsOpaque(source.isOpaque());
|
| *resultPtr = result;
|
| return true;
|
| }
|
|
|