Index: src/gpu/effects/GrConvexPolyEffect.cpp |
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp |
index dc7a5285013eeaf1b0234e30c98147e00d77411a..f95d1a2fb3d1e060b4e0163924e6584fc34d277c 100644 |
--- a/src/gpu/effects/GrConvexPolyEffect.cpp |
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp |
@@ -81,9 +81,11 @@ const GrFragmentProcessor* AARectEffect::TestCreate(GrProcessorTestData* d) { |
class GLAARectEffect : public GrGLSLFragmentProcessor { |
public: |
- GLAARectEffect(const GrProcessor&); |
+ GLAARectEffect() { |
+ fPrevRect.fLeft = SK_ScalarNaN; |
+ } |
- virtual void emitCode(EmitArgs&) override; |
+ void emitCode(EmitArgs&) override; |
static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*); |
@@ -96,10 +98,6 @@ private: |
typedef GrGLSLFragmentProcessor INHERITED; |
}; |
-GLAARectEffect::GLAARectEffect(const GrProcessor& effect) { |
- fPrevRect.fLeft = SK_ScalarNaN; |
-} |
- |
void GLAARectEffect::emitCode(EmitArgs& args) { |
const AARectEffect& aare = args.fFp.cast<AARectEffect>(); |
const char *rectName; |
@@ -161,16 +159,18 @@ void AARectEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyB |
} |
GrGLSLFragmentProcessor* AARectEffect::onCreateGLSLInstance() const { |
- return new GLAARectEffect(*this); |
+ return new GLAARectEffect; |
} |
////////////////////////////////////////////////////////////////////////////// |
class GrGLConvexPolyEffect : public GrGLSLFragmentProcessor { |
public: |
- GrGLConvexPolyEffect(const GrProcessor&); |
+ GrGLConvexPolyEffect() { |
+ fPrevEdges[0] = SK_ScalarNaN; |
+ } |
- virtual void emitCode(EmitArgs&) override; |
+ void emitCode(EmitArgs&) override; |
static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*); |
@@ -183,10 +183,6 @@ private: |
typedef GrGLSLFragmentProcessor INHERITED; |
}; |
-GrGLConvexPolyEffect::GrGLConvexPolyEffect(const GrProcessor&) { |
- fPrevEdges[0] = SK_ScalarNaN; |
-} |
- |
void GrGLConvexPolyEffect::emitCode(EmitArgs& args) { |
const GrConvexPolyEffect& cpe = args.fFp.cast<GrConvexPolyEffect>(); |
@@ -309,7 +305,7 @@ void GrConvexPolyEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps, |
} |
GrGLSLFragmentProcessor* GrConvexPolyEffect::onCreateGLSLInstance() const { |
- return new GrGLConvexPolyEffect(*this); |
+ return new GrGLConvexPolyEffect; |
} |
GrConvexPolyEffect::GrConvexPolyEffect(GrPrimitiveEdgeType edgeType, int n, const SkScalar edges[]) |