Index: src/core/Sk4pxXfermode.h |
diff --git a/src/core/Sk4pxXfermode.h b/src/core/Sk4pxXfermode.h |
index 28fd9f1e7b478758106878715c2442bed4e8be75..b58718304610d7ff2decfa08de4db2e291660887 100644 |
--- a/src/core/Sk4pxXfermode.h |
+++ b/src/core/Sk4pxXfermode.h |
@@ -140,31 +140,6 @@ |
(s == Sk4f(0)).thenElse(srcover, |
otherwise)); |
return srcover * SkPMFloat(1,0,0,0) + colors * SkPMFloat(0,1,1,1); |
-} |
-XFERMODE(SoftLight) { |
- auto sa = s.alphas(), |
- da = d.alphas(), |
- isa = Sk4f(1)-sa, |
- ida = Sk4f(1)-da; |
- |
- // Some common terms. |
- auto m = (da > Sk4f(0)).thenElse(d / da, Sk4f(0)), |
- s2 = Sk4f(2)*s, |
- m4 = Sk4f(4)*m; |
- |
- // The logic forks three ways: |
- // 1. dark src? |
- // 2. light src, dark dst? |
- // 3. light src, light dst? |
- auto darkSrc = d*(sa + (s2 - sa)*(Sk4f(1) - m)), // Used in case 1. |
- darkDst = (m4*m4 + m4)*(m - Sk4f(1)) + Sk4f(7)*m, // Used in case 2. |
- liteDst = m.sqrt() - m, // Used in case 3. |
- liteSrc = d*sa + da*(s2-sa)*(Sk4f(4)*d < da).thenElse(darkDst, liteDst); // Case 2 or 3? |
- |
- auto alpha = s + d*isa; |
- auto colors = s*ida + d*isa + (s2 < sa).thenElse(darkSrc, liteSrc); // Case 1 or 2/3? |
- |
- return alpha * SkPMFloat(1,0,0,0) + colors * SkPMFloat(0,1,1,1); |
} |
#undef XFERMODE |
@@ -269,7 +244,6 @@ |
case SkXfermode::kColorDodge_Mode: return SkTPMFloatXfermode<ColorDodge>::Create(rec); |
case SkXfermode::kColorBurn_Mode: return SkTPMFloatXfermode<ColorBurn>::Create(rec); |
- case SkXfermode::kSoftLight_Mode: return SkTPMFloatXfermode<SoftLight>::Create(rec); |
#endif |
default: break; |
} |