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/include/gpu/GrEffect.h b/include/gpu/GrEffect.h
index d7209ff..0adc00b 100644
--- a/include/gpu/GrEffect.h
+++ b/include/gpu/GrEffect.h
@@ -10,10 +10,10 @@
 
 #include "GrRefCnt.h"
 #include "GrNoncopyable.h"
-#include "GrBackendEffectFactory.h"
 #include "GrEffectUnitTest.h"
 #include "GrTextureAccess.h"
 
+class GrBackendEffectFactory;
 class GrContext;
 class GrTexture;
 class SkString;
@@ -33,8 +33,6 @@
 public:
     SK_DECLARE_INST_COUNT(GrEffect)
 
-    typedef GrBackendEffectFactory::EffectKey EffectKey;
-
     explicit GrEffect(int numTextures);
     virtual ~GrEffect();
 
@@ -77,7 +75,7 @@
 
     /** Human-meaningful string to identify this effect; may be embedded
         in generated shader code. */
-    const char* name() const { return this->getFactory().name(); }
+    const char* name() const;
 
     int numTextures() const { return fNumTextures; }