GrGLProgramStage Renaming Part 1.

Renamed cpp and h
s/GrGLProgramStage/GrGLEffect/
Review URL: https://codereview.appspot.com/6759054

git-svn-id: http://skia.googlecode.com/svn/trunk@6090 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLProgramStage.cpp b/src/gpu/gl/GrGLEffect.cpp
similarity index 70%
rename from src/gpu/gl/GrGLProgramStage.cpp
rename to src/gpu/gl/GrGLEffect.cpp
index cc4cc91..eb11909 100644
--- a/src/gpu/gl/GrGLProgramStage.cpp
+++ b/src/gpu/gl/GrGLEffect.cpp
@@ -6,21 +6,21 @@
  */
 
 #include "GrGLSL.h"
-#include "GrGLProgramStage.h"
+#include "GrGLEffect.h"
 
-GrGLProgramStage::GrGLProgramStage(const GrProgramStageFactory& factory)
+GrGLEffect::GrGLEffect(const GrProgramStageFactory& factory)
     : fFactory(factory) {
 }
 
-GrGLProgramStage::~GrGLProgramStage() {
+GrGLEffect::~GrGLEffect() {
 }
 
 ///////////////////////////////////////////////////////////////////////////////
 
-void GrGLProgramStage::setData(const GrGLUniformManager&, const GrEffect&) {
+void GrGLEffect::setData(const GrGLUniformManager&, const GrEffect&) {
 }
 
-GrGLProgramStage::StageKey GrGLProgramStage::GenTextureKey(const GrEffect& effect,
+GrGLEffect::StageKey GrGLEffect::GenTextureKey(const GrEffect& effect,
                                                            const GrGLCaps& caps) {
     StageKey key = 0;
     for (int index = 0; index < effect.numTextures(); ++index) {
diff --git a/src/gpu/gl/GrGLProgramStage.h b/src/gpu/gl/GrGLEffect.h
similarity index 89%
rename from src/gpu/gl/GrGLProgramStage.h
rename to src/gpu/gl/GrGLEffect.h
index 190ea8a6..32adcdd 100644
--- a/src/gpu/gl/GrGLProgramStage.h
+++ b/src/gpu/gl/GrGLEffect.h
@@ -20,7 +20,7 @@
 
 /** @file
     This file contains specializations for OpenGL of the shader stages declared in
-    include/gpu/GrEffect.h. Objects of type GrGLProgramStage are responsible for emitting the
+    include/gpu/GrEffect.h. Objects of type GrGLEffect are responsible for emitting the
     GLSL code that implements a GrEffect and for uploading uniforms at draw time. They also
     must have a function:
         static inline StageKey GenKey(const GrEffect&, const GrGLCaps&)
@@ -30,7 +30,7 @@
     These objects are created by the factory object returned by the GrEffect::getFactory().
 */
 
-class GrGLProgramStage {
+class GrGLEffect {
 
 public:
     typedef GrEffect::StageKey StageKey;
@@ -41,9 +41,9 @@
 
     typedef GrGLShaderBuilder::TextureSamplerArray TextureSamplerArray;
 
-    GrGLProgramStage(const GrProgramStageFactory&);
+    GrGLEffect(const GrProgramStageFactory&);
 
-    virtual ~GrGLProgramStage();
+    virtual ~GrGLEffect();
 
     /** Called when the program stage should insert its code into the shaders. The code in each
         shader will be in its own block ({}) and so locally scoped names will not collide across
@@ -63,7 +63,7 @@
                             color is solid white, trans black, known to be opaque, etc.) that allows
                             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
+                            GrGLEffect. These can be passed to the builder to emit texture
                             reads in the generated code.
         */
     virtual void emitCode(GrGLShaderBuilder* builder,
@@ -74,7 +74,7 @@
                           const char* inputColor,
                           const TextureSamplerArray& samplers) = 0;
 
-    /** A GrGLProgramStage instance can be reused with any GrEffect that produces the same stage
+    /** A GrGLEffect instance can be reused with any GrEffect that produces the same stage
         key; this function reads data from a stage and uploads any uniform variables required
         by the shaders created in emitCode(). */
     virtual void setData(const GrGLUniformManager&, const GrEffect&);
@@ -89,13 +89,13 @@
 };
 
 /**
- * This allows program stages that implemented an older set of virtual functions on GrGLProgramStage
+ * This allows program stages that implemented an older set of virtual functions on GrGLEffect
  * to continue to work by change their parent class to this class. New program stages should not use
  * this interface. It will be removed once older stages are modified to implement emitCode().
  */
-class GrGLLegacyProgramStage : public GrGLProgramStage {
+class GrGLLegacyProgramStage : public GrGLEffect {
 public:
-    GrGLLegacyProgramStage(const GrProgramStageFactory& factory) : GrGLProgramStage(factory) {}
+    GrGLLegacyProgramStage(const GrProgramStageFactory& factory) : GrGLEffect(factory) {}
 
     virtual void setupVariables(GrGLShaderBuilder* builder) {};
     virtual void emitVS(GrGLShaderBuilder* builder,
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index ae957e9..e817c1a 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -9,7 +9,7 @@
 
 #include "GrAllocator.h"
 #include "GrEffect.h"
-#include "GrGLProgramStage.h"
+#include "GrGLEffect.h"
 #include "gl/GrGLShaderBuilder.h"
 #include "GrGLShaderVar.h"
 #include "GrProgramStageFactory.h"
@@ -896,7 +896,7 @@
 // Stage code generation
 
 // TODO: Move this function to GrGLShaderBuilder
-GrGLProgramStage* GrGLProgram::GenStageCode(const GrEffect* effect,
+GrGLEffect* GrGLProgram::GenStageCode(const GrEffect* effect,
                                             const StageDesc& desc,
                                             StageUniforms* uniforms,
                                             const char* fsInColor, // NULL means no incoming color
@@ -904,7 +904,7 @@
                                             const char* vsInCoord,
                                             GrGLShaderBuilder* builder) {
 
-    GrGLProgramStage* glStage = effect->getFactory().createGLInstance(*effect);
+    GrGLEffect* glStage = effect->getFactory().createGLInstance(*effect);
 
     /// Vertex Shader Stuff
 
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index 056b7ed..91239ac 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -19,7 +19,7 @@
 #include "SkXfermode.h"
 
 class GrBinHashKeyBuilder;
-class GrGLProgramStage;
+class GrGLEffect;
 class GrGLShaderBuilder;
 
 // optionally compile the experimental GS code. Set to GR_DEBUG
@@ -175,7 +175,7 @@
 
     void genInputColor(GrGLShaderBuilder* builder, SkString* inColor);
 
-    static GrGLProgramStage* GenStageCode(const GrEffect* effect,
+    static GrGLEffect* GenStageCode(const GrEffect* effect,
                                           const StageDesc& desc, // TODO: Eliminate this
                                           StageUniforms* stageUniforms, // TODO: Eliminate this
                                           const char* fsInColor, // NULL means no incoming color
@@ -254,7 +254,7 @@
     GrMatrix                    fTextureMatrices[GrDrawState::kNumStages];
     GrGLTexture::Orientation    fTextureOrientation[GrDrawState::kNumStages];
 
-    GrGLProgramStage*           fProgramStage[GrDrawState::kNumStages];
+    GrGLEffect*           fProgramStage[GrDrawState::kNumStages];
 
     Desc fDesc;
     const GrGLContextInfo&      fContextInfo;
diff --git a/src/gpu/gl/GrGLSL.h b/src/gpu/gl/GrGLSL.h
index af0da29..c0d3d5e 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 GrGLProgramStage-generated lines.) If a zeros vec is assigned then the return value is
+ * tabs to GrGLEffect-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/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 5bc84f8..c6a8e90 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -8,7 +8,7 @@
 #include "GrGpuGL.h"
 
 #include "GrEffect.h"
-#include "GrGLProgramStage.h"
+#include "GrGLEffect.h"
 #include "GrGpuVertex.h"
 
 typedef GrGLUniformManager::UniformHandle UniformHandle;