Index: src/core/SkBlitRow_D32.cpp |
diff --git a/src/core/SkBlitRow_D32.cpp b/src/core/SkBlitRow_D32.cpp |
index 80c72421049a8ad1f519a4491550466f9aac4f4f..9494557d92401a76be1048667b77415e38f54de2 100644 |
--- a/src/core/SkBlitRow_D32.cpp |
+++ b/src/core/SkBlitRow_D32.cpp |
@@ -26,25 +26,27 @@ static void S32_Blend_BlitRow32(SkPMColor* SK_RESTRICT dst, |
SkASSERT(alpha <= 255); |
if (count > 0) { |
unsigned src_scale = SkAlpha255To256(alpha); |
- unsigned dst_scale = 256 - src_scale; |
#ifdef UNROLL |
if (count & 1) { |
- *dst = SkAlphaMulQ(*(src++), src_scale) + SkAlphaMulQ(*dst, dst_scale); |
+ *dst = SkPMLerp(*src, *dst, src_scale); |
+ src += 1; |
dst += 1; |
count -= 1; |
} |
const SkPMColor* SK_RESTRICT srcEnd = src + count; |
while (src != srcEnd) { |
- *dst = SkAlphaMulQ(*(src++), src_scale) + SkAlphaMulQ(*dst, dst_scale); |
+ *dst = SkPMLerp(*src, *dst, src_scale); |
+ src += 1; |
dst += 1; |
- *dst = SkAlphaMulQ(*(src++), src_scale) + SkAlphaMulQ(*dst, dst_scale); |
+ *dst = SkPMLerp(*src, *dst, src_scale); |
+ src += 1; |
dst += 1; |
} |
#else |
do { |
- *dst = SkAlphaMulQ(*src, src_scale) + SkAlphaMulQ(*dst, dst_scale); |
+ *dst = SkPMLerp(*src, *dst, src_scale); |
src += 1; |
dst += 1; |
} while (--count > 0); |