Index: src/core/SkXfermode.cpp |
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp |
index 07c4e168b97420b141000c4d523a60ea622355c0..1d8f3d92bfc6c855f7b00bee2fa3038ba2bdc1c7 100644 |
--- a/src/core/SkXfermode.cpp |
+++ b/src/core/SkXfermode.cpp |
@@ -95,7 +95,7 @@ static Sk4f overlay_4f(const Sk4f& s, const Sk4f& d) { |
Sk4f two = Sk4f(2); |
Sk4f rc = (two * d <= da).thenElse(two * s * d, |
sa * da - two * (da - d) * (sa - s)); |
- return s + d - s * da + color_alpha(rc - d * sa, 0); |
+ return pin_1(s + d - s * da + color_alpha(rc - d * sa, 0)); |
} |
static Sk4f hardlight_4f(const Sk4f& s, const Sk4f& d) { |
@@ -1343,6 +1343,15 @@ SkXfermodeProc4f SkXfermode::GetProc4f(Mode mode) { |
return proc; |
} |
+static SkPM4f missing_proc4f(const SkPM4f& src, const SkPM4f& dst) { |
+ return src; |
+} |
+ |
+SkXfermodeProc4f SkXfermode::getProc4f() const { |
+ Mode mode; |
+ return this->asMode(&mode) ? GetProc4f(mode) : missing_proc4f; |
+} |
+ |
bool SkXfermode::ModeAsCoeff(Mode mode, Coeff* src, Coeff* dst) { |
SkASSERT(SK_ARRAY_COUNT(gProcCoeffs) == kModeCount); |