Move op memory storage to GrContext (take 2)

TBR=bsalomon@google.com

Change-Id: I4a448694d4114d83cd3a720cfc8bd37de51733d1
Reviewed-on: https://skia-review.googlesource.com/135707
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.cpp b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
index ad078b2..e3010f9 100644
--- a/src/gpu/ccpr/GrCCDrawPathsOp.cpp
+++ b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
@@ -22,9 +22,12 @@
     return false;
 }
 
-std::unique_ptr<GrCCDrawPathsOp> GrCCDrawPathsOp::Make(GrContext*, const SkIRect& clipIBounds,
-                                                       const SkMatrix& m, const GrShape& shape,
-                                                       const SkRect& devBounds, GrPaint&& paint) {
+std::unique_ptr<GrCCDrawPathsOp> GrCCDrawPathsOp::Make(GrContext* context,
+                                                       const SkIRect& clipIBounds,
+                                                       const SkMatrix& m,
+                                                       const GrShape& shape,
+                                                       const SkRect& devBounds,
+                                                       GrPaint&& paint) {
     bool canStashPathMask = true;
     SkIRect looseClippedIBounds;
     devBounds.roundOut(&looseClippedIBounds);  // GrCCPathParser might find slightly tighter bounds.
@@ -34,9 +37,11 @@
             return nullptr;
         }
     }
-    return std::unique_ptr<GrCCDrawPathsOp>(new GrCCDrawPathsOp(looseClippedIBounds, m, shape,
-                                                                canStashPathMask, devBounds,
-                                                                std::move(paint)));
+
+    GrOpMemoryPool* pool = context->contextPriv().opMemoryPool();
+
+    return pool->allocate<GrCCDrawPathsOp>(looseClippedIBounds, m, shape, canStashPathMask,
+                                           devBounds, std::move(paint));
 }
 
 GrCCDrawPathsOp::GrCCDrawPathsOp(const SkIRect& looseClippedIBounds, const SkMatrix& m,