Index: src/effects/SkMorphologyImageFilter.cpp |
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp |
index 8803f8aae39706388f1a6bee6305d9f1c4f028d8..19a9b68aa8d127724b28240660bf5f503a4accee 100644 |
--- a/src/effects/SkMorphologyImageFilter.cpp |
+++ b/src/effects/SkMorphologyImageFilter.cpp |
@@ -163,9 +163,7 @@ bool SkMorphologyImageFilter::filterImageGeneric(SkMorphologyImageFilter::Proc p |
return false; |
} |
- dst->setConfig(src.config(), bounds.width(), bounds.height()); |
- dst->allocPixels(); |
- if (!dst->getPixels()) { |
+ if (!dst->allocPixels(src.info().makeWH(bounds.width(), bounds.height()))) { |
return false; |
} |
@@ -190,8 +188,7 @@ bool SkMorphologyImageFilter::filterImageGeneric(SkMorphologyImageFilter::Proc p |
} |
SkBitmap temp; |
- temp.setConfig(dst->config(), dst->width(), dst->height()); |
- if (!temp.allocPixels()) { |
+ if (!temp.allocPixels(dst->info())) { |
return false; |
} |