diff options
author | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-26 20:48:54 +0000 |
---|---|---|
committer | bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-26 20:48:54 +0000 |
commit | 0c5f3762e863411798b1d6c55157d24c69d5bc25 (patch) | |
tree | 6784becc5bce236bfb52a48792c888a71418e3cd | |
parent | cd9f55989e680b7f52fa21766dde0ac67ac9911f (diff) |
Fix generateMask to properly apply pre-blend.
git-svn-id: http://skia.googlecode.com/svn/trunk@6158 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r-- | src/core/SkScalerContext.cpp | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index a497c3bad4..d8efd6e1d0 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -462,29 +462,28 @@ static void generateMask(const SkMask& mask, const SkPath& path, draw.fBitmap = &bm; draw.drawPath(path, paint); - if (0 == dstRB) { - switch (mask.fFormat) { - case SkMask::kA8_Format: - if (maskPreBlend.isApplicable()) { - applyLUTToA8Mask(mask, maskPreBlend.fG); - } - case SkMask::kLCD16_Format: - if (maskPreBlend.isApplicable()) { - pack3xHToLCD16<true>(bm, mask, maskPreBlend); - } else { - pack3xHToLCD16<false>(bm, mask, maskPreBlend); - } - break; - case SkMask::kLCD32_Format: - if (maskPreBlend.isApplicable()) { - pack3xHToLCD32<true>(bm, mask, maskPreBlend); - } else { - pack3xHToLCD32<false>(bm, mask, maskPreBlend); - } - break; - default: - SkDEBUGFAIL("bad format for copyback"); - } + switch (mask.fFormat) { + case SkMask::kA8_Format: + if (maskPreBlend.isApplicable()) { + applyLUTToA8Mask(mask, maskPreBlend.fG); + } + break; + case SkMask::kLCD16_Format: + if (maskPreBlend.isApplicable()) { + pack3xHToLCD16<true>(bm, mask, maskPreBlend); + } else { + pack3xHToLCD16<false>(bm, mask, maskPreBlend); + } + break; + case SkMask::kLCD32_Format: + if (maskPreBlend.isApplicable()) { + pack3xHToLCD32<true>(bm, mask, maskPreBlend); + } else { + pack3xHToLCD32<false>(bm, mask, maskPreBlend); + } + break; + default: + break; } } |