Chromium Code Reviews| Index: src/effects/SkArithmeticMode.cpp |
| diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp |
| index d86f73bee45b1510737ecd08614c7c2daeed50f6..4f93f3d6e93dfc362b9d4229d0db3e37cbd03063 100644 |
| --- a/src/effects/SkArithmeticMode.cpp |
| +++ b/src/effects/SkArithmeticMode.cpp |
| @@ -31,8 +31,10 @@ 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**, |
|
bsalomon
2015/01/14 18:07:43
can we one-line this guy?
|
| + GrTexture* background) const SK_OVERRIDE; |
| + |
| + bool asXPFactory(GrXPFactory**) const SK_OVERRIDE; |
| #endif |
| private: |
| @@ -246,6 +248,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) |