Index: src/core/SkBlitRow_D16.cpp |
diff --git a/src/core/SkBlitRow_D16.cpp b/src/core/SkBlitRow_D16.cpp |
index 1b2be06d12590f2c419739a9eaf5b8a3b94d2a47..e052b3500a2477e0369e0ebb252f8df1112d085b 100644 |
--- a/src/core/SkBlitRow_D16.cpp |
+++ b/src/core/SkBlitRow_D16.cpp |
@@ -74,11 +74,8 @@ static void S32A_D565_Blend(uint16_t* SK_RESTRICT dst, |
SkPMColorAssert(sc); |
if (sc) { |
uint16_t dc = *dst; |
- unsigned dst_scale = 255 - SkMulDiv255Round(SkGetPackedA32(sc), alpha); |
- unsigned dr = SkMulS16(SkPacked32ToR16(sc), alpha) + SkMulS16(SkGetPackedR16(dc), dst_scale); |
- unsigned dg = SkMulS16(SkPacked32ToG16(sc), alpha) + SkMulS16(SkGetPackedG16(dc), dst_scale); |
- unsigned db = SkMulS16(SkPacked32ToB16(sc), alpha) + SkMulS16(SkGetPackedB16(dc), dst_scale); |
- *dst = SkPackRGB16(SkDiv255Round(dr), SkDiv255Round(dg), SkDiv255Round(db)); |
+ SkPMColor res = SkBlendARGB32(sc, SkPixel16ToPixel32(dc), alpha); |
+ *dst = SkPixel32ToPixel16(res); |
} |
dst += 1; |
} while (--count != 0); |