Pass GrCustomStage to key-generation functions and emitCode().

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

git-svn-id: http://skia.googlecode.com/svn/branches/gpu_dev@6182 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLEffect.h b/src/gpu/gl/GrGLEffect.h
index 74d3f0f..30b8455 100644
--- a/src/gpu/gl/GrGLEffect.h
+++ b/src/gpu/gl/GrGLEffect.h
@@ -8,14 +8,13 @@
 #ifndef GrGLEffect_DEFINED
 #define GrGLEffect_DEFINED
 
-#include "GrAllocator.h"
-#include "GrEffectStage.h"
+#include "GrBackendEffectFactory.h"
 #include "GrGLProgram.h"
 #include "GrGLShaderBuilder.h"
 #include "GrGLShaderVar.h"
 #include "GrGLSL.h"
 
-struct GrGLInterface;
+class GrEffectStage;
 class GrGLTexture;
 
 /** @file
@@ -23,7 +22,7 @@
     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 EffectKey GenKey(const GrEffect&, const GrGLCaps&)
+        static inline EffectKey GenKey(const GrEffectStage&, const GrGLCaps&)
     that is used to implement a program cache. When two GrEffects produce the same key this means
     that their GrGLEffects would emit the same GLSL code.
 
@@ -33,7 +32,8 @@
 class GrGLEffect {
 
 public:
-    typedef GrEffect::EffectKey EffectKey;
+    typedef GrBackendEffectFactory::EffectKey EffectKey;
+
     enum {
         // the number of bits in EffectKey available to GenKey
         kEffectKeyBits = GrBackendEffectFactory::kEffectKeyBits,
@@ -50,7 +50,7 @@
         stages.
 
         @param builder      Interface used to emit code in the shaders.
-        @param effect       The effect that generated this program stage.
+        @param stage        The effect stage that generated this program stage.
         @param key          The key that was computed by EffectKey() 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
@@ -67,7 +67,7 @@
                             reads in the generated code.
         */
     virtual void emitCode(GrGLShaderBuilder* builder,
-                          const GrEffect& effect,
+                          const GrEffectStage& stage,
                           EffectKey key,
                           const char* vertexCoords,
                           const char* outputColor,