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

Unified Diff: src/gpu/effects/GrRRectEffect.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/GrOvalEffect.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrRRectEffect.cpp
diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp
index 0b492762c2ca8777393336b4ca6ae1a21be0eb74..44bd928d12f81a73312ad520fcd66a6b7518659d 100644
--- a/src/gpu/effects/GrRRectEffect.cpp
+++ b/src/gpu/effects/GrRRectEffect.cpp
@@ -129,7 +129,9 @@ const GrFragmentProcessor* CircularRRectEffect::TestCreate(GrProcessorTestData*
class GLCircularRRectEffect : public GrGLSLFragmentProcessor {
public:
- GLCircularRRectEffect(const GrProcessor&);
+ GLCircularRRectEffect() {
+ fPrevRRect.setEmpty();
+ }
virtual void emitCode(EmitArgs&) override;
@@ -145,10 +147,6 @@ private:
typedef GrGLSLFragmentProcessor INHERITED;
};
-GLCircularRRectEffect::GLCircularRRectEffect(const GrProcessor& ) {
- fPrevRRect.setEmpty();
-}
-
void GLCircularRRectEffect::emitCode(EmitArgs& args) {
const CircularRRectEffect& crre = args.fFp.cast<CircularRRectEffect>();
GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
@@ -382,7 +380,7 @@ void CircularRRectEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
}
GrGLSLFragmentProcessor* CircularRRectEffect::onCreateGLSLInstance() const {
- return new GLCircularRRectEffect(*this);
+ return new GLCircularRRectEffect;
}
//////////////////////////////////////////////////////////////////////////////
@@ -486,9 +484,11 @@ const GrFragmentProcessor* EllipticalRRectEffect::TestCreate(GrProcessorTestData
class GLEllipticalRRectEffect : public GrGLSLFragmentProcessor {
public:
- GLEllipticalRRectEffect(const GrProcessor&);
+ GLEllipticalRRectEffect() {
+ fPrevRRect.setEmpty();
+ }
- virtual void emitCode(EmitArgs&) override;
+ void emitCode(EmitArgs&) override;
static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*);
@@ -503,10 +503,6 @@ private:
typedef GrGLSLFragmentProcessor INHERITED;
};
-GLEllipticalRRectEffect::GLEllipticalRRectEffect(const GrProcessor& effect) {
- fPrevRRect.setEmpty();
-}
-
void GLEllipticalRRectEffect::emitCode(EmitArgs& args) {
const EllipticalRRectEffect& erre = args.fFp.cast<EllipticalRRectEffect>();
GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
@@ -679,7 +675,7 @@ void EllipticalRRectEffect::onGetGLSLProcessorKey(const GrGLSLCaps& caps,
}
GrGLSLFragmentProcessor* EllipticalRRectEffect::onCreateGLSLInstance() const {
- return new GLEllipticalRRectEffect(*this);
+ return new GLEllipticalRRectEffect;
}
//////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/gpu/effects/GrOvalEffect.cpp ('k') | src/gpu/effects/GrSimpleTextureEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698