| Index: src/core/SkScalerContext.cpp
|
| diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp
|
| index fee1ff7908fc66cf25e0d30c9fc663ed4d7678e8..3e20bf69ed6947d8ada8ae982623c2c511f9fcd4 100644
|
| --- a/src/core/SkScalerContext.cpp
|
| +++ b/src/core/SkScalerContext.cpp
|
| @@ -584,7 +584,6 @@ static void generateMask(const SkMask& mask, const SkPath& path,
|
| matrix.setTranslate(-SkIntToScalar(mask.fBounds.fLeft),
|
| -SkIntToScalar(mask.fBounds.fTop));
|
|
|
| - SkBitmap::Config config = SkBitmap::kA8_Config;
|
| paint.setAntiAlias(SkMask::kBW_Format != mask.fFormat);
|
| switch (mask.fFormat) {
|
| case SkMask::kBW_Format:
|
| @@ -608,18 +607,17 @@ static void generateMask(const SkMask& mask, const SkPath& path,
|
| SkRasterClip clip;
|
| clip.setRect(SkIRect::MakeWH(dstW, dstH));
|
|
|
| + const SkImageInfo info = SkImageInfo::MakeA8(dstW, dstH);
|
| SkBitmap bm;
|
| - bm.setConfig(config, dstW, dstH, dstRB);
|
|
|
| if (0 == dstRB) {
|
| - if (!bm.allocPixels()) {
|
| + if (!bm.allocPixels(info)) {
|
| // can't allocate offscreen, so empty the mask and return
|
| sk_bzero(mask.fImage, mask.computeImageSize());
|
| return;
|
| }
|
| - bm.lockPixels();
|
| } else {
|
| - bm.setPixels(mask.fImage);
|
| + bm.installPixels(info, mask.fImage, dstRB);
|
| }
|
| sk_bzero(bm.getPixels(), bm.getSafeSize());
|
|
|
|
|