Chromium Code Reviews| Index: src/core/SkBlitRow_D16.cpp |
| diff --git a/src/core/SkBlitRow_D16.cpp b/src/core/SkBlitRow_D16.cpp |
| index d5082769c53ae5b5a4a84d5467343dec64839bcf..5a5bc50aa7e757ae077f499455193a9a1f0a1aaa 100644 |
| --- a/src/core/SkBlitRow_D16.cpp |
| +++ b/src/core/SkBlitRow_D16.cpp |
| @@ -216,8 +216,7 @@ static void Color32A_D565(uint16_t dst[], SkPMColor src, int count, int x, int y |
| uint32_t src_expand = pmcolor_to_expand16(src); |
| unsigned scale = SkAlpha255To256(0xFF - SkGetPackedA32(src)) >> 3; |
| do { |
| - uint32_t dst_expand = SkExpand_rgb_16(*dst) * scale; |
| - *dst = SkCompact_rgb_16((src_expand + dst_expand) >> 5); |
| + *dst = SkBlend32_RGB16(src_expand, *dst, scale); |
| dst += 1; |
| } while (--count != 0); |
| } |
| @@ -269,7 +268,7 @@ SkBlitRow::ColorProc16 SkBlitRow::ColorFactory16(unsigned flags) { |
| // just so we don't crash |
| flags &= kFlags16_Mask; |
| // we ignore both kGlobalAlpha_Flag and kSrcPixelAlpha_Flag, so shift down |
| - // since this factory is only used for transparent source alphas |
| + // no need for the addition code specializing on opaque alpha at this time |
|
mtklein
2015/02/13 15:15:04
addition -> additional?
henrik.smiding
2015/02/13 15:38:11
Probably. Copy/paste from Mike's suggestion in 901
|
| flags >>= 2; |
| SkASSERT(flags < SK_ARRAY_COUNT(gDefault_565_ColorProcs)); |