replace 4f procs with pipeline (only called in 2 places by ganesh)
enables lots of code to delete
CQ_INCLUDE_TRYBOTS=skia.primary:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD
Bug: skia:
Change-Id: I13631ead68a9232bd8c13c5ef54727f44def26ca
Reviewed-on: https://skia-review.googlesource.com/19278
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
index 8779c55..f034938 100644
--- a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
+++ b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
@@ -143,8 +143,8 @@
GrColor4f dstColor = ConstantOutputForConstantInput(this->childProcessor(1), input);
SkPM4f src = GrColor4fToSkPM4f(srcColor);
SkPM4f dst = GrColor4fToSkPM4f(dstColor);
- auto proc = SkXfermode::GetProc4f(fMode);
- return SkPM4fToGrColor4f(proc(src, dst)).mulByScalar(alpha);
+ SkPM4f res = SkBlendMode_Apply(fMode, src, dst);
+ return SkPM4fToGrColor4f(res).mulByScalar(alpha);
}
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
@@ -391,8 +391,8 @@
src = GrColor4fToSkPM4f(inputColor);
dst = GrColor4fToSkPM4f(childColor);
}
- auto proc = SkXfermode::GetProc4f(fMode);
- return SkPM4fToGrColor4f(proc(src, dst));
+ SkPM4f res = SkBlendMode_Apply(fMode, src, dst);
+ return SkPM4fToGrColor4f(res);
}
private: