aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-25 14:11:03 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-10-25 14:11:03 +0000
commit422e81aeb1f4078367c85efe591c7df8c33874ec (patch)
treecd9fa07274d6b4b43aa9d563fee611cde61c26b3
parent2ad1d6189fa2bee8aef7e2625b49ab425fbb9b4a (diff)
GrGLProgramStage Renaming Part 3
s/GLProgramStage/GLEffect minor whitespace/spelling fixup R=robertphillips@google.com Review URL: https://codereview.appspot.com/6767054 git-svn-id: http://skia.googlecode.com/svn/trunk@6095 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--include/gpu/GrEffect.h13
-rw-r--r--include/gpu/GrProgramStageFactory.h10
-rw-r--r--src/effects/SkBlendImageFilter.cpp2
-rw-r--r--src/effects/SkColorMatrixFilter.cpp6
-rw-r--r--src/effects/SkLightingImageFilter.cpp4
-rw-r--r--src/effects/SkMagnifierImageFilter.cpp2
-rw-r--r--src/effects/SkMatrixConvolutionImageFilter.cpp2
-rw-r--r--src/effects/SkMorphologyImageFilter.cpp2
-rw-r--r--src/effects/SkTableColorFilter.cpp2
-rw-r--r--src/effects/gradients/SkLinearGradient.cpp2
-rw-r--r--src/effects/gradients/SkRadialGradient.cpp2
-rw-r--r--src/effects/gradients/SkSweepGradient.cpp2
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient.cpp2
-rw-r--r--src/effects/gradients/SkTwoPointRadialGradient.cpp2
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.h2
-rw-r--r--src/gpu/effects/GrConvolutionEffect.h2
-rw-r--r--src/gpu/effects/GrSingleTextureEffect.h2
-rw-r--r--src/gpu/effects/GrTextureDomainEffect.h2
-rw-r--r--src/gpu/gl/GrGLEffect.h6
-rw-r--r--src/gpu/gl/GrGLShaderBuilder.h2
20 files changed, 34 insertions, 35 deletions
diff --git a/include/gpu/GrEffect.h b/include/gpu/GrEffect.h
index 7f97e9250d..65034a6ac6 100644
--- a/include/gpu/GrEffect.h
+++ b/include/gpu/GrEffect.h
@@ -42,12 +42,11 @@ public:
effect guaranteed to produce an opaque output? */
virtual bool isOpaque(bool inputTextureIsOpaque) const;
- /** This object, besides creating back-end-specific helper
- objects, is used for run-time-type-identification. The factory should be
- an instance of templated class, GrTProgramStageFactory. It is templated
- on the subclass of GrEffect. The subclass must have a nested type
- (or typedef) named GLProgramStage which will be the subclass of
- GrGLEffect created by the factory.
+ /** This object, besides creating back-end-specific helper objects, is used for run-time-type-
+ identification. The factory should be an instance of templated class,
+ GrTProgramStageFactory. It is templated on the subclass of GrEffect. The subclass must have
+ a nested type (or typedef) named GLEffect which will be the subclass of GrGLEffect created
+ by the factory.
Example:
class MyCustomEffect : public GrEffect {
@@ -73,7 +72,7 @@ public:
The default implementation of this function returns true iff
the two stages have the same return value for numTextures() and
- for texture() over all valid indicse.
+ for texture() over all valid indices.
*/
virtual bool isEqual(const GrEffect&) const;
diff --git a/include/gpu/GrProgramStageFactory.h b/include/gpu/GrProgramStageFactory.h
index 96505d6c11..b95aa6ae3c 100644
--- a/include/gpu/GrProgramStageFactory.h
+++ b/include/gpu/GrProgramStageFactory.h
@@ -69,7 +69,7 @@ template <typename EffectClass>
class GrTProgramStageFactory : public GrProgramStageFactory {
public:
- typedef typename EffectClass::GLProgramStage GLProgramStage;
+ typedef typename EffectClass::GLEffect GLEffect;
/** Returns a human-readable name that is accessible via GrEffect or
GrGLEffect and is consistent between the two of them.
@@ -83,8 +83,8 @@ public:
GLSL code generation. */
virtual StageKey glStageKey(const GrEffect& effect, const GrGLCaps& caps) const SK_OVERRIDE {
GrAssert(kIllegalEffectClassID != fEffectClassID);
- StageKey stageID = GLProgramStage::GenKey(effect, caps);
- StageKey textureKey = GLProgramStage::GenTextureKey(effect, caps);
+ StageKey stageID = GLEffect::GenKey(effect, caps);
+ StageKey textureKey = GLEffect::GenTextureKey(effect, caps);
#if GR_DEBUG
static const StageKey kIllegalIDMask = (uint16_t) (~((1U << kProgramStageKeyBits) - 1));
GrAssert(!(kIllegalIDMask & stageID));
@@ -99,8 +99,8 @@ public:
/** Returns a new instance of the appropriate *GL* implementation class
for the given GrEffect; caller is responsible for deleting
the object. */
- virtual GLProgramStage* createGLInstance(const GrEffect& effect) const SK_OVERRIDE {
- return SkNEW_ARGS(GLProgramStage, (*this, effect));
+ virtual GLEffect* createGLInstance(const GrEffect& effect) const SK_OVERRIDE {
+ return SkNEW_ARGS(GLEffect, (*this, effect));
}
/** This class is a singleton. This function returns the single instance.
diff --git a/src/effects/SkBlendImageFilter.cpp b/src/effects/SkBlendImageFilter.cpp
index 9722684c65..60f334ab7b 100644
--- a/src/effects/SkBlendImageFilter.cpp
+++ b/src/effects/SkBlendImageFilter.cpp
@@ -142,7 +142,7 @@ public:
const GrProgramStageFactory& getFactory() const;
SkBlendImageFilter::Mode mode() const { return fMode; }
- typedef GrGLBlendEffect GLProgramStage;
+ typedef GrGLBlendEffect GLEffect;
static const char* Name() { return "Blend"; }
private:
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index b7d479a821..ae9cfb0056 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -339,13 +339,13 @@ public:
GR_DECLARE_EFFECT_TEST;
- class GLProgramStage : public GrGLLegacyEffect {
+ class GLEffect : public GrGLLegacyEffect {
public:
// this class always generates the same code.
static StageKey GenKey(const GrEffect& s, const GrGLCaps&) { return 0; }
- GLProgramStage(const GrProgramStageFactory& factory,
- const GrEffect& effect)
+ GLEffect(const GrProgramStageFactory& factory,
+ const GrEffect& effect)
: INHERITED(factory)
, fMatrixHandle(GrGLUniformManager::kInvalidUniformHandle)
, fVectorHandle(GrGLUniformManager::kInvalidUniformHandle) {
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 53a3ac9b58..67403bc5e4 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -326,7 +326,7 @@ public:
static const char* Name() { return "DiffuseLighting"; }
- typedef GrGLDiffuseLightingEffect GLProgramStage;
+ typedef GrGLDiffuseLightingEffect GLEffect;
virtual const GrProgramStageFactory& getFactory() const SK_OVERRIDE;
virtual bool isEqual(const GrEffect&) const SK_OVERRIDE;
@@ -347,7 +347,7 @@ public:
static const char* Name() { return "SpecularLighting"; }
- typedef GrGLSpecularLightingEffect GLProgramStage;
+ typedef GrGLSpecularLightingEffect GLEffect;
virtual const GrProgramStageFactory& getFactory() const SK_OVERRIDE;
virtual bool isEqual(const GrEffect&) const SK_OVERRIDE;
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index 93ec733f9f..187fbe7991 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -54,7 +54,7 @@ public:
float x_inset() const { return fXInset; }
float y_inset() const { return fYInset; }
- typedef GrGLMagnifierEffect GLProgramStage;
+ typedef GrGLMagnifierEffect GLEffect;
private:
GR_DECLARE_EFFECT_TEST;
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp
index b96d556d34..607d8c8feb 100644
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp
@@ -260,7 +260,7 @@ public:
TileMode tileMode() const { return fTileMode; }
bool convolveAlpha() const { return fConvolveAlpha; }
- typedef GrGLMatrixConvolutionEffect GLProgramStage;
+ typedef GrGLMatrixConvolutionEffect GLEffect;
virtual const GrProgramStageFactory& getFactory() const SK_OVERRIDE;
virtual bool isEqual(const GrEffect&) const SK_OVERRIDE;
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index bc5bf46453..8eaf86a152 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -249,7 +249,7 @@ public:
static const char* Name() { return "Morphology"; }
- typedef GrGLMorphologyEffect GLProgramStage;
+ typedef GrGLMorphologyEffect GLEffect;
virtual const GrProgramStageFactory& getFactory() const SK_OVERRIDE;
virtual bool isEqual(const GrEffect&) const SK_OVERRIDE;
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index 09c3ec1a59..39e37621e9 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -234,7 +234,7 @@ public:
virtual const GrTextureAccess& textureAccess(int index) const SK_OVERRIDE;
- typedef GLColorTableEffect GLProgramStage;
+ typedef GLColorTableEffect GLEffect;
private:
GR_DECLARE_EFFECT_TEST;
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 019dcbcd93..26079c3b27 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -512,7 +512,7 @@ public:
return GrTProgramStageFactory<GrLinearGradient>::getInstance();
}
- typedef GrGLLinearGradient GLProgramStage;
+ typedef GrGLLinearGradient GLEffect;
private:
GR_DECLARE_EFFECT_TEST;
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index 04deeba686..6cbc412c43 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -511,7 +511,7 @@ public:
return GrTProgramStageFactory<GrRadialGradient>::getInstance();
}
- typedef GrGLRadialGradient GLProgramStage;
+ typedef GrGLRadialGradient GLEffect;
private:
GR_DECLARE_EFFECT_TEST;
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index 4f63f64027..4b7ea8822b 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -419,7 +419,7 @@ public:
return GrTProgramStageFactory<GrSweepGradient>::getInstance();
}
- typedef GrGLSweepGradient GLProgramStage;
+ typedef GrGLSweepGradient GLEffect;
private:
GR_DECLARE_EFFECT_TEST;
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 13f3dbb7f1..e1a7cf5f97 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -395,7 +395,7 @@ public:
GrScalar diffRadius() const { return fDiffRadius; }
GrScalar radius() const { return fRadius0; }
- typedef GrGLConical2Gradient GLProgramStage;
+ typedef GrGLConical2Gradient GLEffect;
private:
GR_DECLARE_EFFECT_TEST;
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
index d7651ff594..adca94f17e 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
+++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
@@ -427,7 +427,7 @@ public:
GrScalar radius() const { return fRadius0; }
bool isPosRoot() const { return SkToBool(fPosRoot); }
- typedef GrGLRadial2Gradient GLProgramStage;
+ typedef GrGLRadial2Gradient GLEffect;
private:
GR_DECLARE_EFFECT_TEST;
diff --git a/src/gpu/effects/GrConfigConversionEffect.h b/src/gpu/effects/GrConfigConversionEffect.h
index 511f59541f..9a014353f6 100644
--- a/src/gpu/effects/GrConfigConversionEffect.h
+++ b/src/gpu/effects/GrConfigConversionEffect.h
@@ -39,7 +39,7 @@ public:
PMConversion pmConversion = kNone_PMConversion);
static const char* Name() { return "Config Conversion"; }
- typedef GrGLConfigConversionEffect GLProgramStage;
+ typedef GrGLConfigConversionEffect GLEffect;
virtual const GrProgramStageFactory& getFactory() const SK_OVERRIDE;
virtual bool isEqual(const GrEffect&) const SK_OVERRIDE;
diff --git a/src/gpu/effects/GrConvolutionEffect.h b/src/gpu/effects/GrConvolutionEffect.h
index 7f2ead5f4a..a719c77517 100644
--- a/src/gpu/effects/GrConvolutionEffect.h
+++ b/src/gpu/effects/GrConvolutionEffect.h
@@ -34,7 +34,7 @@ public:
static const char* Name() { return "Convolution"; }
- typedef GrGLConvolutionEffect GLProgramStage;
+ typedef GrGLConvolutionEffect GLEffect;
virtual const GrProgramStageFactory& getFactory() const SK_OVERRIDE;
virtual bool isEqual(const GrEffect&) const SK_OVERRIDE;
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index 230bf5be1b..64066bfaaa 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -32,7 +32,7 @@ public:
static const char* Name() { return "Single Texture"; }
- typedef GrGLSingleTextureEffect GLProgramStage;
+ typedef GrGLSingleTextureEffect GLEffect;
virtual const GrProgramStageFactory& getFactory() const SK_OVERRIDE;
diff --git a/src/gpu/effects/GrTextureDomainEffect.h b/src/gpu/effects/GrTextureDomainEffect.h
index e045ab1556..520e90fdf7 100644
--- a/src/gpu/effects/GrTextureDomainEffect.h
+++ b/src/gpu/effects/GrTextureDomainEffect.h
@@ -28,7 +28,7 @@ public:
static const char* Name() { return "TextureDomain"; }
- typedef GrGLTextureDomainEffect GLProgramStage;
+ typedef GrGLTextureDomainEffect GLEffect;
virtual const GrProgramStageFactory& getFactory() const SK_OVERRIDE;
virtual bool isEqual(const GrEffect&) const SK_OVERRIDE;
diff --git a/src/gpu/gl/GrGLEffect.h b/src/gpu/gl/GrGLEffect.h
index 06dfad7148..5ac4f3c19c 100644
--- a/src/gpu/gl/GrGLEffect.h
+++ b/src/gpu/gl/GrGLEffect.h
@@ -5,8 +5,8 @@
* found in the LICENSE file.
*/
-#ifndef GrGLProgramStage_DEFINED
-#define GrGLProgramStage_DEFINED
+#ifndef GrGLEffect_DEFINED
+#define GrGLEffect_DEFINED
#include "GrAllocator.h"
#include "GrEffect.h"
@@ -25,7 +25,7 @@ class GrGLTexture;
must have a function:
static inline StageKey GenKey(const GrEffect&, const GrGLCaps&)
that is used to implement a program cache. When two GrEffects produce the same key this means
- that their GrGLProgramStages would emit the same GLSL code.
+ that their GrGLEffects would emit the same GLSL code.
These objects are created by the factory object returned by the GrEffect::getFactory().
*/
diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h
index cb382474b8..d60f33f7a3 100644
--- a/src/gpu/gl/GrGLShaderBuilder.h
+++ b/src/gpu/gl/GrGLShaderBuilder.h
@@ -23,7 +23,7 @@ class GrGLContextInfo;
class GrGLShaderBuilder {
public:
/**
- * Used by GrGLProgramStages to add texture reads to their shader code.
+ * Used by GrGLEffects to add texture reads to their shader code.
*/
class TextureSampler {
public: