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

Unified Diff: experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp

Issue 1661143003: Next round of GrGLSLFragmentProcessor-derived class cleanup (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix overlength line 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 | « no previous file | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp
diff --git a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp
index 29391fc287f4c16ccaf72f116f9817df2f53afa9..8afbee0827bba8140f5a65d3649a0dbbb068f6b7 100644
--- a/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp
+++ b/experimental/SkPerlinNoiseShader2/SkPerlinNoiseShader2.cpp
@@ -610,9 +610,8 @@ void SkPerlinNoiseShader2::PerlinNoiseShaderContext::shadeSpan(
class GrGLPerlinNoise2 : public GrGLSLFragmentProcessor {
public:
GrGLPerlinNoise2(const GrProcessor&);
- virtual ~GrGLPerlinNoise2() {}
- virtual void emitCode(EmitArgs&) override;
+ void emitCode(EmitArgs&) override;
static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder* b);
@@ -1040,24 +1039,18 @@ void GrGLPerlinNoise2::onSetData(const GrGLSLProgramDataManager& pdman,
class GrGLImprovedPerlinNoise : public GrGLSLFragmentProcessor {
public:
- GrGLImprovedPerlinNoise(const GrProcessor&);
- virtual ~GrGLImprovedPerlinNoise() {}
+ void emitCode(EmitArgs&) override;
- virtual void emitCode(EmitArgs&) override;
-
- static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder* b);
+ static inline void GenKey(const GrProcessor&, const GrGLSLCaps&, GrProcessorKeyBuilder*);
protected:
void onSetData(const GrGLSLProgramDataManager&, const GrProcessor&) override;
private:
-
- SkScalar fZ;
GrGLSLProgramDataManager::UniformHandle fZUni;
GrGLSLProgramDataManager::UniformHandle fOctavesUni;
GrGLSLProgramDataManager::UniformHandle fBaseFrequencyUni;
-private:
typedef GrGLSLFragmentProcessor INHERITED;
};
@@ -1084,11 +1077,10 @@ public:
private:
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
- return new GrGLImprovedPerlinNoise(*this);
+ return new GrGLImprovedPerlinNoise;
}
- virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps,
- GrProcessorKeyBuilder* b) const override {
+ void onGetGLSLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) const override {
GrGLImprovedPerlinNoise::GenKey(*this, caps, b);
}
@@ -1153,10 +1145,6 @@ const GrFragmentProcessor* GrImprovedPerlinNoiseEffect::TestCreate(GrProcessorTe
kNone_SkFilterQuality);
}
-GrGLImprovedPerlinNoise::GrGLImprovedPerlinNoise(const GrProcessor& processor)
- : fZ(processor.cast<GrImprovedPerlinNoiseEffect>().z()) {
-}
-
void GrGLImprovedPerlinNoise::emitCode(EmitArgs& args) {
GrGLSLFragmentBuilder* fsBuilder = args.fFragBuilder;
GrGLSLUniformHandler* uniformHandler = args.fUniformHandler;
« no previous file with comments | « no previous file | src/effects/SkAlphaThresholdFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698