aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkArithmeticMode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects/SkArithmeticMode.cpp')
-rw-r--r--src/effects/SkArithmeticMode.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index d86f73bee4..ae18c2770e 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -31,8 +31,9 @@ public:
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkArithmeticMode_scalar)
#if SK_SUPPORT_GPU
- virtual bool asFragmentProcessor(GrFragmentProcessor**,
- GrTexture* background) const SK_OVERRIDE;
+ bool asFragmentProcessor(GrFragmentProcessor**, GrTexture* background) const SK_OVERRIDE;
+
+ bool asXPFactory(GrXPFactory**) const SK_OVERRIDE;
#endif
private:
@@ -246,6 +247,17 @@ bool SkArithmeticMode_scalar::asFragmentProcessor(GrFragmentProcessor** fp,
return true;
}
+bool SkArithmeticMode_scalar::asXPFactory(GrXPFactory** xpf) const {
+ if (xpf) {
+ *xpf = GrArithmeticXPFactory::Create(SkScalarToFloat(fK[0]),
+ SkScalarToFloat(fK[1]),
+ SkScalarToFloat(fK[2]),
+ SkScalarToFloat(fK[3]),
+ fEnforcePMColor);
+ }
+ return true;
+}
+
#endif
SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode)