aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapScaler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkBitmapScaler.cpp')
-rw-r--r--src/core/SkBitmapScaler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/SkBitmapScaler.cpp b/src/core/SkBitmapScaler.cpp
index 114836dd79..c28d4779c7 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;
}