Index: src/core/SkBitmapScaler.cpp |
diff --git a/src/core/SkBitmapScaler.cpp b/src/core/SkBitmapScaler.cpp |
index 114836dd7967c72419c4ad92253648467cdf3413..c28d4779c7ae60b3bc3c375b16605be8efdd2049 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.alphaType()); |
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; |
} |