GrCustomStage Renaming Part 3

Rename all things *CUSTOM_STAGE*, customStage*, and other miscellany

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6769048

git-svn-id: http://skia.googlecode.com/svn/trunk@6081 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index 77f9996..cd7f155 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -337,7 +337,7 @@
         return cme.fMatrix == fMatrix;
     }
 
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     class GLProgramStage : public GrGLLegacyProgramStage {
     public:
@@ -412,7 +412,7 @@
     typedef GrGLLegacyProgramStage INHERITED;
 };
 
-GR_DEFINE_CUSTOM_STAGE_TEST(ColorMatrixEffect);
+GR_DEFINE_EFFECT_TEST(ColorMatrixEffect);
 
 GrEffect* ColorMatrixEffect::TestCreate(SkRandom* random,
                                         GrContext*,
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index ab962fb..267ce99 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -332,7 +332,7 @@
     virtual bool isEqual(const GrEffect&) const SK_OVERRIDE;
     SkScalar kd() const { return fKD; }
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
     typedef GrLightingEffect INHERITED;
     SkScalar fKD;
 };
@@ -355,7 +355,7 @@
     SkScalar shininess() const { return fShininess; }
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
     typedef GrLightingEffect INHERITED;
     SkScalar fKS;
     SkScalar fShininess;
@@ -1038,7 +1038,7 @@
             this->kd() == s.kd();
 }
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrDiffuseLightingEffect);
+GR_DEFINE_EFFECT_TEST(GrDiffuseLightingEffect);
 
 GrEffect* GrDiffuseLightingEffect::TestCreate(SkRandom* random,
                                               GrContext* context,
@@ -1244,7 +1244,7 @@
            this->shininess() == s.shininess();
 }
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrSpecularLightingEffect);
+GR_DEFINE_EFFECT_TEST(GrSpecularLightingEffect);
 
 GrEffect* GrSpecularLightingEffect::TestCreate(SkRandom* random,
                                                GrContext* context,
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index 5ce00e9..c25e951 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -57,7 +57,7 @@
     typedef GrGLMagnifierEffect GLProgramStage;
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     float fXOffset;
     float fYOffset;
@@ -181,7 +181,7 @@
 
 /////////////////////////////////////////////////////////////////////
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrMagnifierEffect);
+GR_DEFINE_EFFECT_TEST(GrMagnifierEffect);
 
 GrEffect* GrMagnifierEffect::TestCreate(SkRandom* random,
                                         GrContext* context,
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp
index 2f6d71c..988c901 100644
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp
@@ -274,7 +274,7 @@
     TileMode fTileMode;
     bool     fConvolveAlpha;
 
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     typedef GrSingleTextureEffect INHERITED;
 };
@@ -486,7 +486,7 @@
            fConvolveAlpha == s.convolveAlpha();
 }
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrMatrixConvolutionEffect);
+GR_DEFINE_EFFECT_TEST(GrMatrixConvolutionEffect);
 
 // A little bit less than the minimum # uniforms required by DX9SM2 (32).
 // Allows for a 5x5 kernel (or 25x1, for that matter).
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index fb82f4f..8df5def 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -259,7 +259,7 @@
     MorphologyType fType;
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     typedef Gr1DKernelEffect INHERITED;
 };
@@ -398,7 +398,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrMorphologyEffect);
+GR_DEFINE_EFFECT_TEST(GrMorphologyEffect);
 
 GrEffect* GrMorphologyEffect::TestCreate(SkRandom* random,
                                          GrContext* context,
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index cbbf7e1..1412952 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -237,7 +237,7 @@
     typedef GLColorTableEffect GLProgramStage;
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     GrTextureAccess fTextureAccess;
 
@@ -342,7 +342,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GR_DEFINE_CUSTOM_STAGE_TEST(ColorTableEffect);
+GR_DEFINE_EFFECT_TEST(ColorTableEffect);
 
 GrEffect* ColorTableEffect::TestCreate(SkRandom* random,
                                        GrContext* context,
diff --git a/src/effects/gradients/SkLinearGradient.cpp b/src/effects/gradients/SkLinearGradient.cpp
index 21b415d..2de4fc6 100644
--- a/src/effects/gradients/SkLinearGradient.cpp
+++ b/src/effects/gradients/SkLinearGradient.cpp
@@ -515,14 +515,14 @@
     typedef GrGLLinearGradient GLProgramStage;
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     typedef GrGradientEffect INHERITED;
 };
 
 /////////////////////////////////////////////////////////////////////
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrLinearGradient);
+GR_DEFINE_EFFECT_TEST(GrLinearGradient);
 
 GrEffect* GrLinearGradient::TestCreate(SkRandom* random,
                                        GrContext* context,
diff --git a/src/effects/gradients/SkRadialGradient.cpp b/src/effects/gradients/SkRadialGradient.cpp
index 74d16d5..dbf5e7e 100644
--- a/src/effects/gradients/SkRadialGradient.cpp
+++ b/src/effects/gradients/SkRadialGradient.cpp
@@ -514,14 +514,14 @@
     typedef GrGLRadialGradient GLProgramStage;
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     typedef GrGradientEffect INHERITED;
 };
 
 /////////////////////////////////////////////////////////////////////
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrRadialGradient);
+GR_DEFINE_EFFECT_TEST(GrRadialGradient);
 
 GrEffect* GrRadialGradient::TestCreate(SkRandom* random,
                                        GrContext* context,
diff --git a/src/effects/gradients/SkSweepGradient.cpp b/src/effects/gradients/SkSweepGradient.cpp
index 365507b..11e1a78 100644
--- a/src/effects/gradients/SkSweepGradient.cpp
+++ b/src/effects/gradients/SkSweepGradient.cpp
@@ -422,14 +422,14 @@
     typedef GrGLSweepGradient GLProgramStage;
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     typedef GrGradientEffect INHERITED;
 };
 
 /////////////////////////////////////////////////////////////////////
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrSweepGradient);
+GR_DEFINE_EFFECT_TEST(GrSweepGradient);
 
 GrEffect* GrSweepGradient::TestCreate(SkRandom* random,
                                       GrContext* context,
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 4472d03..4e85c73 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -398,7 +398,7 @@
     typedef GrGLConical2Gradient GLProgramStage;
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     // @{
     // Cache of values - these can change arbitrarily, EXCEPT
@@ -413,7 +413,7 @@
     typedef GrGradientEffect INHERITED;
 };
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrConical2Gradient);
+GR_DEFINE_EFFECT_TEST(GrConical2Gradient);
 
 GrEffect* GrConical2Gradient::TestCreate(SkRandom* random,
                                          GrContext* context,
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
index 78220f8..d4ce9fa 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
+++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
@@ -430,7 +430,7 @@
     typedef GrGLRadial2Gradient GLProgramStage;
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     // @{
     // Cache of values - these can change arbitrarily, EXCEPT
@@ -447,7 +447,7 @@
 
 /////////////////////////////////////////////////////////////////////
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrRadial2Gradient);
+GR_DEFINE_EFFECT_TEST(GrRadial2Gradient);
 
 GrEffect* GrRadial2Gradient::TestCreate(SkRandom* random,
                                         GrContext* context,
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index f8db4a5..330ae66 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -195,15 +195,15 @@
     }
     void createTextureEffect(int stage, GrTexture* texture, const GrMatrix& matrix) {
         GrAssert(!this->getSampler(stage).getEffect());
-        GrEffect* customStage = SkNEW_ARGS(GrSingleTextureEffect, (texture));
-        this->sampler(stage)->setEffect(customStage, matrix)->unref();
+        GrEffect* effect = SkNEW_ARGS(GrSingleTextureEffect, (texture));
+        this->sampler(stage)->setEffect(effect, matrix)->unref();
     }
     void createTextureEffect(int stage, GrTexture* texture,
                              const GrMatrix& matrix,
                              const GrTextureParams& params) {
         GrAssert(!this->getSampler(stage).getEffect());
-        GrEffect* customStage = SkNEW_ARGS(GrSingleTextureEffect, (texture, params));
-        this->sampler(stage)->setEffect(customStage, matrix)->unref();
+        GrEffect* effect = SkNEW_ARGS(GrSingleTextureEffect, (texture, params));
+        this->sampler(stage)->setEffect(effect, matrix)->unref();
     }
 
 
@@ -221,8 +221,7 @@
     }
 
     /**
-     * Release all the textures and custom stages referred to by this
-     * draw state.
+     * Release all the GrEffects referred to by this draw state.
      */
     void disableStages() {
         for (int i = 0; i < kNumStages; ++i) {
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index b87089c..eae8ce8 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1444,11 +1444,11 @@
 
 namespace {
 
-void apply_custom_stage(GrContext* context,
-                        GrTexture* srcTexture,
-                        GrTexture* dstTexture,
-                        const GrRect& rect,
-                        GrEffect* stage) {
+void apply_effect(GrContext* context,
+                  GrTexture* srcTexture,
+                  GrTexture* dstTexture,
+                  const GrRect& rect,
+                  GrEffect* effect) {
     SkASSERT(srcTexture && srcTexture->getContext() == context);
     GrContext::AutoMatrix am;
     am.setIdentity(context);
@@ -1458,7 +1458,7 @@
     GrMatrix sampleM;
     sampleM.setIDiv(srcTexture->width(), srcTexture->height());
     GrPaint paint;
-    paint.colorSampler(0)->setEffect(stage, sampleM);
+    paint.colorSampler(0)->setEffect(effect, sampleM);
     context->drawRect(paint, rect);
 }
 
@@ -1484,7 +1484,7 @@
         texture = filter->onFilterImageGPU(&proxy, texture, rect);
     } else if (filter->asNewCustomStage(&stage, texture)) {
         GrAutoScratchTexture dst(context, desc);
-        apply_custom_stage(context, texture, dst.texture(), rect, stage);
+        apply_effect(context, texture, dst.texture(), rect, stage);
         texture = dst.detach();
         stage->unref();
     }
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 1502905..beb6107 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -96,7 +96,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrConfigConversionEffect);
+GR_DEFINE_EFFECT_TEST(GrConfigConversionEffect);
 
 GrEffect* GrConfigConversionEffect::TestCreate(SkRandom* random,
                                                GrContext* context,
diff --git a/src/gpu/effects/GrConfigConversionEffect.h b/src/gpu/effects/GrConfigConversionEffect.h
index fb2c770..511f595 100644
--- a/src/gpu/effects/GrConfigConversionEffect.h
+++ b/src/gpu/effects/GrConfigConversionEffect.h
@@ -64,7 +64,7 @@
     bool            fSwapRedAndBlue;
     PMConversion    fPMConversion;
 
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     typedef GrSingleTextureEffect INHERITED;
 };
diff --git a/src/gpu/effects/GrConvolutionEffect.cpp b/src/gpu/effects/GrConvolutionEffect.cpp
index 392475f..32086ca 100644
--- a/src/gpu/effects/GrConvolutionEffect.cpp
+++ b/src/gpu/effects/GrConvolutionEffect.cpp
@@ -172,7 +172,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrConvolutionEffect);
+GR_DEFINE_EFFECT_TEST(GrConvolutionEffect);
 
 GrEffect* GrConvolutionEffect::TestCreate(SkRandom* random,
                                           GrContext* context,
diff --git a/src/gpu/effects/GrConvolutionEffect.h b/src/gpu/effects/GrConvolutionEffect.h
index 5063994..7f2ead5 100644
--- a/src/gpu/effects/GrConvolutionEffect.h
+++ b/src/gpu/effects/GrConvolutionEffect.h
@@ -55,7 +55,7 @@
     float fKernel[kMaxKernelWidth];
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     typedef Gr1DKernelEffect INHERITED;
 };
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp
index 2f8801c..7717f6a 100644
--- a/src/gpu/effects/GrSingleTextureEffect.cpp
+++ b/src/gpu/effects/GrSingleTextureEffect.cpp
@@ -66,7 +66,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrSingleTextureEffect);
+GR_DEFINE_EFFECT_TEST(GrSingleTextureEffect);
 
 GrEffect* GrSingleTextureEffect::TestCreate(SkRandom* random,
                                             GrContext* context,
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index 92ab92a..230bf5b 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -37,7 +37,7 @@
     virtual const GrProgramStageFactory& getFactory() const SK_OVERRIDE;
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     GrTextureAccess fTextureAccess;
 
diff --git a/src/gpu/effects/GrTextureDomainEffect.cpp b/src/gpu/effects/GrTextureDomainEffect.cpp
index 1319814..fb0bcff 100644
--- a/src/gpu/effects/GrTextureDomainEffect.cpp
+++ b/src/gpu/effects/GrTextureDomainEffect.cpp
@@ -112,7 +112,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GR_DEFINE_CUSTOM_STAGE_TEST(GrTextureDomainEffect);
+GR_DEFINE_EFFECT_TEST(GrTextureDomainEffect);
 
 GrEffect* GrTextureDomainEffect::TestCreate(SkRandom* random,
                                             GrContext* context,
diff --git a/src/gpu/effects/GrTextureDomainEffect.h b/src/gpu/effects/GrTextureDomainEffect.h
index 64a6466..e045ab1 100644
--- a/src/gpu/effects/GrTextureDomainEffect.h
+++ b/src/gpu/effects/GrTextureDomainEffect.h
@@ -40,7 +40,7 @@
     GrRect fTextureDomain;
 
 private:
-    GR_DECLARE_CUSTOM_STAGE_TEST;
+    GR_DECLARE_EFFECT_TEST;
 
     typedef GrSingleTextureEffect INHERITED;
 };
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 08e58e8..5549e58 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -53,8 +53,8 @@
 
 GrGLProgram* GrGLProgram::Create(const GrGLContextInfo& gl,
                                  const Desc& desc,
-                                 const GrEffect** customStages) {
-    GrGLProgram* program = SkNEW_ARGS(GrGLProgram, (gl, desc, customStages));
+                                 const GrEffect** effects) {
+    GrGLProgram* program = SkNEW_ARGS(GrGLProgram, (gl, desc, effects));
     if (!program->succeeded()) {
         delete program;
         program = NULL;
@@ -64,7 +64,7 @@
 
 GrGLProgram::GrGLProgram(const GrGLContextInfo& gl,
                          const Desc& desc,
-                         const GrEffect** customStages)
+                         const GrEffect** effects)
 : fContextInfo(gl)
 , fUniformManager(gl) {
     fDesc = desc;
@@ -86,7 +86,7 @@
         fTextureOrientation[s] = GrGLTexture::kBottomUp_Orientation;
     }
 
-    this->genProgram(customStages);
+    this->genProgram(effects);
 }
 
 GrGLProgram::~GrGLProgram() {
@@ -500,7 +500,7 @@
     return true;
 }
 
-bool GrGLProgram::genProgram(const GrEffect** customStages) {
+bool GrGLProgram::genProgram(const GrEffect** effects) {
     GrAssert(0 == fProgramID);
 
     GrGLShaderBuilder builder(fContextInfo, fUniformManager);
@@ -624,7 +624,7 @@
                 }
 
                 builder.setCurrentStage(s);
-                fProgramStage[s] = GenStageCode(customStages[s],
+                fProgramStage[s] = GenStageCode(effects[s],
                                                 fDesc.fStages[s],
                                                 &fUniforms.fStages[s],
                                                 inColor.size() ? inColor.c_str() : NULL,
@@ -729,7 +729,7 @@
                         inCoverage.append("4");
                     }
                     builder.setCurrentStage(s);
-                    fProgramStage[s] = GenStageCode(customStages[s],
+                    fProgramStage[s] = GenStageCode(effects[s],
                                                     fDesc.fStages[s],
                                                     &fUniforms.fStages[s],
                                                     inCoverage.size() ? inCoverage.c_str() : NULL,
@@ -880,7 +880,7 @@
     for (int s = 0; s < GrDrawState::kNumStages; ++s) {
         int count = fUniforms.fStages[s].fSamplerUniforms.count();
         // FIXME: We're still always reserving one texture per stage. After GrTextureParams are
-        // expressed by the custom stage rather than the GrSamplerState we can move texture binding
+        // expressed by the effect rather than the GrSamplerState we can move texture binding
         // into GrGLProgram and it should be easier to fix this.
         GrAssert(count <= 1);
         for (int t = 0; t < count; ++t) {
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index c9afc2b..f6760a9 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -43,7 +43,7 @@
 
     static GrGLProgram* Create(const GrGLContextInfo& gl,
                                const Desc& desc,
-                               const GrEffect** customStages);
+                               const GrEffect** effects);
 
     virtual ~GrGLProgram();
 
@@ -164,14 +164,14 @@
 
     GrGLProgram(const GrGLContextInfo& gl,
                 const Desc& desc,
-                const GrEffect** customStages);
+                const GrEffect** effects);
 
     bool succeeded() const { return 0 != fProgramID; }
 
     /**
      *  This is the heavy initialization routine for building a GLProgram.
      */
-    bool genProgram(const GrEffect** customStages);
+    bool genProgram(const GrEffect** effects);
 
     void genInputColor(GrGLShaderBuilder* builder, SkString* inColor);
 
diff --git a/src/gpu/gl/GrGLProgramStage.h b/src/gpu/gl/GrGLProgramStage.h
index 3f8afe4..37d0b03 100644
--- a/src/gpu/gl/GrGLProgramStage.h
+++ b/src/gpu/gl/GrGLProgramStage.h
@@ -50,7 +50,7 @@
         stages.
 
         @param builder      Interface used to emit code in the shaders.
-        @param stage        The custom stage that generated this program stage.
+        @param effect       The effect that generated this program stage.
         @param key          The key that was computed by StageKey() from the generating GrEffect.
         @param vertexCoords A vec2 of texture coordinates in the VS, which may be altered. This will
                             be removed soon and stages will be responsible for computing their own
@@ -61,14 +61,13 @@
                             NULL in which case the implied input is solid white (all ones).
                             TODO: Better system for communicating optimization info (e.g. input
                             color is solid white, trans black, known to be opaque, etc.) that allows
-                            the custom stage to communicate back similar known info about its
-                            output.
+                            the effect to communicate back similar known info about its output.
         @param samplers     One entry for each GrTextureAccess of the GrEffect that generated the
                             GrGLProgramStage. These can be passed to the builder to emit texture
                             reads in the generated code.
         */
     virtual void emitCode(GrGLShaderBuilder* builder,
-                          const GrEffect& stage,
+                          const GrEffect& effect,
                           StageKey key,
                           const char* vertexCoords,
                           const char* outputColor,
diff --git a/src/gpu/gl/GrGLSL.h b/src/gpu/gl/GrGLSL.h
index ec34eea..af0da29 100644
--- a/src/gpu/gl/GrGLSL.h
+++ b/src/gpu/gl/GrGLSL.h
@@ -153,7 +153,7 @@
  * mulFactor may be either "" or NULL. In this case either nothing will be appended (kOnes) or an
  * assignment of vec(0,0,0,0) will be appended (kZeros). The assignment is prepended by tabCnt tabs.
  * A semicolon and newline are added after the assignment. (TODO: Remove tabCnt when we auto-insert
- * tabs to custom stage-generated lines.) If a zeros vec is assigned then the return value is
+ * tabs to GrGLProgramStage-generated lines.) If a zeros vec is assigned then the return value is
  * kZeros, otherwise kNone.
  */
 GrSLConstantVec GrGLSLMulVarBy4f(SkString* outAppend,
diff --git a/src/gpu/gl/GrGLShaderBuilder.cpp b/src/gpu/gl/GrGLShaderBuilder.cpp
index f11a8d9..217b874 100644
--- a/src/gpu/gl/GrGLShaderBuilder.cpp
+++ b/src/gpu/gl/GrGLShaderBuilder.cpp
@@ -99,7 +99,7 @@
 }
 
 void GrGLShaderBuilder::setupTextureAccess(const char* varyingFSName, GrSLType varyingType) {
-    // FIXME: We don't know how the custom stage will manipulate the coords. So we give up on using
+    // FIXME: We don't know how the effect will manipulate the coords. So we give up on using
     // projective texturing and always give the stage 2D coords. This will be fixed when custom
     // stages are responsible for setting up their own tex coords / tex matrices.
     switch (varyingType) {
diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h
index 0b5eb17..cb38247 100644
--- a/src/gpu/gl/GrGLShaderBuilder.h
+++ b/src/gpu/gl/GrGLShaderBuilder.h
@@ -173,13 +173,13 @@
     void getShader(ShaderType, SkString*) const;
 
     /**
-     * TODO: Make this do all the compiling, linking, etc. Hide from the custom stages
+     * TODO: Make this do all the compiling, linking, etc. Hide from the GrEffects
      */
     void finished(GrGLuint programID);
 
     /**
      * Sets the current stage (used to make variable names unique).
-     * TODO: Hide from the custom stages
+     * TODO: Hide from the GrEffects
      */
     void setCurrentStage(int stage) { fCurrentStage = stage; }
     void setNonStage() { fCurrentStage = kNonStageIdx; }
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 858e938..7a58c53 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -2018,12 +2018,12 @@
 
 void GrGpuGL::flushBoundTextureAndParams(int stage) {
     GrDrawState* drawState = this->drawState();
-    // FIXME: Assuming at most one texture per custom stage
-    const GrEffect* customStage = drawState->sampler(stage)->getEffect();
-    if (customStage->numTextures() > 0) {
-        GrGLTexture* nextTexture =  static_cast<GrGLTexture*>(customStage->texture(0));
+    // FIXME: Assuming at most one texture per effect
+    const GrEffect* effect = drawState->sampler(stage)->getEffect();
+    if (effect->numTextures() > 0) {
+        GrGLTexture* nextTexture =  static_cast<GrGLTexture*>(effect->texture(0));
         if (NULL != nextTexture) {
-            const GrTextureParams& texParams = customStage->textureAccess(0).getParams();
+            const GrTextureParams& texParams = effect->textureAccess(0).getParams();
             this->flushBoundTextureAndParams(stage, texParams, nextTexture);
         }
     }
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index eab0a77..0cd7eb5 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -240,7 +240,7 @@
     void buildProgram(bool isPoints,
                       BlendOptFlags blendOpts,
                       GrBlendCoeff dstCoeff,
-                      const GrEffect** customStages,
+                      const GrEffect** effects,
                       ProgramDesc* desc);
 
     // Inits GrDrawTarget::Caps, subclass may enable additional caps.
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index b0656b2..9f78aa4 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -198,7 +198,7 @@
 void GrGpuGL::flushTextureMatrix(int s) {
     const GrDrawState& drawState = this->getDrawState();
 
-    // FIXME: Still assuming only a single texture per custom stage
+    // FIXME: Still assuming only a single texture per effect
     const GrEffect* stage = drawState.getSampler(s).getEffect();
     if (0 == stage->numTextures()) {
         return;
@@ -350,11 +350,11 @@
             return false;
         }
 
-        const GrEffect* customStages [GrDrawState::kNumStages];
+        const GrEffect* effects[GrDrawState::kNumStages];
         GrGLProgram::Desc desc;
-        this->buildProgram(kDrawPoints_DrawType == type, blendOpts, dstCoeff, customStages, &desc);
+        this->buildProgram(kDrawPoints_DrawType == type, blendOpts, dstCoeff, effects, &desc);
 
-        fCurrentProgram.reset(fProgramCache->getProgram(desc, customStages));
+        fCurrentProgram.reset(fProgramCache->getProgram(desc, effects));
         if (NULL == fCurrentProgram.get()) {
             GrAssert(!"Failed to create program!");
             return false;
@@ -565,19 +565,19 @@
 
 namespace {
 
-void setup_custom_stage(GrGLProgram::Desc::StageDesc* stage,
-                        const GrSamplerState& sampler,
-                        const GrGLCaps& caps,
-                        const GrEffect** customStages,
-                        GrGLProgram* program, int index) {
-    const GrEffect* customStage = sampler.getEffect();
-    if (customStage) {
-        const GrProgramStageFactory& factory = customStage->getFactory();
-        stage->fCustomStageKey = factory.glStageKey(*customStage, caps);
-        customStages[index] = customStage;
+void setup_effect(GrGLProgram::Desc::StageDesc* stage,
+                  const GrSamplerState& sampler,
+                  const GrGLCaps& caps,
+                  const GrEffect** effects,
+                  GrGLProgram* program, int index) {
+    const GrEffect* effect = sampler.getEffect();
+    if (effect) {
+        const GrProgramStageFactory& factory = effect->getFactory();
+        stage->fCustomStageKey = factory.glStageKey(*effect, caps);
+        effects[index] = effect;
     } else {
         stage->fCustomStageKey = 0;
-        customStages[index] = NULL;
+        effects[index] = NULL;
     }
 }
 
@@ -586,7 +586,7 @@
 void GrGpuGL::buildProgram(bool isPoints,
                            BlendOptFlags blendOpts,
                            GrBlendCoeff dstCoeff,
-                           const GrEffect** customStages,
+                           const GrEffect** effects,
                            ProgramDesc* desc) {
     const GrDrawState& drawState = this->getDrawState();
 
@@ -674,12 +674,11 @@
         if (!skip && stage.isEnabled()) {
             lastEnabledStage = s;
             const GrSamplerState& sampler = drawState.getSampler(s);
-            // FIXME: Still assuming one texture per custom stage
-            const GrEffect* customStage = drawState.getSampler(s).getEffect();
+            // FIXME: Still assuming one texture per effect
+            const GrEffect* effect = drawState.getSampler(s).getEffect();
 
-            if (customStage->numTextures() > 0) {
-                const GrGLTexture* texture =
-                    static_cast<const GrGLTexture*>(customStage->texture(0));
+            if (effect->numTextures() > 0) {
+                const GrGLTexture* texture = static_cast<const GrGLTexture*>(effect->texture(0));
                 GrMatrix samplerMatrix;
                 sampler.getTotalMatrix(&samplerMatrix);
                 if (NULL != texture) {
@@ -690,16 +689,15 @@
                 }
             } else {
                 // Set identity to do the minimal amount of extra work for the no texture case.
-                // This will go away when custom stages manage their own texture matrix.
+                // This will go away when effects manage their own texture matrix.
                 stage.fOptFlags |= StageDesc::kIdentityMatrix_OptFlagBit;
             }
-            setup_custom_stage(&stage, sampler, this->glCaps(), customStages,
-                               fCurrentProgram.get(), s);
+            setup_effect(&stage, sampler, this->glCaps(), effects, fCurrentProgram.get(), s);
 
         } else {
             stage.fOptFlags         = 0;
             stage.fCustomStageKey   = 0;
-            customStages[s] = NULL;
+            effects[s] = NULL;
         }
     }