Index: src/core/SkXfermodeF16.cpp |
diff --git a/src/core/SkXfermodeF16.cpp b/src/core/SkXfermodeF16.cpp |
index dfcefa2de5ba4df925b4b7b0f5df349b5722a0bf..2c6873f764e748092c40a0b09f82dc1409547a00 100644 |
--- a/src/core/SkXfermodeF16.cpp |
+++ b/src/core/SkXfermodeF16.cpp |
@@ -134,15 +134,13 @@ static void srcover_1(const SkXfermode*, uint64_t dst[], const SkPM4f* src, int |
static void srcover_n(const SkXfermode*, uint64_t dst[], const SkPM4f src[], int count, |
const SkAlpha aa[]) { |
for (int i = 0; i < count; ++i) { |
- const Sk4f s4 = Sk4f::Load(src[i].fVec); |
- const Sk4f dst_scale = Sk4f(1 - get_alpha(s4)); |
- const Sk4f d4 = SkHalfToFloat_01(dst[i]); |
- const Sk4f r4 = s4 + d4 * dst_scale; |
+ Sk4f s = Sk4f::Load(src+i), |
+ d = SkHalfToFloat_01(dst+i), |
+ r = s + d*(1.0f - SkNx_shuffle<3,3,3,3>(s)); |
if (aa) { |
- dst[i] = SkFloatToHalf_01(lerp_by_coverage(r4, d4, aa[i])); |
- } else { |
- dst[i] = SkFloatToHalf_01(r4); |
+ r = lerp_by_coverage(r, d, aa[i]); |
} |
+ SkFloatToHalf_01(r, dst+i); |
} |
} |