This change is in preparation for updating how processor keys and meta keys are generated for frag procs.

BUG=skia:4182

Review URL: https://codereview.chromium.org/1298233002
diff --git a/include/gpu/GrFragmentProcessor.h b/include/gpu/GrFragmentProcessor.h
index 8d2a4d4..f08d365 100644
--- a/include/gpu/GrFragmentProcessor.h
+++ b/include/gpu/GrFragmentProcessor.h
@@ -25,7 +25,9 @@
 public:
     GrFragmentProcessor()
         : INHERITED()
-        , fUsesLocalCoords(false) {}
+        , fUsesLocalCoords(false)
+        , fNumTexturesExclChildren(0)
+        , fNumTransformsExclChildren(0) {}
 
     GrGLFragmentProcessor* createGLInstance() const;
 
@@ -40,6 +42,10 @@
         }
     }
 
+    int numTexturesExclChildren() const { return fNumTexturesExclChildren; }
+
+    int numTransformsExclChildren() const { return fNumTransformsExclChildren; }
+
     int numTransforms() const { return fCoordTransforms.count(); }
 
     /** Returns the coordinate transformation at index. index must be valid according to
@@ -84,6 +90,8 @@
     void computeInvariantOutput(GrInvariantOutput* inout) const;
 
 protected:
+    void addTextureAccess(const GrTextureAccess* textureAccess) override;
+
     /**
      * Fragment Processor subclasses call this from their constructor to register coordinate
      * transformations. Coord transforms provide a mechanism for a processor to receive coordinates
@@ -105,7 +113,8 @@
 
     /**
      * FragmentProcessor subclasses call this from their constructor to register any child
-     * FragmentProcessors they have.
+     * FragmentProcessors they have. This must be called AFTER all texture accesses and coord
+     * transforms have been added.
      * This is for processors whose shader code will be composed of nested processors whose output
      * colors will be combined somehow to produce its output color.  Registering these child
      * processors will allow the ProgramBuilder to automatically handle their transformed coords and
@@ -168,6 +177,9 @@
      */
     SkSTArray<4, const GrCoordTransform*, true>  fCoordTransforms;
 
+    int                                          fNumTexturesExclChildren;
+    int                                          fNumTransformsExclChildren;
+
     SkTArray<GrFragmentStage, false>             fChildProcessors;
 
     typedef GrProcessor INHERITED;