Repurpose GrGLCoordTransform as GrGLProgramEffects

Creates a GrGLProgramEffects class that the GrGLProgram uses to manage
an array of effects. This gives us enough abstraction for the program
to cleanly handle different types of coord transforms.

R=bsalomon@google.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/25605008

git-svn-id: http://skia.googlecode.com/svn/trunk@11588 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLEffect.h b/src/gpu/gl/GrGLEffect.h
index d3c49d1..52b1e92 100644
--- a/src/gpu/gl/GrGLEffect.h
+++ b/src/gpu/gl/GrGLEffect.h
@@ -9,6 +9,7 @@
 #define GrGLEffect_DEFINED
 
 #include "GrBackendEffectFactory.h"
+#include "GrGLProgramEffects.h"
 #include "GrGLShaderBuilder.h"
 #include "GrGLShaderVar.h"
 #include "GrGLSL.h"
@@ -38,6 +39,8 @@
 
 public:
     typedef GrBackendEffectFactory::EffectKey EffectKey;
+    typedef GrGLProgramEffects::TransformedCoordsArray TransformedCoordsArray;
+    typedef GrGLProgramEffects::TextureSamplerArray TextureSamplerArray;
 
     enum {
         kNoEffectKey = GrBackendEffectFactory::kNoEffectKey,
@@ -45,12 +48,9 @@
         kEffectKeyBits = GrBackendEffectFactory::kEffectKeyBits,
     };
 
-    typedef GrGLShaderBuilder::TransformedCoordsArray TransformedCoordsArray;
-    typedef GrGLShaderBuilder::TextureSamplerArray TextureSamplerArray;
+    GrGLEffect(const GrBackendEffectFactory& factory) : fFactory(factory) {}
 
-    GrGLEffect(const GrBackendEffectFactory&);
-
-    virtual ~GrGLEffect();
+    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
@@ -87,16 +87,12 @@
         EffectKey as the one that created this GrGLEffect. Effects that use local coords have
         to consider whether the GrEffectStage's coord change matrix should be used. When explicit
         local coordinates are used it can be ignored. */
-    virtual void setData(const GrGLUniformManager&, const GrDrawEffect&);
+    virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) {}
 
     const char* name() const { return fFactory.name(); }
 
     static inline EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&) { return 0; }
 
-    static EffectKey GenTextureKey(const GrDrawEffect&, const GrGLCaps&);
-    static EffectKey GenTransformKey(const GrDrawEffect&);
-    static EffectKey GenAttribKey(const GrDrawEffect& stage);
-
 protected:
     const GrBackendEffectFactory& fFactory;
 };