Use a factory function to create GrPipeline and remove unused member

Review URL: https://codereview.chromium.org/1273803004
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h
index 77adb36..61e6e92 100644
--- a/src/gpu/GrPipeline.h
+++ b/src/gpu/GrPipeline.h
@@ -29,12 +29,17 @@
  */
 class GrPipeline : public GrNonAtomicRef {
 public:
-    GrPipeline(const GrPipelineBuilder&,
-               const GrProcOptInfo& colorPOI,
-               const GrProcOptInfo& coveragePOI,
-               const GrCaps&,
-               const GrScissorState&,
-               const GrXferProcessor::DstTexture*);
+    /** Creates a pipeline into a pre-allocated buffer */
+    static GrPipeline* CreateAt(void* memory,
+                                const GrPipelineBuilder& pb,
+                                const GrProcOptInfo& colorPOI,
+                                const GrProcOptInfo& coveragePOI,
+                                const GrCaps& caps,
+                                const GrScissorState& scissor,
+                                const GrXferProcessor::DstTexture* dst) {
+        return SkNEW_PLACEMENT_ARGS(memory, GrPipeline, (pb, colorPOI, coveragePOI, caps, scissor,
+                                                         dst));
+    }
 
     /*
      * Returns true if these pipelines are equivalent.  Coord transforms may be applied either on
@@ -108,6 +113,13 @@
     }
 
 private:
+    GrPipeline(const GrPipelineBuilder&,
+               const GrProcOptInfo& colorPOI,
+               const GrProcOptInfo& coveragePOI,
+               const GrCaps&,
+               const GrScissorState&,
+               const GrXferProcessor::DstTexture*);
+
     /**
      * Alter the program desc and inputs (attribs and processors) based on the blend optimization.
      */
@@ -149,7 +161,6 @@
     int                                 fNumColorStages;
 
     SkSTArray<8, const GrCoordTransform*, true> fCoordTransforms;
-    int                                 fNumCoordTransforms;
     GrProgramDesc                       fDesc;
 
     typedef SkRefCnt INHERITED;