Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(521)

Unified Diff: src/gpu/effects/GrConvexPolyEffect.cpp

Issue 1666773002: Clean up GrGLSLFragmentProcessor-derived classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrConvolutionEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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[])
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrConvolutionEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698