When getGLInstance is called on a frag proc, the resulting GrGLFragmentProcessor will be the root of a tree of GrGLFragmentProcessors that mirrors the GrFragmentProcessor's tree. This allows setData() to be called recursively (removing the responsibility from compose shader) and allows gl instances direct access to their children gl instances so they can emit their code.

BUG=skia:4182

Review URL: https://codereview.chromium.org/1287023009
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h
index 1b8a818..8d2a4d4 100644
--- a/include/gpu/GrFragmentProcessor.h
+++ b/include/gpu/GrFragmentProcessor.h
@@ -27,10 +27,7 @@
         : INHERITED()
         , fUsesLocalCoords(false) {}
 
-    /** Returns a new instance of the appropriate *GL* implementation class
-        for the given GrFragmentProcessor; caller is responsible for deleting
-        the object. */
-    virtual GrGLFragmentProcessor* createGLInstance() const = 0;
+    GrGLFragmentProcessor* createGLInstance() const;
 
     /** Human-meaningful string to identify this GrFragmentProcessor; may be embedded
         in generated shader code. */
@@ -125,6 +122,11 @@
     virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const = 0;
 
 private:
+    /** Returns a new instance of the appropriate *GL* implementation class
+        for the given GrFragmentProcessor; caller is responsible for deleting
+        the object. */
+    virtual GrGLFragmentProcessor* onCreateGLInstance() const = 0;
+
     /** Implemented using GLFragmentProcessor::GenKey as described in this class's comment. */
     virtual void onGetGLProcessorKey(const GrGLSLCaps& caps,
                                      GrProcessorKeyBuilder* b) const = 0;