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

Unified Diff: src/gpu/effects/GrOvalEffect.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/GrMatrixConvolutionEffect.cpp ('k') | src/gpu/effects/GrRRectEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrOvalEffect.cpp
diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp
index c7e685f9022a9077eaf0e8278e7322017b243eaf..150b5b3718d1417c30040c876120614377e6eebb 100644
--- a/src/gpu/effects/GrOvalEffect.cpp
+++ b/src/gpu/effects/GrOvalEffect.cpp
@@ -93,7 +93,7 @@ const GrFragmentProcessor* CircleEffect::TestCreate(GrProcessorTestData* d) {
class GLCircleEffect : public GrGLSLFragmentProcessor {
public:
- GLCircleEffect(const GrProcessor&);
+ GLCircleEffect() : fPrevRadius(-1.0f) { }
virtual void emitCode(EmitArgs&) override;
@@ -110,10 +110,6 @@ private:
typedef GrGLSLFragmentProcessor INHERITED;
};
-GLCircleEffect::GLCircleEffect(const GrProcessor&) {
- fPrevRadius = -1.f;
-}
-
void GLCircleEffect::emitCode(EmitArgs& args) {
const CircleEffect& ce = args.fFp.cast<CircleEffect>();
const char *circleName;
@@ -180,7 +176,7 @@ void CircleEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
}
GrGLSLFragmentProcessor* CircleEffect::onCreateGLSLInstance() const {
- return new GLCircleEffect(*this);
+ return new GLCircleEffect;
}
//////////////////////////////////////////////////////////////////////////////
@@ -265,9 +261,11 @@ const GrFragmentProcessor* EllipseEffect::TestCreate(GrProcessorTestData* d) {
class GLEllipseEffect : public GrGLSLFragmentProcessor {
public:
- GLEllipseEffect(const GrProcessor&);
+ GLEllipseEffect() {
+ fPrevRadii.fX = -1.0f;
+ }
- virtual void emitCode(EmitArgs&) override;
+ void emitCode(EmitArgs&) override;
static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*);
@@ -283,10 +281,6 @@ private:
typedef GrGLSLFragmentProcessor INHERITED;
};
-GLEllipseEffect::GLEllipseEffect(const GrProcessor& effect) {
- fPrevRadii.fX = -1.f;
-}
-
void GLEllipseEffect::emitCode(EmitArgs& args) {
const EllipseEffect& ee = args.fFp.cast<EllipseEffect>();
const char *ellipseName;
@@ -392,7 +386,7 @@ void EllipseEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
}
GrGLSLFragmentProcessor* EllipseEffect::onCreateGLSLInstance() const {
- return new GLEllipseEffect(*this);
+ return new GLEllipseEffect;
}
//////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/gpu/effects/GrMatrixConvolutionEffect.cpp ('k') | src/gpu/effects/GrRRectEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698