| Index: src/effects/SkArithmeticMode.cpp
|
| diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
|
| index d1e7472f06e6d73776e67f9547d2ca175c268af4..47b8468ad7181a50abfd19e3444138f9128317ee 100644
|
| --- a/src/effects/SkArithmeticMode.cpp
|
| +++ b/src/effects/SkArithmeticMode.cpp
|
| @@ -17,7 +17,6 @@
|
| #include "GrInvariantOutput.h"
|
| #include "gl/GrGLProcessor.h"
|
| #include "gl/builders/GrGLProgramBuilder.h"
|
| -#include "GrTBackendProcessorFactory.h"
|
| #endif
|
|
|
| static const bool gUseUnpremul = false;
|
| @@ -241,7 +240,7 @@ SkXfermode* SkArithmeticMode::Create(SkScalar k1, SkScalar k2,
|
|
|
| class GrGLArithmeticEffect : public GrGLFragmentProcessor {
|
| public:
|
| - GrGLArithmeticEffect(const GrBackendProcessorFactory&, const GrProcessor&);
|
| + GrGLArithmeticEffect(const GrProcessor&);
|
| virtual ~GrGLArithmeticEffect();
|
|
|
| virtual void emitCode(GrGLFPBuilder*,
|
| @@ -273,10 +272,22 @@ public:
|
|
|
| virtual ~GrArithmeticEffect();
|
|
|
| - virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE;
|
| + virtual const char* name() const SK_OVERRIDE { return "Arithmetic"; }
|
| +
|
| + virtual void getGLProcessorKey(const GrGLCaps& caps,
|
| + GrProcessorKeyBuilder* b) const SK_OVERRIDE {
|
| + GrGLArithmeticEffect::GenKey(*this, caps, b);
|
| + }
|
| +
|
| + virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE {
|
| + return SkNEW_ARGS(GrGLArithmeticEffect, (*this));
|
| + }
|
| +
|
| + virtual uint32_t classID() const {
|
| + static uint32_t id = GenClassID();
|
| + return id;
|
| + }
|
|
|
| - typedef GrGLArithmeticEffect GLProcessor;
|
| - static const char* Name() { return "Arithmetic"; }
|
| GrTexture* backgroundTexture() const { return fBackgroundAccess.getTexture(); }
|
|
|
| float k1() const { return fK1; }
|
| @@ -329,10 +340,6 @@ bool GrArithmeticEffect::onIsEqual(const GrFragmentProcessor& sBase) const {
|
| fEnforcePMColor == s.fEnforcePMColor;
|
| }
|
|
|
| -const GrBackendFragmentProcessorFactory& GrArithmeticEffect::getFactory() const {
|
| - return GrTBackendFragmentProcessorFactory<GrArithmeticEffect>::getInstance();
|
| -}
|
| -
|
| void GrArithmeticEffect::onComputeInvariantOutput(GrInvariantOutput* inout) const {
|
| // TODO: optimize this
|
| inout->setToUnknown(GrInvariantOutput::kWill_ReadInput);
|
| @@ -340,10 +347,8 @@ void GrArithmeticEffect::onComputeInvariantOutput(GrInvariantOutput* inout) cons
|
|
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| -GrGLArithmeticEffect::GrGLArithmeticEffect(const GrBackendProcessorFactory& factory,
|
| - const GrProcessor&)
|
| - : INHERITED(factory),
|
| - fEnforcePMColor(true) {
|
| +GrGLArithmeticEffect::GrGLArithmeticEffect(const GrProcessor&)
|
| + : fEnforcePMColor(true) {
|
| }
|
|
|
| GrGLArithmeticEffect::~GrGLArithmeticEffect() {
|
|
|