Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.

Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008
Reviewed-on: https://skia-review.googlesource.com/32760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/GrAppliedClip.h b/src/gpu/GrAppliedClip.h
index 7ef3346..bcf6eb9 100644
--- a/src/gpu/GrAppliedClip.h
+++ b/src/gpu/GrAppliedClip.h
@@ -27,7 +27,7 @@
     const GrScissorState& scissorState() const { return fScissorState; }
     const GrWindowRectsState& windowRectsState() const { return fWindowRectsState; }
     GrFragmentProcessor* clipCoverageFragmentProcessor() const { return fClipCoverageFP.get(); }
-    sk_sp<GrFragmentProcessor> detachClipCoverageFragmentProcessor() {
+    std::unique_ptr<GrFragmentProcessor> detachClipCoverageFragmentProcessor() {
         return std::move(fClipCoverageFP);
     }
     bool hasStencilClip() const { return SkClipStack::kInvalidGenID != fClipStackID; }
@@ -51,9 +51,9 @@
         fWindowRectsState.set(windows, mode);
     }
 
-    void addCoverageFP(sk_sp<GrFragmentProcessor> fp) {
+    void addCoverageFP(std::unique_ptr<GrFragmentProcessor> fp) {
         SkASSERT(!fClipCoverageFP);
-        fClipCoverageFP = fp;
+        fClipCoverageFP = std::move(fp);
     }
 
     void addStencilClip(uint32_t clipStackID) {
@@ -85,7 +85,7 @@
 private:
     GrScissorState             fScissorState;
     GrWindowRectsState         fWindowRectsState;
-    sk_sp<GrFragmentProcessor> fClipCoverageFP;
+    std::unique_ptr<GrFragmentProcessor> fClipCoverageFP;
     uint32_t                   fClipStackID = SkClipStack::kInvalidGenID;
 };
 
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp
index 49d5635..0b07fd5 100644
--- a/src/gpu/GrClipStackClip.cpp
+++ b/src/gpu/GrClipStackClip.cpp
@@ -73,8 +73,8 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 // set up the draw state to enable the aa clipping mask.
-static sk_sp<GrFragmentProcessor> create_fp_for_mask(sk_sp<GrTextureProxy> mask,
-                                                     const SkIRect &devBound) {
+static std::unique_ptr<GrFragmentProcessor> create_fp_for_mask(sk_sp<GrTextureProxy> mask,
+                                                               const SkIRect& devBound) {
     SkIRect domainTexels = SkIRect::MakeWH(devBound.width(), devBound.height());
     return GrDeviceSpaceTextureDecalFragmentProcessor::Make(std::move(mask), domainTexels,
                                                             {devBound.fLeft, devBound.fTop});
@@ -174,9 +174,9 @@
 static bool get_analytic_clip_processor(const ElementList& elements,
                                         bool abortIfAA,
                                         const SkRect& drawDevBounds,
-                                        sk_sp<GrFragmentProcessor>* resultFP) {
+                                        std::unique_ptr<GrFragmentProcessor>* resultFP) {
     SkASSERT(elements.count() <= kMaxAnalyticElements);
-    SkSTArray<kMaxAnalyticElements, sk_sp<GrFragmentProcessor>> fps;
+    SkSTArray<kMaxAnalyticElements, std::unique_ptr<GrFragmentProcessor>> fps;
     ElementList::Iter iter(elements);
     while (iter.get()) {
         SkClipOp op = iter.get()->getOp();
@@ -302,7 +302,7 @@
             // is multisampled.
             disallowAnalyticAA = useHWAA || hasUserStencilSettings;
         }
-        sk_sp<GrFragmentProcessor> clipFP;
+        std::unique_ptr<GrFragmentProcessor> clipFP;
         if ((reducedClip.requiresAA() || avoidStencilBuffers) &&
             get_analytic_clip_processor(reducedClip.elements(), disallowAnalyticAA, devBounds,
                                         &clipFP)) {
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index efa8e8c..d5c82c6 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -479,8 +479,7 @@
     }
 
     if (tempProxy) {
-        sk_sp<GrFragmentProcessor> fp = GrSimpleTextureEffect::Make(
-                tempProxy, nullptr, SkMatrix::I());
+        auto fp = GrSimpleTextureEffect::Make(tempProxy, nullptr, SkMatrix::I());
         if (premulOnGpu) {
             fp = fContext->createUPMToPMEffect(std::move(fp), useConfigConversionEffect);
         }
@@ -607,8 +606,7 @@
         if (tempRTC) {
             SkMatrix textureMatrix = SkMatrix::MakeTrans(SkIntToScalar(left), SkIntToScalar(top));
             sk_sp<GrTextureProxy> proxy = src->asTextureProxyRef();
-            sk_sp<GrFragmentProcessor> fp = GrSimpleTextureEffect::Make(
-                    std::move(proxy), nullptr, textureMatrix);
+            auto fp = GrSimpleTextureEffect::Make(std::move(proxy), nullptr, textureMatrix);
             if (unpremulOnGpu) {
                 fp = fContext->createPMToUPMEffect(std::move(fp), useConfigConversionEffect);
                 // We no longer need to do this on CPU after the read back.
@@ -922,8 +920,8 @@
     return fDrawingManager->wasAbandoned();
 }
 
-sk_sp<GrFragmentProcessor> GrContext::createPMToUPMEffect(sk_sp<GrFragmentProcessor> fp,
-                                                          bool useConfigConversionEffect) {
+std::unique_ptr<GrFragmentProcessor> GrContext::createPMToUPMEffect(
+        std::unique_ptr<GrFragmentProcessor> fp, bool useConfigConversionEffect) {
     ASSERT_SINGLE_OWNER
     // We have specialized effects that guarantee round-trip conversion for some formats
     if (useConfigConversionEffect) {
@@ -941,8 +939,8 @@
     }
 }
 
-sk_sp<GrFragmentProcessor> GrContext::createUPMToPMEffect(sk_sp<GrFragmentProcessor> fp,
-                                                          bool useConfigConversionEffect) {
+std::unique_ptr<GrFragmentProcessor> GrContext::createUPMToPMEffect(
+        std::unique_ptr<GrFragmentProcessor> fp, bool useConfigConversionEffect) {
     ASSERT_SINGLE_OWNER
     // We have specialized effects that guarantee round-trip conversion for these formats
     if (useConfigConversionEffect) {
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp
index 44b14ad..060cde5 100644
--- a/src/gpu/GrFragmentProcessor.cpp
+++ b/src/gpu/GrFragmentProcessor.cpp
@@ -16,14 +16,6 @@
 #include "glsl/GrGLSLProgramDataManager.h"
 #include "glsl/GrGLSLUniformHandler.h"
 
-GrFragmentProcessor::~GrFragmentProcessor() {
-    // If we got here then our ref count must have reached zero, so we will have converted refs
-    // to pending executions for all children.
-    for (int i = 0; i < fChildProcessors.count(); ++i) {
-        fChildProcessors[i]->completedExecution();
-    }
-}
-
 bool GrFragmentProcessor::isEqual(const GrFragmentProcessor& that) const {
     if (this->classID() != that.classID() ||
         !this->hasSameSamplersAndAccesses(that)) {
@@ -75,7 +67,15 @@
     return true;
 }
 
-int GrFragmentProcessor::registerChildProcessor(sk_sp<GrFragmentProcessor> child) {
+void GrFragmentProcessor::markPendingExecution() const {
+    INHERITED::addPendingIOs();
+    INHERITED::removeRefs();
+    for (int i = 0; i < this->numChildProcessors(); ++i) {
+        this->childProcessor(i).markPendingExecution();
+    }
+}
+
+int GrFragmentProcessor::registerChildProcessor(std::unique_ptr<GrFragmentProcessor> child) {
     this->combineRequiredFeatures(*child);
 
     if (child->usesLocalCoords()) {
@@ -83,19 +83,11 @@
     }
 
     int index = fChildProcessors.count();
-    fChildProcessors.push_back(child.release());
+    fChildProcessors.push_back(std::move(child));
 
     return index;
 }
 
-void GrFragmentProcessor::notifyRefCntIsZero() const {
-    // See comment above GrProgramElement for a detailed explanation of why we do this.
-    for (int i = 0; i < fChildProcessors.count(); ++i) {
-        fChildProcessors[i]->addPendingExecution();
-        fChildProcessors[i]->unref();
-    }
-}
-
 bool GrFragmentProcessor::hasSameTransforms(const GrFragmentProcessor& that) const {
     if (this->numCoordTransforms() != that.numCoordTransforms()) {
         return false;
@@ -109,8 +101,8 @@
     return true;
 }
 
-sk_sp<GrFragmentProcessor> GrFragmentProcessor::MulOutputByInputAlpha(
-    sk_sp<GrFragmentProcessor> fp) {
+std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::MulOutputByInputAlpha(
+        std::unique_ptr<GrFragmentProcessor> fp) {
     if (!fp) {
         return nullptr;
     }
@@ -121,13 +113,13 @@
 
 class PremulInputFragmentProcessor : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make() {
-        return sk_sp<GrFragmentProcessor>(new PremulInputFragmentProcessor);
+    static std::unique_ptr<GrFragmentProcessor> Make() {
+        return std::unique_ptr<GrFragmentProcessor>(new PremulInputFragmentProcessor);
     }
 
     const char* name() const override { return "PremultiplyInput"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override { return Make(); }
+    std::unique_ptr<GrFragmentProcessor> clone() const override { return Make(); }
 
 private:
     PremulInputFragmentProcessor()
@@ -163,13 +155,13 @@
 
 class UnpremulInputFragmentProcessor : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make() {
-        return sk_sp<GrFragmentProcessor>(new UnpremulInputFragmentProcessor);
+    static std::unique_ptr<GrFragmentProcessor> Make() {
+        return std::unique_ptr<GrFragmentProcessor>(new UnpremulInputFragmentProcessor);
     }
 
     const char* name() const override { return "UnpremultiplyInput"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override { return Make(); }
+    std::unique_ptr<GrFragmentProcessor> clone() const override { return Make(); }
 
 private:
     UnpremulInputFragmentProcessor()
@@ -206,42 +198,48 @@
 
 }
 
-sk_sp<GrFragmentProcessor> GrFragmentProcessor::PremulInput(sk_sp<GrFragmentProcessor> fp) {
+std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::PremulInput(
+        std::unique_ptr<GrFragmentProcessor> fp) {
     if (!fp) {
         return nullptr;
     }
-    sk_sp<GrFragmentProcessor> fpPipeline[] = { PremulInputFragmentProcessor::Make(), fp};
+    std::unique_ptr<GrFragmentProcessor> fpPipeline[] = { PremulInputFragmentProcessor::Make(),
+                                                          std::move(fp) };
     return GrFragmentProcessor::RunInSeries(fpPipeline, 2);
 }
 
-sk_sp<GrFragmentProcessor> GrFragmentProcessor::PremulOutput(sk_sp<GrFragmentProcessor> fp) {
+std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::PremulOutput(
+        std::unique_ptr<GrFragmentProcessor> fp) {
     if (!fp) {
         return nullptr;
     }
-    sk_sp<GrFragmentProcessor> fpPipeline[] = { fp, PremulInputFragmentProcessor::Make() };
+    std::unique_ptr<GrFragmentProcessor> fpPipeline[] = { std::move(fp),
+                                                          PremulInputFragmentProcessor::Make() };
     return GrFragmentProcessor::RunInSeries(fpPipeline, 2);
 }
 
-sk_sp<GrFragmentProcessor> GrFragmentProcessor::UnpremulOutput(sk_sp<GrFragmentProcessor> fp) {
+std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::UnpremulOutput(
+        std::unique_ptr<GrFragmentProcessor> fp) {
     if (!fp) {
         return nullptr;
     }
-    sk_sp<GrFragmentProcessor> fpPipeline[] = { fp, UnpremulInputFragmentProcessor::Make() };
+    std::unique_ptr<GrFragmentProcessor> fpPipeline[] = { std::move(fp),
+                                                          UnpremulInputFragmentProcessor::Make() };
     return GrFragmentProcessor::RunInSeries(fpPipeline, 2);
 }
 
-sk_sp<GrFragmentProcessor> GrFragmentProcessor::SwizzleOutput(sk_sp<GrFragmentProcessor> fp,
-                                                              const GrSwizzle& swizzle) {
+std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::SwizzleOutput(
+        std::unique_ptr<GrFragmentProcessor> fp, const GrSwizzle& swizzle) {
     class SwizzleFragmentProcessor : public GrFragmentProcessor {
     public:
-        static sk_sp<GrFragmentProcessor> Make(const GrSwizzle& swizzle) {
-            return sk_sp<GrFragmentProcessor>(new SwizzleFragmentProcessor(swizzle));
+        static std::unique_ptr<GrFragmentProcessor> Make(const GrSwizzle& swizzle) {
+            return std::unique_ptr<GrFragmentProcessor>(new SwizzleFragmentProcessor(swizzle));
         }
 
         const char* name() const override { return "Swizzle"; }
         const GrSwizzle& swizzle() const { return fSwizzle; }
 
-        sk_sp<GrFragmentProcessor> clone() const override { return Make(fSwizzle); }
+        std::unique_ptr<GrFragmentProcessor> clone() const override { return Make(fSwizzle); }
 
     private:
         SwizzleFragmentProcessor(const GrSwizzle& swizzle)
@@ -289,30 +287,32 @@
     if (GrSwizzle::RGBA() == swizzle) {
         return fp;
     }
-    sk_sp<GrFragmentProcessor> fpPipeline[] = { fp, SwizzleFragmentProcessor::Make(swizzle) };
+    std::unique_ptr<GrFragmentProcessor> fpPipeline[] = { std::move(fp),
+                                                          SwizzleFragmentProcessor::Make(swizzle) };
     return GrFragmentProcessor::RunInSeries(fpPipeline, 2);
 }
 
-sk_sp<GrFragmentProcessor> GrFragmentProcessor::MakeInputPremulAndMulByOutput(
-        sk_sp<GrFragmentProcessor> fp) {
-
+std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::MakeInputPremulAndMulByOutput(
+        std::unique_ptr<GrFragmentProcessor> fp) {
     class PremulFragmentProcessor : public GrFragmentProcessor {
     public:
-        static sk_sp<GrFragmentProcessor> Make(sk_sp<GrFragmentProcessor> processor) {
-            return sk_sp<GrFragmentProcessor>(new PremulFragmentProcessor(std::move(processor)));
+        static std::unique_ptr<GrFragmentProcessor> Make(
+                std::unique_ptr<GrFragmentProcessor> processor) {
+            return std::unique_ptr<GrFragmentProcessor>(
+                    new PremulFragmentProcessor(std::move(processor)));
         }
 
         const char* name() const override { return "Premultiply"; }
 
-        sk_sp<GrFragmentProcessor> clone() const override {
+        std::unique_ptr<GrFragmentProcessor> clone() const override {
             return Make(this->childProcessor(0).clone());
         }
 
     private:
-        PremulFragmentProcessor(sk_sp<GrFragmentProcessor> processor)
+        PremulFragmentProcessor(std::unique_ptr<GrFragmentProcessor> processor)
                 : INHERITED(OptFlags(processor.get())) {
             this->initClassID<PremulFragmentProcessor>();
-            this->registerChildProcessor(processor);
+            this->registerChildProcessor(std::move(processor));
         }
 
         GrGLSLFragmentProcessor* onCreateGLSLInstance() const override {
@@ -363,18 +363,19 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-sk_sp<GrFragmentProcessor> GrFragmentProcessor::OverrideInput(sk_sp<GrFragmentProcessor> fp,
-                                                              GrColor4f color) {
+std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::OverrideInput(
+        std::unique_ptr<GrFragmentProcessor> fp, GrColor4f color) {
     class ReplaceInputFragmentProcessor : public GrFragmentProcessor {
     public:
-        static sk_sp<GrFragmentProcessor> Make(sk_sp<GrFragmentProcessor> child, GrColor4f color) {
-            return sk_sp<GrFragmentProcessor>(new ReplaceInputFragmentProcessor(std::move(child),
-                                                                                color));
+        static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> child,
+                                                         GrColor4f color) {
+            return std::unique_ptr<GrFragmentProcessor>(
+                    new ReplaceInputFragmentProcessor(std::move(child), color));
         }
 
         const char* name() const override { return "Replace Color"; }
 
-        sk_sp<GrFragmentProcessor> clone() const override {
+        std::unique_ptr<GrFragmentProcessor> clone() const override {
             return Make(this->childProcessor(0).clone(), fColor);
         }
 
@@ -411,7 +412,7 @@
             return new GLFP;
         }
 
-        ReplaceInputFragmentProcessor(sk_sp<GrFragmentProcessor> child, GrColor4f color)
+        ReplaceInputFragmentProcessor(std::unique_ptr<GrFragmentProcessor> child, GrColor4f color)
                 : INHERITED(OptFlags(child.get(), color)), fColor(color) {
             this->initClassID<ReplaceInputFragmentProcessor>();
             this->registerChildProcessor(std::move(child));
@@ -451,18 +452,19 @@
     return ReplaceInputFragmentProcessor::Make(std::move(fp), color);
 }
 
-sk_sp<GrFragmentProcessor> GrFragmentProcessor::RunInSeries(sk_sp<GrFragmentProcessor>* series,
-                                                            int cnt) {
+std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::RunInSeries(
+        std::unique_ptr<GrFragmentProcessor>* series, int cnt) {
     class SeriesFragmentProcessor : public GrFragmentProcessor {
     public:
-        static sk_sp<GrFragmentProcessor> Make(sk_sp<GrFragmentProcessor>* children, int cnt) {
-            return sk_sp<GrFragmentProcessor>(new SeriesFragmentProcessor(children, cnt));
+        static std::unique_ptr<GrFragmentProcessor> Make(
+                std::unique_ptr<GrFragmentProcessor>* children, int cnt) {
+            return std::unique_ptr<GrFragmentProcessor>(new SeriesFragmentProcessor(children, cnt));
         }
 
         const char* name() const override { return "Series"; }
 
-        sk_sp<GrFragmentProcessor> clone() const override {
-            SkSTArray<4, sk_sp<GrFragmentProcessor>> children(this->numChildProcessors());
+        std::unique_ptr<GrFragmentProcessor> clone() const override {
+            SkSTArray<4, std::unique_ptr<GrFragmentProcessor>> children(this->numChildProcessors());
             for (int i = 0; i < this->numChildProcessors(); ++i) {
                 if (!children.push_back(this->childProcessor(i).clone())) {
                     return nullptr;
@@ -492,7 +494,7 @@
             return new GLFP;
         }
 
-        SeriesFragmentProcessor(sk_sp<GrFragmentProcessor>* children, int cnt)
+        SeriesFragmentProcessor(std::unique_ptr<GrFragmentProcessor>* children, int cnt)
                 : INHERITED(OptFlags(children, cnt)) {
             SkASSERT(cnt > 1);
             this->initClassID<SeriesFragmentProcessor>();
@@ -501,7 +503,7 @@
             }
         }
 
-        static OptimizationFlags OptFlags(sk_sp<GrFragmentProcessor>* children, int cnt) {
+        static OptimizationFlags OptFlags(std::unique_ptr<GrFragmentProcessor>* children, int cnt) {
             OptimizationFlags flags = kAll_OptimizationFlags;
             for (int i = 0; i < cnt && flags != kNone_OptimizationFlags; ++i) {
                 flags &= children[i]->optimizationFlags();
@@ -527,18 +529,18 @@
         return nullptr;
     }
     if (1 == cnt) {
-        return series[0];
+        return std::move(series[0]);
     }
     // Run the through the series, do the invariant output processing, and look for eliminations.
     GrProcessorAnalysisColor inputColor;
     inputColor.setToUnknown();
-    GrColorFragmentProcessorAnalysis info(inputColor, sk_sp_address_as_pointer_address(series),
+    GrColorFragmentProcessorAnalysis info(inputColor, unique_ptr_address_as_pointer_address(series),
                                           cnt);
-    SkTArray<sk_sp<GrFragmentProcessor>> replacementSeries;
+    SkTArray<std::unique_ptr<GrFragmentProcessor>> replacementSeries;
     GrColor4f knownColor;
     int leadingFPsToEliminate = info.initialProcessorsToEliminate(&knownColor);
     if (leadingFPsToEliminate) {
-        sk_sp<GrFragmentProcessor> colorFP(
+        std::unique_ptr<GrFragmentProcessor> colorFP(
                 GrConstColorProcessor::Make(knownColor, GrConstColorProcessor::kIgnore_InputMode));
         if (leadingFPsToEliminate == cnt) {
             return colorFP;
diff --git a/src/gpu/GrFragmentProcessor.h b/src/gpu/GrFragmentProcessor.h
index 0784031..29a302b 100644
--- a/src/gpu/GrFragmentProcessor.h
+++ b/src/gpu/GrFragmentProcessor.h
@@ -23,7 +23,7 @@
     GrCoordTransforms to receive a transformation of the local coordinates that map from local space
     to the fragment being processed.
  */
-class GrFragmentProcessor : public GrResourceIOProcessor, public GrProgramElement {
+class GrFragmentProcessor : public GrResourceIOProcessor {
 public:
     /**
     *  In many instances (e.g. SkShader::asFragmentProcessor() implementations) it is desirable to
@@ -33,7 +33,8 @@
     *  does so by returning a parent FP that multiplies the passed in FPs output by the parent's
     *  input alpha. The passed in FP will not receive an input color.
     */
-    static sk_sp<GrFragmentProcessor> MulOutputByInputAlpha(sk_sp<GrFragmentProcessor>);
+    static std::unique_ptr<GrFragmentProcessor> MulOutputByInputAlpha(
+            std::unique_ptr<GrFragmentProcessor>);
 
     /**
      *  This assumes that the input color to the returned processor will be unpremul and that the
@@ -41,38 +42,42 @@
      *  The result of the returned processor is a premul of its input color modulated by the child
      *  processor's premul output.
      */
-    static sk_sp<GrFragmentProcessor> MakeInputPremulAndMulByOutput(sk_sp<GrFragmentProcessor>);
+    static std::unique_ptr<GrFragmentProcessor> MakeInputPremulAndMulByOutput(
+            std::unique_ptr<GrFragmentProcessor>);
 
     /**
      *  Returns a parent fragment processor that adopts the passed fragment processor as a child.
      *  The parent will ignore its input color and instead feed the passed in color as input to the
      *  child.
      */
-    static sk_sp<GrFragmentProcessor> OverrideInput(sk_sp<GrFragmentProcessor>, GrColor4f);
+    static std::unique_ptr<GrFragmentProcessor> OverrideInput(std::unique_ptr<GrFragmentProcessor>,
+                                                              GrColor4f);
 
     /**
      *  Returns a fragment processor that premuls the input before calling the passed in fragment
      *  processor.
      */
-    static sk_sp<GrFragmentProcessor> PremulInput(sk_sp<GrFragmentProcessor>);
+    static std::unique_ptr<GrFragmentProcessor> PremulInput(std::unique_ptr<GrFragmentProcessor>);
 
     /**
      *  Returns a fragment processor that calls the passed in fragment processor, and then premuls
      *  the output.
      */
-    static sk_sp<GrFragmentProcessor> PremulOutput(sk_sp<GrFragmentProcessor>);
+    static std::unique_ptr<GrFragmentProcessor> PremulOutput(std::unique_ptr<GrFragmentProcessor>);
 
     /**
      *  Returns a fragment processor that calls the passed in fragment processor, and then unpremuls
      *  the output.
      */
-    static sk_sp<GrFragmentProcessor> UnpremulOutput(sk_sp<GrFragmentProcessor>);
+    static std::unique_ptr<GrFragmentProcessor> UnpremulOutput(
+            std::unique_ptr<GrFragmentProcessor>);
 
     /**
      *  Returns a fragment processor that calls the passed in fragment processor, and then swizzles
      *  the output.
      */
-    static sk_sp<GrFragmentProcessor> SwizzleOutput(sk_sp<GrFragmentProcessor>, const GrSwizzle&);
+    static std::unique_ptr<GrFragmentProcessor> SwizzleOutput(std::unique_ptr<GrFragmentProcessor>,
+                                                              const GrSwizzle&);
 
     /**
      * Returns a fragment processor that runs the passed in array of fragment processors in a
@@ -82,15 +87,14 @@
      *
      * The array elements with be moved.
      */
-    static sk_sp<GrFragmentProcessor> RunInSeries(sk_sp<GrFragmentProcessor>*, int cnt);
-
-    ~GrFragmentProcessor() override;
+    static std::unique_ptr<GrFragmentProcessor> RunInSeries(std::unique_ptr<GrFragmentProcessor>*,
+                                                            int cnt);
 
     /**
      * Makes a copy of this fragment processor that draws equivalently to the original.
      * If the processor has child processors they are cloned as well.
      */
-    virtual sk_sp<GrFragmentProcessor> clone() const = 0;
+    virtual std::unique_ptr<GrFragmentProcessor> clone() const = 0;
 
     GrGLSLFragmentProcessor* createGLSLInstance() const;
 
@@ -117,6 +121,8 @@
 
     bool instantiate(GrResourceProvider*) const;
 
+    void markPendingExecution() const;
+
     /** Do any of the coordtransforms for this processor require local coords? */
     bool usesLocalCoords() const { return SkToBool(fFlags & kUsesLocalCoords_Flag); }
 
@@ -309,15 +315,9 @@
      * processors will allow the ProgramBuilder to automatically handle their transformed coords and
      * texture accesses and mangle their uniform and output color names.
      */
-    int registerChildProcessor(sk_sp<GrFragmentProcessor> child);
+    int registerChildProcessor(std::unique_ptr<GrFragmentProcessor> child);
 
 private:
-    void addPendingIOs() const override { GrResourceIOProcessor::addPendingIOs(); }
-    void removeRefs() const override { GrResourceIOProcessor::removeRefs(); }
-    void pendingIOComplete() const override { GrResourceIOProcessor::pendingIOComplete(); }
-
-    void notifyRefCntIsZero() const final;
-
     virtual GrColor4f constantOutputForConstantInput(GrColor4f /* inputColor */) const {
         SkFAIL("Subclass must override this if advertising this optimization.");
         return GrColor4f::TransparentBlack();
@@ -350,11 +350,7 @@
 
     SkSTArray<4, const GrCoordTransform*, true> fCoordTransforms;
 
-    /**
-     * This is not SkSTArray<1, sk_sp<GrFragmentProcessor>> because this class holds strong
-     * references until notifyRefCntIsZero and then it holds pending executions.
-     */
-    SkSTArray<1, GrFragmentProcessor*, true> fChildProcessors;
+    SkSTArray<1, std::unique_ptr<GrFragmentProcessor>, true> fChildProcessors;
 
     typedef GrResourceIOProcessor INHERITED;
 };
diff --git a/src/gpu/GrPaint.h b/src/gpu/GrPaint.h
index 1ab01f3..ae19cad 100644
--- a/src/gpu/GrPaint.h
+++ b/src/gpu/GrPaint.h
@@ -91,7 +91,7 @@
     /**
      * Appends an additional color processor to the color computation.
      */
-    void addColorFragmentProcessor(sk_sp<GrFragmentProcessor> fp) {
+    void addColorFragmentProcessor(std::unique_ptr<GrFragmentProcessor> fp) {
         SkASSERT(fp);
         fColorFragmentProcessors.push_back(std::move(fp));
         fTrivial = false;
@@ -100,7 +100,7 @@
     /**
      * Appends an additional coverage processor to the coverage computation.
      */
-    void addCoverageFragmentProcessor(sk_sp<GrFragmentProcessor> fp) {
+    void addCoverageFragmentProcessor(std::unique_ptr<GrFragmentProcessor> fp) {
         SkASSERT(fp);
         fCoverageFragmentProcessors.push_back(std::move(fp));
         fTrivial = false;
@@ -157,8 +157,8 @@
     friend class GrProcessorSet;
 
     const GrXPFactory* fXPFactory = nullptr;
-    SkSTArray<4, sk_sp<GrFragmentProcessor>>  fColorFragmentProcessors;
-    SkSTArray<2, sk_sp<GrFragmentProcessor>>  fCoverageFragmentProcessors;
+    SkSTArray<4, std::unique_ptr<GrFragmentProcessor>> fColorFragmentProcessors;
+    SkSTArray<2, std::unique_ptr<GrFragmentProcessor>> fCoverageFragmentProcessors;
     bool fDisableOutputConversionToSRGB = false;
     bool fAllowSRGBInputs = false;
     bool fTrivial = true;
diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp
index a6e8fba..d07dd08 100644
--- a/src/gpu/GrPipeline.cpp
+++ b/src/gpu/GrPipeline.cpp
@@ -58,22 +58,20 @@
     fFragmentProcessors.reset(numTotalProcessors);
     int currFPIdx = 0;
     for (int i = 0; i < processors.numColorFragmentProcessors(); ++i, ++currFPIdx) {
-        const GrFragmentProcessor* fp = processors.colorFragmentProcessor(i);
-        fFragmentProcessors[currFPIdx].reset(fp);
-        if (!fp->instantiate(args.fResourceProvider)) {
+        fFragmentProcessors[currFPIdx] = processors.detachColorFragmentProcessor(i);
+        if (!fFragmentProcessors[currFPIdx]->instantiate(args.fResourceProvider)) {
             this->markAsBad();
         }
     }
 
     for (int i = 0; i < processors.numCoverageFragmentProcessors(); ++i, ++currFPIdx) {
-        const GrFragmentProcessor* fp = processors.coverageFragmentProcessor(i);
-        fFragmentProcessors[currFPIdx].reset(fp);
-        if (!fp->instantiate(args.fResourceProvider)) {
+        fFragmentProcessors[currFPIdx] = processors.detachCoverageFragmentProcessor(i);
+        if (!fFragmentProcessors[currFPIdx]->instantiate(args.fResourceProvider)) {
             this->markAsBad();
         }
     }
     if (clipFP) {
-        fFragmentProcessors[currFPIdx].reset(clipFP.get());
+        fFragmentProcessors[currFPIdx] = std::move(clipFP);
         if (!fFragmentProcessors[currFPIdx]->instantiate(args.fResourceProvider)) {
             this->markAsBad();
         }
diff --git a/src/gpu/GrPipeline.h b/src/gpu/GrPipeline.h
index 7583c6c..c431995 100644
--- a/src/gpu/GrPipeline.h
+++ b/src/gpu/GrPipeline.h
@@ -230,8 +230,7 @@
 
     using RenderTargetProxy = GrPendingIOResource<GrRenderTargetProxy, kWrite_GrIOType>;
     using DstTextureProxy = GrPendingIOResource<GrTextureProxy, kRead_GrIOType>;
-    using PendingFragmentProcessor = GrPendingProgramElement<const GrFragmentProcessor>;
-    using FragmentProcessorArray = SkAutoSTArray<8, PendingFragmentProcessor>;
+    using FragmentProcessorArray = SkAutoSTArray<8, std::unique_ptr<const GrFragmentProcessor>>;
 
     DstTextureProxy fDstTextureProxy;
     SkIPoint fDstTextureOffset;
diff --git a/src/gpu/GrProcessorSet.cpp b/src/gpu/GrProcessorSet.cpp
index 20d6745..cb4a25f 100644
--- a/src/gpu/GrProcessorSet.cpp
+++ b/src/gpu/GrProcessorSet.cpp
@@ -29,11 +29,11 @@
         int i = 0;
         for (auto& fp : paint.fColorFragmentProcessors) {
             SkASSERT(fp.get());
-            fFragmentProcessors[i++] = fp.release();
+            fFragmentProcessors[i++] = std::move(fp);
         }
         for (auto& fp : paint.fCoverageFragmentProcessors) {
             SkASSERT(fp.get());
-            fFragmentProcessors[i++] = fp.release();
+            fFragmentProcessors[i++] = std::move(fp);
         }
     } else {
         SkDebugf("Insane number of color fragment processors in paint. Dropping all processors.");
@@ -47,14 +47,14 @@
         , fFragmentProcessorOffset(0)
         , fFlags(0) {}
 
-GrProcessorSet::GrProcessorSet(sk_sp<GrFragmentProcessor> colorFP)
+GrProcessorSet::GrProcessorSet(std::unique_ptr<GrFragmentProcessor> colorFP)
         : fFragmentProcessors(1)
         , fXP((const GrXPFactory*)nullptr)
         , fColorFragmentProcessorCnt(1)
         , fFragmentProcessorOffset(0)
         , fFlags(0) {
     SkASSERT(colorFP);
-    fFragmentProcessors[0] = colorFP.release();
+    fFragmentProcessors[0] = std::move(colorFP);
 }
 
 GrProcessorSet::GrProcessorSet(GrProcessorSet&& that)
@@ -64,20 +64,14 @@
         , fFlags(that.fFlags) {
     fFragmentProcessors.reset(that.fFragmentProcessors.count() - that.fFragmentProcessorOffset);
     for (int i = 0; i < fFragmentProcessors.count(); ++i) {
-        fFragmentProcessors[i] = that.fFragmentProcessors[i + that.fFragmentProcessorOffset];
+        fFragmentProcessors[i] =
+                std::move(that.fFragmentProcessors[i + that.fFragmentProcessorOffset]);
     }
     that.fColorFragmentProcessorCnt = 0;
     that.fFragmentProcessors.reset(0);
 }
 
 GrProcessorSet::~GrProcessorSet() {
-    for (int i = fFragmentProcessorOffset; i < fFragmentProcessors.count(); ++i) {
-        if (this->isFinalized()) {
-            fFragmentProcessors[i]->completedExecution();
-        } else {
-            fFragmentProcessors[i]->unref();
-        }
-    }
     if (this->isFinalized() && this->xferProcessor()) {
         this->xferProcessor()->unref();
     }
@@ -173,8 +167,10 @@
     analysis.fCompatibleWithCoverageAsAlpha = GrProcessorAnalysisCoverage::kLCD != coverageInput;
 
     const GrFragmentProcessor* clipFP = clip ? clip->clipCoverageFragmentProcessor() : nullptr;
-    const GrFragmentProcessor* const* fps = fFragmentProcessors.get() + fFragmentProcessorOffset;
-    GrColorFragmentProcessorAnalysis colorAnalysis(colorInput, fps, fColorFragmentProcessorCnt);
+    const std::unique_ptr<const GrFragmentProcessor>* fps =
+            fFragmentProcessors.get() + fFragmentProcessorOffset;
+    GrColorFragmentProcessorAnalysis colorAnalysis(
+            colorInput, unique_ptr_address_as_pointer_address(fps), fColorFragmentProcessorCnt);
     analysis.fCompatibleWithCoverageAsAlpha &=
             colorAnalysis.allProcessorsCompatibleWithCoverageAsAlpha();
     fps += fColorFragmentProcessorCnt;
@@ -236,12 +232,10 @@
         analysis.fUsesLocalCoords = coverageUsesLocalCoords | colorAnalysis.usesLocalCoords();
     }
     for (int i = 0; i < colorFPsToEliminate; ++i) {
-        fFragmentProcessors[i]->unref();
-        fFragmentProcessors[i] = nullptr;
+        fFragmentProcessors[i].reset(nullptr);
     }
     for (int i = colorFPsToEliminate; i < fFragmentProcessors.count(); ++i) {
-        fFragmentProcessors[i]->addPendingExecution();
-        fFragmentProcessors[i]->unref();
+        fFragmentProcessors[i]->markPendingExecution();
     }
     fFragmentProcessorOffset = colorFPsToEliminate;
     fColorFragmentProcessorCnt -= colorFPsToEliminate;
diff --git a/src/gpu/GrProcessorSet.h b/src/gpu/GrProcessorSet.h
index d3aaf6d..023c4df 100644
--- a/src/gpu/GrProcessorSet.h
+++ b/src/gpu/GrProcessorSet.h
@@ -25,7 +25,7 @@
 public:
     GrProcessorSet(GrPaint&&);
     GrProcessorSet(SkBlendMode);
-    GrProcessorSet(sk_sp<GrFragmentProcessor> colorFP);
+    GrProcessorSet(std::unique_ptr<GrFragmentProcessor> colorFP);
     GrProcessorSet(GrProcessorSet&&);
     GrProcessorSet(const GrProcessorSet&) = delete;
     GrProcessorSet& operator=(const GrProcessorSet&) = delete;
@@ -42,10 +42,11 @@
 
     const GrFragmentProcessor* colorFragmentProcessor(int idx) const {
         SkASSERT(idx < fColorFragmentProcessorCnt);
-        return fFragmentProcessors[idx + fFragmentProcessorOffset];
+        return fFragmentProcessors[idx + fFragmentProcessorOffset].get();
     }
     const GrFragmentProcessor* coverageFragmentProcessor(int idx) const {
-        return fFragmentProcessors[idx + fColorFragmentProcessorCnt + fFragmentProcessorOffset];
+        return fFragmentProcessors[idx + fColorFragmentProcessorCnt +
+                                   fFragmentProcessorOffset].get();
     }
 
     const GrXferProcessor* xferProcessor() const {
@@ -57,6 +58,16 @@
         return sk_ref_sp(fXP.fProcessor);
     }
 
+    std::unique_ptr<const GrFragmentProcessor> detachColorFragmentProcessor(int idx) {
+        SkASSERT(idx < fColorFragmentProcessorCnt);
+        return std::move(fFragmentProcessors[idx + fFragmentProcessorOffset]);
+    }
+
+    std::unique_ptr<const GrFragmentProcessor> detachCoverageFragmentProcessor(int idx) {
+        return std::move(
+                fFragmentProcessors[idx + fFragmentProcessorOffset + fColorFragmentProcessorCnt]);
+    }
+
     /** Comparisons are only legal on finalized processor sets. */
     bool operator==(const GrProcessorSet& that) const;
     bool operator!=(const GrProcessorSet& that) const { return !(*this == that); }
@@ -168,7 +179,7 @@
         return fXP.fFactory;
     }
 
-    SkAutoSTArray<4, const GrFragmentProcessor*> fFragmentProcessors;
+    SkAutoSTArray<4, std::unique_ptr<const GrFragmentProcessor>> fFragmentProcessors;
     XP fXP;
     uint8_t fColorFragmentProcessorCnt = 0;
     uint8_t fFragmentProcessorOffset = 0;
diff --git a/src/gpu/GrProcessorUnitTest.cpp b/src/gpu/GrProcessorUnitTest.cpp
index 563fd7c..473903d 100644
--- a/src/gpu/GrProcessorUnitTest.cpp
+++ b/src/gpu/GrProcessorUnitTest.cpp
@@ -10,9 +10,9 @@
 
 #if GR_TEST_UTILS
 
-sk_sp<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcessorTestData* data) {
+std::unique_ptr<GrFragmentProcessor> GrProcessorUnitTest::MakeChildFP(GrProcessorTestData* data) {
 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS
-    sk_sp<GrFragmentProcessor> fp;
+    std::unique_ptr<GrFragmentProcessor> fp;
     do {
         fp = GrFragmentProcessorTestFactory::Make(data);
         SkASSERT(fp);
diff --git a/src/gpu/GrProcessorUnitTest.h b/src/gpu/GrProcessorUnitTest.h
index 73a2cf3..739b2f0 100644
--- a/src/gpu/GrProcessorUnitTest.h
+++ b/src/gpu/GrProcessorUnitTest.h
@@ -35,7 +35,7 @@
 
 /** This allows parent FPs to implement a test create with known leaf children in order to avoid
 creating an unbounded FP tree which may overflow various shader limits. */
-sk_sp<GrFragmentProcessor> MakeChildFP(GrProcessorTestData*);
+std::unique_ptr<GrFragmentProcessor> MakeChildFP(GrProcessorTestData*);
 
 }
 
@@ -117,7 +117,7 @@
     static SkTArray<GrProcessorTestFactory<ProcessorSmartPtr>*, true>* GetFactories();
 };
 
-using GrFragmentProcessorTestFactory = GrProcessorTestFactory<sk_sp<GrFragmentProcessor>>;
+using GrFragmentProcessorTestFactory = GrProcessorTestFactory<std::unique_ptr<GrFragmentProcessor>>;
 using GrGeometryProcessorTestFactory = GrProcessorTestFactory<sk_sp<GrGeometryProcessor>>;
 
 class GrXPFactoryTestFactory : private SkNoncopyable {
@@ -151,7 +151,7 @@
 
 #define GR_DECLARE_FRAGMENT_PROCESSOR_TEST                        \
     static GrFragmentProcessorTestFactory gTestFactory SK_UNUSED; \
-    static sk_sp<GrFragmentProcessor> TestCreate(GrProcessorTestData*);
+    static std::unique_ptr<GrFragmentProcessor> TestCreate(GrProcessorTestData*);
 
 #define GR_DECLARE_XP_FACTORY_TEST                                                                 \
     static GrXPFactoryTestFactory gTestFactory SK_UNUSED;                                          \
@@ -175,7 +175,7 @@
 // The unit test relies on static initializers. Just declare the TestCreate function so that
 // its definitions will compile.
 #define GR_DECLARE_FRAGMENT_PROCESSOR_TEST                                                         \
-    static sk_sp<GrFragmentProcessor> TestCreate(GrProcessorTestData*);
+    static std::unique_ptr<GrFragmentProcessor> TestCreate(GrProcessorTestData*);
 #define GR_DEFINE_FRAGMENT_PROCESSOR_TEST(X)
 
 // The unit test relies on static initializers. Just declare the TestCreate function so that
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 10f21e8..03b120c 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -1205,12 +1205,12 @@
     }
 
     // TODO these need to be a geometry processors
-    sk_sp<GrFragmentProcessor> innerEffect(GrRRectEffect::Make(innerEdgeType, *inner));
+    std::unique_ptr<GrFragmentProcessor> innerEffect(GrRRectEffect::Make(innerEdgeType, *inner));
     if (!innerEffect) {
         return false;
     }
 
-    sk_sp<GrFragmentProcessor> outerEffect(GrRRectEffect::Make(outerEdgeType, *outer));
+    std::unique_ptr<GrFragmentProcessor> outerEffect(GrRRectEffect::Make(outerEdgeType, *outer));
     if (!outerEffect) {
         return false;
     }
diff --git a/src/gpu/GrRenderTargetContext.h b/src/gpu/GrRenderTargetContext.h
index 2b9308a..33a9d8b 100644
--- a/src/gpu/GrRenderTargetContext.h
+++ b/src/gpu/GrRenderTargetContext.h
@@ -390,8 +390,8 @@
     friend class GrCCPRAtlas;                        // for access to addDrawOp
     friend class GrCoverageCountingPathRenderer;     // for access to addDrawOp
     // for a unit test
-    friend void test_draw_op(GrRenderTargetContext*,
-                             sk_sp<GrFragmentProcessor>, sk_sp<GrTextureProxy>);
+    friend void test_draw_op(GrRenderTargetContext*, std::unique_ptr<GrFragmentProcessor>,
+                             sk_sp<GrTextureProxy>);
 
     void internalClear(const GrFixedClip&, const GrColor, bool canIgnoreClip);
 
diff --git a/src/gpu/GrTextureAdjuster.cpp b/src/gpu/GrTextureAdjuster.cpp
index 166cb9d..546ea67 100644
--- a/src/gpu/GrTextureAdjuster.cpp
+++ b/src/gpu/GrTextureAdjuster.cpp
@@ -105,14 +105,13 @@
     return copy;
 }
 
-sk_sp<GrFragmentProcessor> GrTextureAdjuster::createFragmentProcessor(
-                                        const SkMatrix& origTextureMatrix,
-                                        const SkRect& origConstraintRect,
-                                        FilterConstraint filterConstraint,
-                                        bool coordsLimitedToConstraintRect,
-                                        const GrSamplerParams::FilterMode* filterOrNullForBicubic,
-                                        SkColorSpace* dstColorSpace) {
-
+std::unique_ptr<GrFragmentProcessor> GrTextureAdjuster::createFragmentProcessor(
+        const SkMatrix& origTextureMatrix,
+        const SkRect& origConstraintRect,
+        FilterConstraint filterConstraint,
+        bool coordsLimitedToConstraintRect,
+        const GrSamplerParams::FilterMode* filterOrNullForBicubic,
+        SkColorSpace* dstColorSpace) {
     SkMatrix textureMatrix = origTextureMatrix;
     const SkIRect* contentArea = this->contentAreaOrNull();
     // Convert the constraintRect to be relative to the texture rather than the content area so
diff --git a/src/gpu/GrTextureAdjuster.h b/src/gpu/GrTextureAdjuster.h
index eb500f7..fad533f 100644
--- a/src/gpu/GrTextureAdjuster.h
+++ b/src/gpu/GrTextureAdjuster.h
@@ -27,13 +27,13 @@
     sk_sp<GrTextureProxy> refTextureProxySafeForParams(const GrSamplerParams&, SkIPoint* outOffset,
                                                        SkScalar scaleAdjust[2]);
 
-    sk_sp<GrFragmentProcessor> createFragmentProcessor(
-                                const SkMatrix& textureMatrix,
-                                const SkRect& constraintRect,
-                                FilterConstraint,
-                                bool coordsLimitedToConstraintRect,
-                                const GrSamplerParams::FilterMode* filterOrNullForBicubic,
-                                SkColorSpace* dstColorSpace) override;
+    std::unique_ptr<GrFragmentProcessor> createFragmentProcessor(
+            const SkMatrix& textureMatrix,
+            const SkRect& constraintRect,
+            FilterConstraint,
+            bool coordsLimitedToConstraintRect,
+            const GrSamplerParams::FilterMode* filterOrNullForBicubic,
+            SkColorSpace* dstColorSpace) override;
 
     // We do not ref the texture nor the colorspace, so the caller must keep them in scope while
     // this Adjuster is alive.
diff --git a/src/gpu/GrTextureMaker.cpp b/src/gpu/GrTextureMaker.cpp
index 2962ddb..7e257d8 100644
--- a/src/gpu/GrTextureMaker.cpp
+++ b/src/gpu/GrTextureMaker.cpp
@@ -76,14 +76,13 @@
     return result;
 }
 
-sk_sp<GrFragmentProcessor> GrTextureMaker::createFragmentProcessor(
-                                        const SkMatrix& textureMatrix,
-                                        const SkRect& constraintRect,
-                                        FilterConstraint filterConstraint,
-                                        bool coordsLimitedToConstraintRect,
-                                        const GrSamplerParams::FilterMode* filterOrNullForBicubic,
-                                        SkColorSpace* dstColorSpace) {
-
+std::unique_ptr<GrFragmentProcessor> GrTextureMaker::createFragmentProcessor(
+        const SkMatrix& textureMatrix,
+        const SkRect& constraintRect,
+        FilterConstraint filterConstraint,
+        bool coordsLimitedToConstraintRect,
+        const GrSamplerParams::FilterMode* filterOrNullForBicubic,
+        SkColorSpace* dstColorSpace) {
     const GrSamplerParams::FilterMode* fmForDetermineDomain = filterOrNullForBicubic;
     if (filterOrNullForBicubic && GrSamplerParams::kMipMap_FilterMode == *filterOrNullForBicubic &&
         kYes_FilterConstraint == filterConstraint) {
diff --git a/src/gpu/GrTextureMaker.h b/src/gpu/GrTextureMaker.h
index 9e1e0dd..5055a8a 100644
--- a/src/gpu/GrTextureMaker.h
+++ b/src/gpu/GrTextureMaker.h
@@ -30,13 +30,13 @@
                                                    sk_sp<SkColorSpace>* texColorSpace,
                                                    SkScalar scaleAdjust[2]);
 
-    sk_sp<GrFragmentProcessor> createFragmentProcessor(
-                                const SkMatrix& textureMatrix,
-                                const SkRect& constraintRect,
-                                FilterConstraint filterConstraint,
-                                bool coordsLimitedToConstraintRect,
-                                const GrSamplerParams::FilterMode* filterOrNullForBicubic,
-                                SkColorSpace* dstColorSpace) override;
+    std::unique_ptr<GrFragmentProcessor> createFragmentProcessor(
+            const SkMatrix& textureMatrix,
+            const SkRect& constraintRect,
+            FilterConstraint filterConstraint,
+            bool coordsLimitedToConstraintRect,
+            const GrSamplerParams::FilterMode* filterOrNullForBicubic,
+            SkColorSpace* dstColorSpace) override;
 
 protected:
     GrTextureMaker(GrContext* context, int width, int height, bool isAlphaOnly)
diff --git a/src/gpu/GrTextureProducer.cpp b/src/gpu/GrTextureProducer.cpp
index 78d143b..9273223 100644
--- a/src/gpu/GrTextureProducer.cpp
+++ b/src/gpu/GrTextureProducer.cpp
@@ -218,13 +218,13 @@
     return kDomain_DomainMode;
 }
 
-sk_sp<GrFragmentProcessor> GrTextureProducer::CreateFragmentProcessorForDomainAndFilter(
-                                        sk_sp<GrTextureProxy> proxy,
-                                        sk_sp<GrColorSpaceXform> colorSpaceXform,
-                                        const SkMatrix& textureMatrix,
-                                        DomainMode domainMode,
-                                        const SkRect& domain,
-                                        const GrSamplerParams::FilterMode* filterOrNullForBicubic) {
+std::unique_ptr<GrFragmentProcessor> GrTextureProducer::CreateFragmentProcessorForDomainAndFilter(
+        sk_sp<GrTextureProxy> proxy,
+        sk_sp<GrColorSpaceXform> colorSpaceXform,
+        const SkMatrix& textureMatrix,
+        DomainMode domainMode,
+        const SkRect& domain,
+        const GrSamplerParams::FilterMode* filterOrNullForBicubic) {
     SkASSERT(kTightCopy_DomainMode != domainMode);
     if (filterOrNullForBicubic) {
         if (kDomain_DomainMode == domainMode) {
diff --git a/src/gpu/GrTextureProducer.h b/src/gpu/GrTextureProducer.h
index 6a32e2f..ccc0dae 100644
--- a/src/gpu/GrTextureProducer.h
+++ b/src/gpu/GrTextureProducer.h
@@ -56,13 +56,13 @@
      * @param filterOrNullForBicubic           If non-null indicates the filter mode. If null means
      *                                         use bicubic filtering.
      **/
-    virtual sk_sp<GrFragmentProcessor> createFragmentProcessor(
-                                    const SkMatrix& textureMatrix,
-                                    const SkRect& constraintRect,
-                                    FilterConstraint filterConstraint,
-                                    bool coordsLimitedToConstraintRect,
-                                    const GrSamplerParams::FilterMode* filterOrNullForBicubic,
-                                    SkColorSpace* dstColorSpace) = 0;
+    virtual std::unique_ptr<GrFragmentProcessor> createFragmentProcessor(
+            const SkMatrix& textureMatrix,
+            const SkRect& constraintRect,
+            FilterConstraint filterConstraint,
+            bool coordsLimitedToConstraintRect,
+            const GrSamplerParams::FilterMode* filterOrNullForBicubic,
+            SkColorSpace* dstColorSpace) = 0;
 
     virtual ~GrTextureProducer() {}
 
@@ -130,13 +130,13 @@
         const GrSamplerParams::FilterMode* filterModeOrNullForBicubic,
         SkRect* domainRect);
 
-    static sk_sp<GrFragmentProcessor> CreateFragmentProcessorForDomainAndFilter(
-        sk_sp<GrTextureProxy> proxy,
-        sk_sp<GrColorSpaceXform>,
-        const SkMatrix& textureMatrix,
-        DomainMode,
-        const SkRect& domain,
-        const GrSamplerParams::FilterMode* filterOrNullForBicubic);
+    static std::unique_ptr<GrFragmentProcessor> CreateFragmentProcessorForDomainAndFilter(
+            sk_sp<GrTextureProxy> proxy,
+            sk_sp<GrColorSpaceXform>,
+            const SkMatrix& textureMatrix,
+            DomainMode,
+            const SkRect& domain,
+            const GrSamplerParams::FilterMode* filterOrNullForBicubic);
 
 private:
     const int   fWidth;
diff --git a/src/gpu/GrYUVProvider.cpp b/src/gpu/GrYUVProvider.cpp
index 12390aa..6b58d42 100644
--- a/src/gpu/GrYUVProvider.cpp
+++ b/src/gpu/GrYUVProvider.cpp
@@ -134,11 +134,11 @@
     }
 
     GrPaint paint;
-    sk_sp<GrFragmentProcessor> yuvToRgbProcessor(
-        GrYUVEffect::MakeYUVToRGB(yuvTextureContexts[0]->asTextureProxyRef(),
-                                  yuvTextureContexts[1]->asTextureProxyRef(),
-                                  yuvTextureContexts[2]->asTextureProxyRef(),
-                                  yuvInfo.fSizeInfo.fSizes, yuvInfo.fColorSpace, false));
+    auto yuvToRgbProcessor =
+            GrYUVEffect::MakeYUVToRGB(yuvTextureContexts[0]->asTextureProxyRef(),
+                                      yuvTextureContexts[1]->asTextureProxyRef(),
+                                      yuvTextureContexts[2]->asTextureProxyRef(),
+                                      yuvInfo.fSizeInfo.fSizes, yuvInfo.fColorSpace, false);
     paint.addColorFragmentProcessor(std::move(yuvToRgbProcessor));
 
     // If we're decoding an sRGB image, the result of our linear math on the YUV planes is already
@@ -158,10 +158,10 @@
 
     // If the caller expects the pixels in a different color space than the one from the image,
     // apply a color conversion to do this.
-    sk_sp<GrFragmentProcessor> colorConversionProcessor =
+    std::unique_ptr<GrFragmentProcessor> colorConversionProcessor =
             GrNonlinearColorSpaceXformEffect::Make(srcColorSpace, dstColorSpace);
     if (colorConversionProcessor) {
-        paint.addColorFragmentProcessor(colorConversionProcessor);
+        paint.addColorFragmentProcessor(std::move(colorConversionProcessor));
     }
 
     paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 607165c..b0ca549 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1028,7 +1028,7 @@
 
     // Construct a GrPaint by setting the bitmap texture as the first effect and then configuring
     // the rest from the SkPaint.
-    sk_sp<GrFragmentProcessor> fp;
+    std::unique_ptr<GrFragmentProcessor> fp;
 
     if (needsTextureDomain && (SkCanvas::kStrict_SrcRectConstraint == constraint)) {
         // Use a constrained texture domain to avoid color bleeding
@@ -1132,9 +1132,8 @@
     sk_sp<GrColorSpaceXform> colorSpaceXform =
         GrColorSpaceXform::Make(result->getColorSpace(), fRenderTargetContext->getColorSpace());
 
-    sk_sp<GrFragmentProcessor> fp(GrSimpleTextureEffect::Make(std::move(proxy),
-                                                              std::move(colorSpaceXform),
-                                                              SkMatrix::I()));
+    auto fp = GrSimpleTextureEffect::Make(std::move(proxy), std::move(colorSpaceXform),
+                                          SkMatrix::I());
     if (GrPixelConfigIsAlphaOnly(config)) {
         fp = GrFragmentProcessor::MakeInputPremulAndMulByOutput(std::move(fp));
     } else {
@@ -1416,11 +1415,10 @@
     }
 
     static const GrSamplerParams::FilterMode kMode = GrSamplerParams::kNone_FilterMode;
-    sk_sp<GrFragmentProcessor> fp(
-        producer->createFragmentProcessor(SkMatrix::I(),
-                                          SkRect::MakeIWH(producer->width(), producer->height()),
-                                          GrTextureProducer::kNo_FilterConstraint, true,
-                                          &kMode, fRenderTargetContext->getColorSpace()));
+    auto fp = producer->createFragmentProcessor(
+            SkMatrix::I(), SkRect::MakeIWH(producer->width(), producer->height()),
+            GrTextureProducer::kNo_FilterConstraint, true, &kMode,
+            fRenderTargetContext->getColorSpace());
     if (!fp) {
         return;
     }
@@ -1474,11 +1472,10 @@
     CHECK_SHOULD_DRAW();
 
     static const GrSamplerParams::FilterMode kMode = GrSamplerParams::kNone_FilterMode;
-    sk_sp<GrFragmentProcessor> fp(
-        producer->createFragmentProcessor(SkMatrix::I(),
-                                          SkRect::MakeIWH(producer->width(), producer->height()),
-                                          GrTextureProducer::kNo_FilterConstraint, true,
-                                          &kMode, fRenderTargetContext->getColorSpace()));
+    std::unique_ptr<GrFragmentProcessor> fp(producer->createFragmentProcessor(
+            SkMatrix::I(), SkRect::MakeIWH(producer->width(), producer->height()),
+            GrTextureProducer::kNo_FilterConstraint, true, &kMode,
+            fRenderTargetContext->getColorSpace()));
     if (!fp) {
         return;
     }
diff --git a/src/gpu/SkGpuDevice_drawTexture.cpp b/src/gpu/SkGpuDevice_drawTexture.cpp
index 48015a3..6fa1711 100644
--- a/src/gpu/SkGpuDevice_drawTexture.cpp
+++ b/src/gpu/SkGpuDevice_drawTexture.cpp
@@ -201,16 +201,16 @@
         }
         textureMatrix = &tempMatrix;
     }
-    sk_sp<GrFragmentProcessor> fp(producer->createFragmentProcessor(
-        *textureMatrix, clippedSrcRect, constraintMode, coordsAllInsideSrcRect, filterMode,
-        fRenderTargetContext->getColorSpace()));
+    auto fp = producer->createFragmentProcessor(*textureMatrix, clippedSrcRect, constraintMode,
+                                                coordsAllInsideSrcRect, filterMode,
+                                                fRenderTargetContext->getColorSpace());
     if (!fp) {
         return;
     }
 
     GrPaint grPaint;
     if (!SkPaintToGrPaintWithTexture(fContext.get(), fRenderTargetContext.get(), paint, viewMatrix,
-                                     fp, producer->isAlphaOnly(), &grPaint)) {
+                                     std::move(fp), producer->isAlphaOnly(), &grPaint)) {
         return;
     }
     GrAA aa = GrBoolToAA(paint.isAntiAlias());
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index e426b95..c1fb262 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -404,7 +404,7 @@
                                            GrRenderTargetContext* rtc,
                                            const SkPaint& skPaint,
                                            const SkMatrix& viewM,
-                                           sk_sp<GrFragmentProcessor>* shaderProcessor,
+                                           std::unique_ptr<GrFragmentProcessor>* shaderProcessor,
                                            SkBlendMode* primColorMode,
                                            GrPaint* grPaint) {
     grPaint->setAllowSRGBInputs(rtc->isGammaCorrect());
@@ -415,10 +415,10 @@
 
     // Setup the initial color considering the shader, the SkPaint color, and the presence or not
     // of per-vertex colors.
-    sk_sp<GrFragmentProcessor> shaderFP;
+    std::unique_ptr<GrFragmentProcessor> shaderFP;
     if (!primColorMode || blend_requires_shader(*primColorMode)) {
         if (shaderProcessor) {
-            shaderFP = *shaderProcessor;
+            shaderFP = std::move(*shaderProcessor);
         } else if (const auto* shader = as_SB(skPaint.getShader())) {
             shaderFP = shader->asFragmentProcessor(
                 SkShaderBase::AsFPArgs(context, &viewM, nullptr, skPaint.getFilterQuality(),
@@ -443,7 +443,7 @@
             // the GrPaint color will be ignored.
 
             GrColor4f shaderInput = origColor.opaque();
-            shaderFP = GrFragmentProcessor::OverrideInput(shaderFP, shaderInput);
+            shaderFP = GrFragmentProcessor::OverrideInput(std::move(shaderFP), shaderInput);
             shaderFP = GrXfermodeFragmentProcessor::MakeFromSrcProcessor(std::move(shaderFP),
                                                                          *primColorMode);
 
@@ -470,9 +470,8 @@
         if (primColorMode) {
             // There is a blend between the primitive color and the paint color. The blend considers
             // the opaque paint color. The paint's alpha is applied to the post-blended color.
-            sk_sp<GrFragmentProcessor> processor(
-                GrConstColorProcessor::Make(origColor.opaque(),
-                                            GrConstColorProcessor::kIgnore_InputMode));
+            auto processor = GrConstColorProcessor::Make(origColor.opaque(),
+                                                         GrConstColorProcessor::kIgnore_InputMode);
             processor = GrXfermodeFragmentProcessor::MakeFromSrcProcessor(std::move(processor),
                                                                           *primColorMode);
             if (processor) {
@@ -510,8 +509,7 @@
                     colorFilter->filterColor(skPaint.getColor()), nullptr, nullptr));
             }
         } else {
-            sk_sp<GrFragmentProcessor> cfFP(colorFilter->asFragmentProcessor(context,
-                                                                             rtc->getColorSpace()));
+            auto cfFP = colorFilter->asFragmentProcessor(context, rtc->getColorSpace());
             if (cfFP) {
                 grPaint->addColorFragmentProcessor(std::move(cfFP));
             } else {
@@ -524,7 +522,7 @@
     if (maskFilter) {
         GrFragmentProcessor* mfFP;
         if (maskFilter->asFragmentProcessor(&mfFP)) {
-            grPaint->addCoverageFragmentProcessor(sk_sp<GrFragmentProcessor>(mfFP));
+            grPaint->addCoverageFragmentProcessor(std::unique_ptr<GrFragmentProcessor>(mfFP));
         }
     }
 
@@ -559,7 +557,7 @@
 bool SkPaintToGrPaintReplaceShader(GrContext* context,
                                    GrRenderTargetContext* rtc,
                                    const SkPaint& skPaint,
-                                   sk_sp<GrFragmentProcessor> shaderFP,
+                                   std::unique_ptr<GrFragmentProcessor> shaderFP,
                                    GrPaint* grPaint) {
     if (!shaderFP) {
         return false;
@@ -574,8 +572,8 @@
                               const SkPaint& skPaint,
                               GrPaint* grPaint) {
     // Use a ptr to a nullptr to to indicate that the SkShader is ignored and not replaced.
-    static sk_sp<GrFragmentProcessor> kNullShaderFP(nullptr);
-    static sk_sp<GrFragmentProcessor>* kIgnoreShader = &kNullShaderFP;
+    static std::unique_ptr<GrFragmentProcessor> kNullShaderFP(nullptr);
+    static std::unique_ptr<GrFragmentProcessor>* kIgnoreShader = &kNullShaderFP;
     return skpaint_to_grpaint_impl(context, rtc, skPaint, SkMatrix::I(), kIgnoreShader, nullptr,
                                    grPaint);
 }
@@ -596,10 +594,10 @@
                                  GrRenderTargetContext* rtc,
                                  const SkPaint& paint,
                                  const SkMatrix& viewM,
-                                 sk_sp<GrFragmentProcessor> fp,
+                                 std::unique_ptr<GrFragmentProcessor> fp,
                                  bool textureIsAlphaOnly,
                                  GrPaint* grPaint) {
-    sk_sp<GrFragmentProcessor> shaderFP;
+    std::unique_ptr<GrFragmentProcessor> shaderFP;
     if (textureIsAlphaOnly) {
         if (const auto* shader = as_SB(paint.getShader())) {
             shaderFP = shader->asFragmentProcessor(
@@ -608,13 +606,13 @@
             if (!shaderFP) {
                 return false;
             }
-            sk_sp<GrFragmentProcessor> fpSeries[] = { std::move(shaderFP), std::move(fp) };
+            std::unique_ptr<GrFragmentProcessor> fpSeries[] = { std::move(shaderFP), std::move(fp) };
             shaderFP = GrFragmentProcessor::RunInSeries(fpSeries, 2);
         } else {
-            shaderFP = GrFragmentProcessor::MakeInputPremulAndMulByOutput(fp);
+            shaderFP = GrFragmentProcessor::MakeInputPremulAndMulByOutput(std::move(fp));
         }
     } else {
-        shaderFP = GrFragmentProcessor::MulOutputByInputAlpha(fp);
+        shaderFP = GrFragmentProcessor::MulOutputByInputAlpha(std::move(fp));
     }
 
     return SkPaintToGrPaintReplaceShader(context, rtc, paint, std::move(shaderFP), grPaint);
diff --git a/src/gpu/SkGr.h b/src/gpu/SkGr.h
index 1f7f2ad..126dc4c 100644
--- a/src/gpu/SkGr.h
+++ b/src/gpu/SkGr.h
@@ -115,7 +115,7 @@
 bool SkPaintToGrPaintReplaceShader(GrContext*,
                                    GrRenderTargetContext*,
                                    const SkPaint& skPaint,
-                                   sk_sp<GrFragmentProcessor> shaderFP,
+                                   std::unique_ptr<GrFragmentProcessor> shaderFP,
                                    GrPaint* grPaint);
 
 /** Blends the SkPaint's shader (or color if no shader) with the color which specified via a
@@ -143,7 +143,7 @@
                                  GrRenderTargetContext* rtc,
                                  const SkPaint& paint,
                                  const SkMatrix& viewM,
-                                 sk_sp<GrFragmentProcessor> fp,
+                                 std::unique_ptr<GrFragmentProcessor> fp,
                                  bool textureIsAlphaOnly,
                                  GrPaint* grPaint);
 
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index 28fcd9e..c8b302c 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -188,7 +188,7 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrBicubicEffect);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrBicubicEffect::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> GrBicubicEffect::TestCreate(GrProcessorTestData* d) {
     int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
                                         : GrProcessorUnitTest::kAlphaTextureIdx;
     sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(d->fRandom);
diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h
index 65e2c3d..7812f3f 100644
--- a/src/gpu/effects/GrBicubicEffect.h
+++ b/src/gpu/effects/GrBicubicEffect.h
@@ -22,8 +22,8 @@
 
     const char* name() const override { return "Bicubic"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override {
-        return sk_sp<GrFragmentProcessor>(new GrBicubicEffect(*this));
+    std::unique_ptr<GrFragmentProcessor> clone() const override {
+        return std::unique_ptr<GrFragmentProcessor>(new GrBicubicEffect(*this));
     }
 
     const GrTextureDomain& domain() const { return fDomain; }
@@ -33,25 +33,23 @@
     /**
      * Create a Mitchell filter effect with specified texture matrix and x/y tile modes.
      */
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
-                                           sk_sp<GrColorSpaceXform> colorSpaceXform,
-                                           const SkMatrix& matrix,
-                                           const SkShader::TileMode tileModes[2]) {
-        return sk_sp<GrFragmentProcessor>(new GrBicubicEffect(std::move(proxy),
-                                                              std::move(colorSpaceXform),
-                                                              matrix, tileModes));
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+                                                     sk_sp<GrColorSpaceXform> colorSpaceXform,
+                                                     const SkMatrix& matrix,
+                                                     const SkShader::TileMode tileModes[2]) {
+        return std::unique_ptr<GrFragmentProcessor>(new GrBicubicEffect(
+                std::move(proxy), std::move(colorSpaceXform), matrix, tileModes));
     }
 
     /**
      * Create a Mitchell filter effect with a texture matrix and a domain.
      */
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
-                                           sk_sp<GrColorSpaceXform> colorSpaceXform,
-                                           const SkMatrix& matrix,
-                                           const SkRect& domain) {
-        return sk_sp<GrFragmentProcessor>(new GrBicubicEffect(std::move(proxy),
-                                                              std::move(colorSpaceXform),
-                                                              matrix, domain));
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+                                                     sk_sp<GrColorSpaceXform> colorSpaceXform,
+                                                     const SkMatrix& matrix,
+                                                     const SkRect& domain) {
+        return std::unique_ptr<GrFragmentProcessor>(
+                new GrBicubicEffect(std::move(proxy), std::move(colorSpaceXform), matrix, domain));
     }
 
     /**
diff --git a/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp b/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp
index 8c0ff64..1b5ea60 100644
--- a/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp
+++ b/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp
@@ -55,7 +55,7 @@
         : INHERITED(src.optimizationFlags()), fMode(src.fMode) {
     this->initClassID<GrBlurredEdgeFragmentProcessor>();
 }
-sk_sp<GrFragmentProcessor> GrBlurredEdgeFragmentProcessor::clone() const {
-    return sk_sp<GrFragmentProcessor>(new GrBlurredEdgeFragmentProcessor(*this));
+std::unique_ptr<GrFragmentProcessor> GrBlurredEdgeFragmentProcessor::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(new GrBlurredEdgeFragmentProcessor(*this));
 }
 #endif
diff --git a/src/gpu/effects/GrBlurredEdgeFragmentProcessor.h b/src/gpu/effects/GrBlurredEdgeFragmentProcessor.h
index 677c285..61cc53b 100644
--- a/src/gpu/effects/GrBlurredEdgeFragmentProcessor.h
+++ b/src/gpu/effects/GrBlurredEdgeFragmentProcessor.h
@@ -19,11 +19,11 @@
 public:
     enum Mode { kGaussian_Mode = 0, kSmoothStep_Mode = 1 };
     int mode() const { return fMode; }
-    static sk_sp<GrFragmentProcessor> Make(int mode) {
-        return sk_sp<GrFragmentProcessor>(new GrBlurredEdgeFragmentProcessor(mode));
+    static std::unique_ptr<GrFragmentProcessor> Make(int mode) {
+        return std::unique_ptr<GrFragmentProcessor>(new GrBlurredEdgeFragmentProcessor(mode));
     }
     GrBlurredEdgeFragmentProcessor(const GrBlurredEdgeFragmentProcessor& src);
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
     const char* name() const override { return "BlurredEdgeFragmentProcessor"; }
 
 private:
diff --git a/src/gpu/effects/GrCircleEffect.cpp b/src/gpu/effects/GrCircleEffect.cpp
index 6fc4755..b764559 100644
--- a/src/gpu/effects/GrCircleEffect.cpp
+++ b/src/gpu/effects/GrCircleEffect.cpp
@@ -95,12 +95,12 @@
         , fRadius(src.fRadius) {
     this->initClassID<GrCircleEffect>();
 }
-sk_sp<GrFragmentProcessor> GrCircleEffect::clone() const {
-    return sk_sp<GrFragmentProcessor>(new GrCircleEffect(*this));
+std::unique_ptr<GrFragmentProcessor> GrCircleEffect::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(new GrCircleEffect(*this));
 }
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrCircleEffect);
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrCircleEffect::TestCreate(GrProcessorTestData* testData) {
+std::unique_ptr<GrFragmentProcessor> GrCircleEffect::TestCreate(GrProcessorTestData* testData) {
     SkPoint center;
     center.fX = testData->fRandom->nextRangeScalar(0.f, 1000.f);
     center.fY = testData->fRandom->nextRangeScalar(0.f, 1000.f);
diff --git a/src/gpu/effects/GrCircleEffect.h b/src/gpu/effects/GrCircleEffect.h
index 46e46f9..0d88dcb 100644
--- a/src/gpu/effects/GrCircleEffect.h
+++ b/src/gpu/effects/GrCircleEffect.h
@@ -20,11 +20,11 @@
     int edgeType() const { return fEdgeType; }
     SkPoint center() const { return fCenter; }
     float radius() const { return fRadius; }
-    static sk_sp<GrFragmentProcessor> Make(int edgeType, SkPoint center, float radius) {
-        return sk_sp<GrFragmentProcessor>(new GrCircleEffect(edgeType, center, radius));
+    static std::unique_ptr<GrFragmentProcessor> Make(int edgeType, SkPoint center, float radius) {
+        return std::unique_ptr<GrFragmentProcessor>(new GrCircleEffect(edgeType, center, radius));
     }
     GrCircleEffect(const GrCircleEffect& src);
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
     const char* name() const override { return "CircleEffect"; }
 
 private:
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 8806481..e784ed7 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -70,8 +70,8 @@
     this->initClassID<GrConfigConversionEffect>();
 }
 
-sk_sp<GrFragmentProcessor> GrConfigConversionEffect::clone() const {
-    return sk_sp<GrFragmentProcessor>(new GrConfigConversionEffect(fPMConversion));
+std::unique_ptr<GrFragmentProcessor> GrConfigConversionEffect::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(new GrConfigConversionEffect(fPMConversion));
 }
 
 bool GrConfigConversionEffect::onIsEqual(const GrFragmentProcessor& s) const {
@@ -84,9 +84,9 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConfigConversionEffect);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrConfigConversionEffect::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> GrConfigConversionEffect::TestCreate(GrProcessorTestData* d) {
     PMConversion pmConv = static_cast<PMConversion>(d->fRandom->nextULessThan(kPMConversionCnt));
-    return sk_sp<GrFragmentProcessor>(new GrConfigConversionEffect(pmConv));
+    return std::unique_ptr<GrFragmentProcessor>(new GrConfigConversionEffect(pmConv));
 }
 #endif
 
@@ -158,11 +158,13 @@
     GrPaint paint1;
     GrPaint paint2;
     GrPaint paint3;
-    sk_sp<GrFragmentProcessor> pmToUPM(new GrConfigConversionEffect(kToUnpremul_PMConversion));
-    sk_sp<GrFragmentProcessor> upmToPM(new GrConfigConversionEffect(kToPremul_PMConversion));
+    std::unique_ptr<GrFragmentProcessor> pmToUPM(
+            new GrConfigConversionEffect(kToUnpremul_PMConversion));
+    std::unique_ptr<GrFragmentProcessor> upmToPM(
+            new GrConfigConversionEffect(kToPremul_PMConversion));
 
     paint1.addColorTextureProcessor(dataProxy, nullptr, SkMatrix::I());
-    paint1.addColorFragmentProcessor(pmToUPM);
+    paint1.addColorFragmentProcessor(pmToUPM->clone());
     paint1.setPorterDuffXPFactory(SkBlendMode::kSrc);
 
     readRTC->fillRectToRect(GrNoClip(), std::move(paint1), GrAA::kNo, SkMatrix::I(), kRect, kRect);
@@ -199,12 +201,12 @@
     return true;
 }
 
-sk_sp<GrFragmentProcessor> GrConfigConversionEffect::Make(sk_sp<GrFragmentProcessor> fp,
-                                                          PMConversion pmConversion) {
+std::unique_ptr<GrFragmentProcessor> GrConfigConversionEffect::Make(
+        std::unique_ptr<GrFragmentProcessor> fp, PMConversion pmConversion) {
     if (!fp) {
         return nullptr;
     }
-    sk_sp<GrFragmentProcessor> ccFP(new GrConfigConversionEffect(pmConversion));
-    sk_sp<GrFragmentProcessor> fpPipeline[] = { fp, ccFP };
+    std::unique_ptr<GrFragmentProcessor> ccFP(new GrConfigConversionEffect(pmConversion));
+    std::unique_ptr<GrFragmentProcessor> fpPipeline[] = { std::move(fp), std::move(ccFP) };
     return GrFragmentProcessor::RunInSeries(fpPipeline, 2);
 }
diff --git a/src/gpu/effects/GrConfigConversionEffect.h b/src/gpu/effects/GrConfigConversionEffect.h
index fe8f50b..690fbd5 100644
--- a/src/gpu/effects/GrConfigConversionEffect.h
+++ b/src/gpu/effects/GrConfigConversionEffect.h
@@ -29,11 +29,12 @@
      *  Returns a fragment processor that calls the passed in fragment processor, and then performs
      *  the requested premul or unpremul conversion.
      */
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrFragmentProcessor>, PMConversion);
+    static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor>,
+                                                     PMConversion);
 
     const char* name() const override { return "Config Conversion"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
 
     PMConversion  pmConversion() const { return fPMConversion; }
 
diff --git a/src/gpu/effects/GrConstColorProcessor.cpp b/src/gpu/effects/GrConstColorProcessor.cpp
index d5f4e35..0859224 100644
--- a/src/gpu/effects/GrConstColorProcessor.cpp
+++ b/src/gpu/effects/GrConstColorProcessor.cpp
@@ -62,7 +62,9 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-sk_sp<GrFragmentProcessor> GrConstColorProcessor::clone() const { return Make(fColor, fMode); }
+std::unique_ptr<GrFragmentProcessor> GrConstColorProcessor::clone() const {
+    return Make(fColor, fMode);
+}
 
 GrColor4f GrConstColorProcessor::constantOutputForConstantInput(GrColor4f input) const {
     switch (fMode) {
@@ -96,7 +98,7 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConstColorProcessor);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrConstColorProcessor::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> GrConstColorProcessor::TestCreate(GrProcessorTestData* d) {
     GrColor4f color;
     int colorPicker = d->fRandom->nextULessThan(3);
     switch (colorPicker) {
diff --git a/src/gpu/effects/GrConstColorProcessor.h b/src/gpu/effects/GrConstColorProcessor.h
index baf405a..7079a8d 100644
--- a/src/gpu/effects/GrConstColorProcessor.h
+++ b/src/gpu/effects/GrConstColorProcessor.h
@@ -26,8 +26,8 @@
     };
     static const int kInputModeCnt = kLastInputMode + 1;
 
-    static sk_sp<GrFragmentProcessor> Make(GrColor4f color, InputMode mode) {
-        return sk_sp<GrFragmentProcessor>(new GrConstColorProcessor(color, mode));
+    static std::unique_ptr<GrFragmentProcessor> Make(GrColor4f color, InputMode mode) {
+        return std::unique_ptr<GrFragmentProcessor>(new GrConstColorProcessor(color, mode));
     }
 
     const char* name() const override { return "Color"; }
@@ -38,7 +38,7 @@
         return str;
     }
 
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
 
     GrColor4f color() const { return fColor; }
 
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index bb61cc1..e61923c 100644
--- a/src/gpu/effects/GrConvexPolyEffect.cpp
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp
@@ -19,15 +19,16 @@
 public:
     const SkRect& getRect() const { return fRect; }
 
-    static sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType edgeType, const SkRect& rect) {
-        return sk_sp<GrFragmentProcessor>(new AARectEffect(edgeType, rect));
+    static std::unique_ptr<GrFragmentProcessor> Make(GrPrimitiveEdgeType edgeType,
+                                                     const SkRect& rect) {
+        return std::unique_ptr<GrFragmentProcessor>(new AARectEffect(edgeType, rect));
     }
 
     GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; }
 
     const char* name() const override { return "AARect"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override { return Make(fEdgeType, fRect); }
+    std::unique_ptr<GrFragmentProcessor> clone() const override { return Make(fEdgeType, fRect); }
 
 private:
     void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override;
@@ -58,12 +59,12 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(AARectEffect);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> AARectEffect::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> AARectEffect::TestCreate(GrProcessorTestData* d) {
     SkRect rect = SkRect::MakeLTRB(d->fRandom->nextSScalar1(),
                                    d->fRandom->nextSScalar1(),
                                    d->fRandom->nextSScalar1(),
                                    d->fRandom->nextSScalar1());
-    sk_sp<GrFragmentProcessor> fp;
+    std::unique_ptr<GrFragmentProcessor> fp;
     do {
         GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>(
                 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt));
@@ -236,7 +237,8 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-sk_sp<GrFragmentProcessor> GrConvexPolyEffect::Make(GrPrimitiveEdgeType type, const SkPath& path) {
+std::unique_ptr<GrFragmentProcessor> GrConvexPolyEffect::Make(GrPrimitiveEdgeType type,
+                                                              const SkPath& path) {
     if (kHairlineAA_GrProcessorEdgeType == type) {
         return nullptr;
     }
@@ -306,8 +308,8 @@
     return Make(type, n, edges);
 }
 
-sk_sp<GrFragmentProcessor> GrConvexPolyEffect::Make(GrPrimitiveEdgeType edgeType,
-                                                    const SkRect& rect) {
+std::unique_ptr<GrFragmentProcessor> GrConvexPolyEffect::Make(GrPrimitiveEdgeType edgeType,
+                                                              const SkRect& rect) {
     if (kHairlineAA_GrProcessorEdgeType == edgeType){
         return nullptr;
     }
@@ -348,8 +350,8 @@
     memcpy(fEdges, that.fEdges, 3 * that.fEdgeCount * sizeof(SkScalar));
 }
 
-sk_sp<GrFragmentProcessor> GrConvexPolyEffect::clone() const {
-    return sk_sp<GrFragmentProcessor>(new GrConvexPolyEffect(*this));
+std::unique_ptr<GrFragmentProcessor> GrConvexPolyEffect::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(new GrConvexPolyEffect(*this));
 }
 
 bool GrConvexPolyEffect::onIsEqual(const GrFragmentProcessor& other) const {
@@ -364,14 +366,14 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConvexPolyEffect);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrConvexPolyEffect::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> GrConvexPolyEffect::TestCreate(GrProcessorTestData* d) {
     int count = d->fRandom->nextULessThan(kMaxEdges) + 1;
     SkScalar edges[kMaxEdges * 3];
     for (int i = 0; i < 3 * count; ++i) {
         edges[i] = d->fRandom->nextSScalar1();
     }
 
-    sk_sp<GrFragmentProcessor> fp;
+    std::unique_ptr<GrFragmentProcessor> fp;
     do {
         GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>(
                 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt));
diff --git a/src/gpu/effects/GrConvexPolyEffect.h b/src/gpu/effects/GrConvexPolyEffect.h
index f1f6ab0..abb718e 100644
--- a/src/gpu/effects/GrConvexPolyEffect.h
+++ b/src/gpu/effects/GrConvexPolyEffect.h
@@ -38,30 +38,30 @@
      * have to modify the effect/shaderbuilder interface to make it possible (e.g. give access
      * to the view matrix or untransformed positions in the fragment shader).
      */
-    static sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType edgeType, int n,
-                                           const SkScalar edges[]) {
+    static std::unique_ptr<GrFragmentProcessor> Make(GrPrimitiveEdgeType edgeType, int n,
+                                                     const SkScalar edges[]) {
         if (n <= 0 || n > kMaxEdges || kHairlineAA_GrProcessorEdgeType == edgeType) {
             return nullptr;
         }
-        return sk_sp<GrFragmentProcessor>(new GrConvexPolyEffect(edgeType, n, edges));
+        return std::unique_ptr<GrFragmentProcessor>(new GrConvexPolyEffect(edgeType, n, edges));
     }
 
     /**
      * Creates an effect that clips against the path. If the path is not a convex polygon, is
      * inverse filled, or has too many edges, this will return nullptr.
      */
-    static sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkPath&);
+    static std::unique_ptr<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkPath&);
 
     /**
      * Creates an effect that fills inside the rect with AA edges..
      */
-    static sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkRect&);
+    static std::unique_ptr<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkRect&);
 
     ~GrConvexPolyEffect() override;
 
     const char* name() const override { return "ConvexPoly"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
 
     GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; }
 
diff --git a/src/gpu/effects/GrDitherEffect.cpp b/src/gpu/effects/GrDitherEffect.cpp
index f2fc678..d78af4e 100644
--- a/src/gpu/effects/GrDitherEffect.cpp
+++ b/src/gpu/effects/GrDitherEffect.cpp
@@ -62,14 +62,14 @@
         : INHERITED(src.optimizationFlags()), fRangeType(src.fRangeType) {
     this->initClassID<GrDitherEffect>();
 }
-sk_sp<GrFragmentProcessor> GrDitherEffect::clone() const {
-    return sk_sp<GrFragmentProcessor>(new GrDitherEffect(*this));
+std::unique_ptr<GrFragmentProcessor> GrDitherEffect::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(new GrDitherEffect(*this));
 }
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDitherEffect);
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrDitherEffect::TestCreate(GrProcessorTestData* testData) {
+std::unique_ptr<GrFragmentProcessor> GrDitherEffect::TestCreate(GrProcessorTestData* testData) {
     float range = testData->fRandom->nextRangeF(0.001f, 0.05f);
-    return sk_sp<GrFragmentProcessor>(new GrDitherEffect(range));
+    return std::unique_ptr<GrFragmentProcessor>(new GrDitherEffect(range));
 }
 #endif
 #endif
diff --git a/src/gpu/effects/GrDitherEffect.fp b/src/gpu/effects/GrDitherEffect.fp
index 7ec852e..fe641c6 100644
--- a/src/gpu/effects/GrDitherEffect.fp
+++ b/src/gpu/effects/GrDitherEffect.fp
@@ -2,7 +2,7 @@
 layout(key) in int rangeType;
 
 @make {
-    static sk_sp<GrFragmentProcessor> Make(GrPixelConfig dstConfig) {
+    static std::unique_ptr<GrFragmentProcessor> Make(GrPixelConfig dstConfig) {
         int rangeType;
         switch (dstConfig) {
             case kGray_8_GrPixelConfig:
@@ -27,7 +27,7 @@
             case kAlpha_8_GrPixelConfig:
                 return nullptr;
         }
-        return sk_sp<GrFragmentProcessor>(new GrDitherEffect(rangeType));
+        return std::unique_ptr<GrFragmentProcessor>(new GrDitherEffect(rangeType));
     }
 }
 
@@ -68,5 +68,5 @@
 
 @test(testData) {
     float range = testData->fRandom->nextRangeF(0.001f, 0.05f);
-    return sk_sp<GrFragmentProcessor>(new GrDitherEffect(range));
+    return std::unique_ptr<GrFragmentProcessor>(new GrDitherEffect(range));
 }
diff --git a/src/gpu/effects/GrDitherEffect.h b/src/gpu/effects/GrDitherEffect.h
index 529b5ec..d428c3c 100644
--- a/src/gpu/effects/GrDitherEffect.h
+++ b/src/gpu/effects/GrDitherEffect.h
@@ -19,7 +19,7 @@
 public:
     int rangeType() const { return fRangeType; }
 
-    static sk_sp<GrFragmentProcessor> Make(GrPixelConfig dstConfig) {
+    static std::unique_ptr<GrFragmentProcessor> Make(GrPixelConfig dstConfig) {
         int rangeType;
         switch (dstConfig) {
             case kGray_8_GrPixelConfig:
@@ -44,10 +44,10 @@
             case kAlpha_8_GrPixelConfig:
                 return nullptr;
         }
-        return sk_sp<GrFragmentProcessor>(new GrDitherEffect(rangeType));
+        return std::unique_ptr<GrFragmentProcessor>(new GrDitherEffect(rangeType));
     }
     GrDitherEffect(const GrDitherEffect& src);
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
     const char* name() const override { return "DitherEffect"; }
 
 private:
diff --git a/src/gpu/effects/GrEllipseEffect.cpp b/src/gpu/effects/GrEllipseEffect.cpp
index edf12d2..e9443a8 100644
--- a/src/gpu/effects/GrEllipseEffect.cpp
+++ b/src/gpu/effects/GrEllipseEffect.cpp
@@ -120,12 +120,12 @@
         , fRadii(src.fRadii) {
     this->initClassID<GrEllipseEffect>();
 }
-sk_sp<GrFragmentProcessor> GrEllipseEffect::clone() const {
-    return sk_sp<GrFragmentProcessor>(new GrEllipseEffect(*this));
+std::unique_ptr<GrFragmentProcessor> GrEllipseEffect::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(new GrEllipseEffect(*this));
 }
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrEllipseEffect);
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrEllipseEffect::TestCreate(GrProcessorTestData* testData) {
+std::unique_ptr<GrFragmentProcessor> GrEllipseEffect::TestCreate(GrProcessorTestData* testData) {
     SkPoint center;
     center.fX = testData->fRandom->nextRangeScalar(0.f, 1000.f);
     center.fY = testData->fRandom->nextRangeScalar(0.f, 1000.f);
diff --git a/src/gpu/effects/GrEllipseEffect.h b/src/gpu/effects/GrEllipseEffect.h
index 2858656..1425f39 100644
--- a/src/gpu/effects/GrEllipseEffect.h
+++ b/src/gpu/effects/GrEllipseEffect.h
@@ -20,11 +20,11 @@
     int edgeType() const { return fEdgeType; }
     SkPoint center() const { return fCenter; }
     SkPoint radii() const { return fRadii; }
-    static sk_sp<GrFragmentProcessor> Make(int edgeType, SkPoint center, SkPoint radii) {
-        return sk_sp<GrFragmentProcessor>(new GrEllipseEffect(edgeType, center, radii));
+    static std::unique_ptr<GrFragmentProcessor> Make(int edgeType, SkPoint center, SkPoint radii) {
+        return std::unique_ptr<GrFragmentProcessor>(new GrEllipseEffect(edgeType, center, radii));
     }
     GrEllipseEffect(const GrEllipseEffect& src);
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
     const char* name() const override { return "EllipseEffect"; }
 
 private:
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index ac22a8c..b54ca53 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -255,7 +255,7 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrGaussianConvolutionFragmentProcessor);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrGaussianConvolutionFragmentProcessor::TestCreate(
+std::unique_ptr<GrFragmentProcessor> GrGaussianConvolutionFragmentProcessor::TestCreate(
         GrProcessorTestData* d) {
     int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
                                         : GrProcessorUnitTest::kAlphaTextureIdx;
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
index 74e9a94..9850e60 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
@@ -22,14 +22,14 @@
     enum class Direction { kX, kY };
 
     /// Convolve with a Gaussian kernel
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
-                                           Direction dir,
-                                           int halfWidth,
-                                           float gaussianSigma,
-                                           GrTextureDomain::Mode mode,
-                                           int* bounds) {
-        return sk_sp<GrFragmentProcessor>(new GrGaussianConvolutionFragmentProcessor(
-            std::move(proxy), dir, halfWidth, gaussianSigma, mode, bounds));
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+                                                     Direction dir,
+                                                     int halfWidth,
+                                                     float gaussianSigma,
+                                                     GrTextureDomain::Mode mode,
+                                                     int* bounds) {
+        return std::unique_ptr<GrFragmentProcessor>(new GrGaussianConvolutionFragmentProcessor(
+                std::move(proxy), dir, halfWidth, gaussianSigma, mode, bounds));
     }
 
     const float* kernel() const { return fKernel; }
@@ -44,8 +44,9 @@
 
     const char* name() const override { return "GaussianConvolution"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override {
-        return sk_sp<GrFragmentProcessor>(new GrGaussianConvolutionFragmentProcessor(*this));
+    std::unique_ptr<GrFragmentProcessor> clone() const override {
+        return std::unique_ptr<GrFragmentProcessor>(
+                new GrGaussianConvolutionFragmentProcessor(*this));
     }
 
     // This was decided based on the min allowed value for the max texture
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 030a926..9d9a03e 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -194,8 +194,8 @@
     memcpy(fKernelOffset, that.fKernelOffset, sizeof(fKernelOffset));
 }
 
-sk_sp<GrFragmentProcessor> GrMatrixConvolutionEffect::clone() const {
-    return sk_sp<GrFragmentProcessor>(new GrMatrixConvolutionEffect(*this));
+std::unique_ptr<GrFragmentProcessor> GrMatrixConvolutionEffect::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(new GrMatrixConvolutionEffect(*this));
 }
 
 void GrMatrixConvolutionEffect::onGetGLSLProcessorKey(const GrShaderCaps& caps,
@@ -248,30 +248,30 @@
 }
 
 // Static function to create a 2D convolution
-sk_sp<GrFragmentProcessor> GrMatrixConvolutionEffect::MakeGaussian(
-                                                            sk_sp<GrTextureProxy> proxy,
-                                                            const SkIRect& bounds,
-                                                            const SkISize& kernelSize,
-                                                            SkScalar gain,
-                                                            SkScalar bias,
-                                                            const SkIPoint& kernelOffset,
-                                                            GrTextureDomain::Mode tileMode,
-                                                            bool convolveAlpha,
-                                                            SkScalar sigmaX,
-                                                            SkScalar sigmaY) {
+std::unique_ptr<GrFragmentProcessor> GrMatrixConvolutionEffect::MakeGaussian(
+        sk_sp<GrTextureProxy> proxy,
+        const SkIRect& bounds,
+        const SkISize& kernelSize,
+        SkScalar gain,
+        SkScalar bias,
+        const SkIPoint& kernelOffset,
+        GrTextureDomain::Mode tileMode,
+        bool convolveAlpha,
+        SkScalar sigmaX,
+        SkScalar sigmaY) {
     float kernel[MAX_KERNEL_SIZE];
 
     fill_in_2D_gaussian_kernel(kernel, kernelSize.width(), kernelSize.height(), sigmaX, sigmaY);
 
-    return sk_sp<GrFragmentProcessor>(
-        new GrMatrixConvolutionEffect(std::move(proxy), bounds, kernelSize,
-                                      kernel, gain, bias, kernelOffset, tileMode, convolveAlpha));
+    return std::unique_ptr<GrFragmentProcessor>(
+            new GrMatrixConvolutionEffect(std::move(proxy), bounds, kernelSize, kernel, gain, bias,
+                                          kernelOffset, tileMode, convolveAlpha));
 }
 
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrMatrixConvolutionEffect);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrMatrixConvolutionEffect::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> GrMatrixConvolutionEffect::TestCreate(GrProcessorTestData* d) {
     int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
                                         : GrProcessorUnitTest::kAlphaTextureIdx;
     sk_sp<GrTextureProxy> proxy = d->textureProxy(texIdx);
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.h b/src/gpu/effects/GrMatrixConvolutionEffect.h
index 9ece00e..2e859b1 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.h
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.h
@@ -16,30 +16,30 @@
 
 class GrMatrixConvolutionEffect : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
-                                           const SkIRect& bounds,
-                                           const SkISize& kernelSize,
-                                           const SkScalar* kernel,
-                                           SkScalar gain,
-                                           SkScalar bias,
-                                           const SkIPoint& kernelOffset,
-                                           GrTextureDomain::Mode tileMode,
-                                           bool convolveAlpha) {
-        return sk_sp<GrFragmentProcessor>(
-            new GrMatrixConvolutionEffect(std::move(proxy), bounds, kernelSize,
-                                          kernel, gain, bias, kernelOffset, tileMode, convolveAlpha));
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+                                                     const SkIRect& bounds,
+                                                     const SkISize& kernelSize,
+                                                     const SkScalar* kernel,
+                                                     SkScalar gain,
+                                                     SkScalar bias,
+                                                     const SkIPoint& kernelOffset,
+                                                     GrTextureDomain::Mode tileMode,
+                                                     bool convolveAlpha) {
+        return std::unique_ptr<GrFragmentProcessor>(
+                new GrMatrixConvolutionEffect(std::move(proxy), bounds, kernelSize, kernel, gain,
+                                              bias, kernelOffset, tileMode, convolveAlpha));
     }
 
-    static sk_sp<GrFragmentProcessor> MakeGaussian(sk_sp<GrTextureProxy> proxy,
-                                                   const SkIRect& bounds,
-                                                   const SkISize& kernelSize,
-                                                   SkScalar gain,
-                                                   SkScalar bias,
-                                                   const SkIPoint& kernelOffset,
-                                                   GrTextureDomain::Mode tileMode,
-                                                   bool convolveAlpha,
-                                                   SkScalar sigmaX,
-                                                   SkScalar sigmaY);
+    static std::unique_ptr<GrFragmentProcessor> MakeGaussian(sk_sp<GrTextureProxy> proxy,
+                                                             const SkIRect& bounds,
+                                                             const SkISize& kernelSize,
+                                                             SkScalar gain,
+                                                             SkScalar bias,
+                                                             const SkIPoint& kernelOffset,
+                                                             GrTextureDomain::Mode tileMode,
+                                                             bool convolveAlpha,
+                                                             SkScalar sigmaX,
+                                                             SkScalar sigmaY);
 
     const SkIRect& bounds() const { return fBounds; }
     const SkISize& kernelSize() const { return fKernelSize; }
@@ -52,7 +52,7 @@
 
     const char* name() const override { return "MatrixConvolution"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
 
 private:
     GrMatrixConvolutionEffect(sk_sp<GrTextureProxy> proxy,
diff --git a/src/gpu/effects/GrNonlinearColorSpaceXformEffect.cpp b/src/gpu/effects/GrNonlinearColorSpaceXformEffect.cpp
index 6ae770b..b30746a 100644
--- a/src/gpu/effects/GrNonlinearColorSpaceXformEffect.cpp
+++ b/src/gpu/effects/GrNonlinearColorSpaceXformEffect.cpp
@@ -173,8 +173,8 @@
     memcpy(fDstTransferFnCoeffs, that.fDstTransferFnCoeffs, sizeof(fDstTransferFnCoeffs));
 }
 
-sk_sp<GrFragmentProcessor> GrNonlinearColorSpaceXformEffect::clone() const {
-    return sk_sp<GrFragmentProcessor>(new GrNonlinearColorSpaceXformEffect(*this));
+std::unique_ptr<GrFragmentProcessor> GrNonlinearColorSpaceXformEffect::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(new GrNonlinearColorSpaceXformEffect(*this));
 }
 
 bool GrNonlinearColorSpaceXformEffect::onIsEqual(const GrFragmentProcessor& s) const {
@@ -201,7 +201,8 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrNonlinearColorSpaceXformEffect);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrNonlinearColorSpaceXformEffect::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> GrNonlinearColorSpaceXformEffect::TestCreate(
+        GrProcessorTestData* d) {
     // TODO: Generate a random variety of color spaces for this effect (it can handle wacky
     // transfer functions, etc...)
     sk_sp<SkColorSpace> srcSpace = SkColorSpace::MakeSRGBLinear();
@@ -221,8 +222,8 @@
     return new GrGLNonlinearColorSpaceXformEffect();
 }
 
-sk_sp<GrFragmentProcessor> GrNonlinearColorSpaceXformEffect::Make(const SkColorSpace* src,
-                                                                  const SkColorSpace* dst) {
+std::unique_ptr<GrFragmentProcessor> GrNonlinearColorSpaceXformEffect::Make(
+        const SkColorSpace* src, const SkColorSpace* dst) {
     if (!src || !dst || SkColorSpace::Equals(src, dst)) {
         // No conversion possible (or necessary)
         return nullptr;
@@ -257,6 +258,6 @@
         }
     }
 
-    return sk_sp<GrFragmentProcessor>(new GrNonlinearColorSpaceXformEffect(
-            ops, srcTransferFn, dstTransferFn, srcToDstMtx));
+    return std::unique_ptr<GrFragmentProcessor>(
+            new GrNonlinearColorSpaceXformEffect(ops, srcTransferFn, dstTransferFn, srcToDstMtx));
 }
diff --git a/src/gpu/effects/GrNonlinearColorSpaceXformEffect.h b/src/gpu/effects/GrNonlinearColorSpaceXformEffect.h
index f57c64b..109ec10 100644
--- a/src/gpu/effects/GrNonlinearColorSpaceXformEffect.h
+++ b/src/gpu/effects/GrNonlinearColorSpaceXformEffect.h
@@ -27,11 +27,12 @@
      * This will return nullptr if either space is nullptr, if both spaces are equal, or if either
      * space has a non-parametric transfer funcion (e.g. lookup table or A2B).
      */
-    static sk_sp<GrFragmentProcessor> Make(const SkColorSpace* src, const SkColorSpace* dst);
+    static std::unique_ptr<GrFragmentProcessor> Make(const SkColorSpace* src,
+                                                     const SkColorSpace* dst);
 
     const char* name() const override { return "NonlinearColorSpaceXform"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
 
     static const int kNumTransferFnCoeffs = 7;
 
diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp
index 3180533..efc86a4 100644
--- a/src/gpu/effects/GrOvalEffect.cpp
+++ b/src/gpu/effects/GrOvalEffect.cpp
@@ -11,7 +11,8 @@
 #include "GrEllipseEffect.h"
 #include "SkRect.h"
 
-sk_sp<GrFragmentProcessor> GrOvalEffect::Make(GrPrimitiveEdgeType edgeType, const SkRect& oval) {
+std::unique_ptr<GrFragmentProcessor> GrOvalEffect::Make(GrPrimitiveEdgeType edgeType,
+                                                        const SkRect& oval) {
     if (kHairlineAA_GrProcessorEdgeType == edgeType) {
         return nullptr;
     }
diff --git a/src/gpu/effects/GrOvalEffect.h b/src/gpu/effects/GrOvalEffect.h
index 3ff241a..1372f23 100644
--- a/src/gpu/effects/GrOvalEffect.h
+++ b/src/gpu/effects/GrOvalEffect.h
@@ -16,10 +16,12 @@
 struct SkRect;
 
 namespace GrOvalEffect {
-    /**
-     * Creates an effect that performs clipping against an oval.
-     */
-    sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkRect&);
+
+/**
+ * Creates an effect that performs clipping against an oval.
+ */
+std::unique_ptr<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkRect&);
+
 };
 
 #endif
diff --git a/src/gpu/effects/GrRRectEffect.cpp b/src/gpu/effects/GrRRectEffect.cpp
index 8dde914..f253dfe 100644
--- a/src/gpu/effects/GrRRectEffect.cpp
+++ b/src/gpu/effects/GrRRectEffect.cpp
@@ -45,14 +45,14 @@
 
     // The flags are used to indicate which corners are circluar (unflagged corners are assumed to
     // be square).
-    static sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType, uint32_t circularCornerFlags,
-                                           const SkRRect&);
+    static std::unique_ptr<GrFragmentProcessor> Make(GrPrimitiveEdgeType,
+                                                     uint32_t circularCornerFlags, const SkRRect&);
 
     ~CircularRRectEffect() override {}
 
     const char* name() const override { return "CircularRRect"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
 
     const SkRRect& getRRect() const { return fRRect; }
 
@@ -78,14 +78,14 @@
     typedef GrFragmentProcessor INHERITED;
 };
 
-sk_sp<GrFragmentProcessor> CircularRRectEffect::Make(GrPrimitiveEdgeType edgeType,
-                                                     uint32_t circularCornerFlags,
-                                                     const SkRRect& rrect) {
+std::unique_ptr<GrFragmentProcessor> CircularRRectEffect::Make(GrPrimitiveEdgeType edgeType,
+                                                               uint32_t circularCornerFlags,
+                                                               const SkRRect& rrect) {
     if (kFillAA_GrProcessorEdgeType != edgeType && kInverseFillAA_GrProcessorEdgeType != edgeType) {
         return nullptr;
     }
-    return sk_sp<GrFragmentProcessor>(
-        new CircularRRectEffect(edgeType, circularCornerFlags, rrect));
+    return std::unique_ptr<GrFragmentProcessor>(
+            new CircularRRectEffect(edgeType, circularCornerFlags, rrect));
 }
 
 CircularRRectEffect::CircularRRectEffect(GrPrimitiveEdgeType edgeType, uint32_t circularCornerFlags,
@@ -97,8 +97,8 @@
     this->initClassID<CircularRRectEffect>();
 }
 
-sk_sp<GrFragmentProcessor> CircularRRectEffect::clone() const {
-    return sk_sp<GrFragmentProcessor>(
+std::unique_ptr<GrFragmentProcessor> CircularRRectEffect::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(
             new CircularRRectEffect(fEdgeType, fCircularCornerFlags, fRRect));
 }
 
@@ -113,13 +113,13 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(CircularRRectEffect);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> CircularRRectEffect::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> CircularRRectEffect::TestCreate(GrProcessorTestData* d) {
     SkScalar w = d->fRandom->nextRangeScalar(20.f, 1000.f);
     SkScalar h = d->fRandom->nextRangeScalar(20.f, 1000.f);
     SkScalar r = d->fRandom->nextRangeF(kRadiusMin, 9.f);
     SkRRect rrect;
     rrect.setRectXY(SkRect::MakeWH(w, h), r, r);
-    sk_sp<GrFragmentProcessor> fp;
+    std::unique_ptr<GrFragmentProcessor> fp;
     do {
         GrPrimitiveEdgeType et =
                 (GrPrimitiveEdgeType)d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt);
@@ -391,13 +391,13 @@
 
 class EllipticalRRectEffect : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkRRect&);
+    static std::unique_ptr<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkRRect&);
 
     ~EllipticalRRectEffect() override {}
 
     const char* name() const override { return "EllipticalRRect"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
 
     const SkRRect& getRRect() const { return fRRect; }
 
@@ -420,12 +420,12 @@
     typedef GrFragmentProcessor INHERITED;
 };
 
-sk_sp<GrFragmentProcessor>
-EllipticalRRectEffect::Make(GrPrimitiveEdgeType edgeType, const SkRRect& rrect) {
+std::unique_ptr<GrFragmentProcessor> EllipticalRRectEffect::Make(GrPrimitiveEdgeType edgeType,
+                                                                 const SkRRect& rrect) {
     if (kFillAA_GrProcessorEdgeType != edgeType && kInverseFillAA_GrProcessorEdgeType != edgeType) {
         return nullptr;
     }
-    return sk_sp<GrFragmentProcessor>(new EllipticalRRectEffect(edgeType, rrect));
+    return std::unique_ptr<GrFragmentProcessor>(new EllipticalRRectEffect(edgeType, rrect));
 }
 
 EllipticalRRectEffect::EllipticalRRectEffect(GrPrimitiveEdgeType edgeType, const SkRRect& rrect)
@@ -435,8 +435,8 @@
     this->initClassID<EllipticalRRectEffect>();
 }
 
-sk_sp<GrFragmentProcessor> EllipticalRRectEffect::clone() const {
-    return sk_sp<GrFragmentProcessor>(new EllipticalRRectEffect(fEdgeType, fRRect));
+std::unique_ptr<GrFragmentProcessor> EllipticalRRectEffect::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(new EllipticalRRectEffect(fEdgeType, fRRect));
 }
 
 bool EllipticalRRectEffect::onIsEqual(const GrFragmentProcessor& other) const {
@@ -449,7 +449,7 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(EllipticalRRectEffect);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> EllipticalRRectEffect::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> EllipticalRRectEffect::TestCreate(GrProcessorTestData* d) {
     SkScalar w = d->fRandom->nextRangeScalar(20.f, 1000.f);
     SkScalar h = d->fRandom->nextRangeScalar(20.f, 1000.f);
     SkVector r[4];
@@ -476,7 +476,7 @@
         rrect.setRectXY(SkRect::MakeWH(w, h), r[SkRRect::kUpperLeft_Corner].fX,
                                               r[SkRRect::kUpperLeft_Corner].fY);
     }
-    sk_sp<GrFragmentProcessor> fp;
+    std::unique_ptr<GrFragmentProcessor> fp;
     do {
         GrPrimitiveEdgeType et =
                 (GrPrimitiveEdgeType)d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt);
@@ -684,7 +684,8 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-sk_sp<GrFragmentProcessor> GrRRectEffect::Make(GrPrimitiveEdgeType edgeType, const SkRRect& rrect) {
+std::unique_ptr<GrFragmentProcessor> GrRRectEffect::Make(GrPrimitiveEdgeType edgeType,
+                                                         const SkRRect& rrect) {
     if (rrect.isRect()) {
         return GrConvexPolyEffect::Make(edgeType, rrect.getBounds());
     }
diff --git a/src/gpu/effects/GrRRectEffect.h b/src/gpu/effects/GrRRectEffect.h
index 6ff2cc9..fcd600a 100644
--- a/src/gpu/effects/GrRRectEffect.h
+++ b/src/gpu/effects/GrRRectEffect.h
@@ -17,11 +17,13 @@
 class SkRRect;
 
 namespace GrRRectEffect {
-    /**
-     * Creates an effect that performs anti-aliased clipping against a SkRRect. It doesn't support
-     * all varieties of SkRRect so the caller must check for a nullptr return.
-     */
-    sk_sp<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkRRect&);
+
+/**
+ * Creates an effect that performs anti-aliased clipping against a SkRRect. It doesn't support
+ * all varieties of SkRRect so the caller must check for a nullptr return.
+ */
+std::unique_ptr<GrFragmentProcessor> Make(GrPrimitiveEdgeType, const SkRRect&);
+
 };
 
 #endif
diff --git a/src/gpu/effects/GrSRGBEffect.cpp b/src/gpu/effects/GrSRGBEffect.cpp
index 1cffb9e..f415a6c 100644
--- a/src/gpu/effects/GrSRGBEffect.cpp
+++ b/src/gpu/effects/GrSRGBEffect.cpp
@@ -85,7 +85,7 @@
     this->initClassID<GrSRGBEffect>();
 }
 
-sk_sp<GrFragmentProcessor> GrSRGBEffect::clone() const { return Make(fMode, fAlpha); }
+std::unique_ptr<GrFragmentProcessor> GrSRGBEffect::clone() const { return Make(fMode, fAlpha); }
 
 bool GrSRGBEffect::onIsEqual(const GrFragmentProcessor& s) const {
     const GrSRGBEffect& other = s.cast<GrSRGBEffect>();
@@ -119,7 +119,7 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSRGBEffect);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrSRGBEffect::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> GrSRGBEffect::TestCreate(GrProcessorTestData* d) {
     Mode testMode = static_cast<Mode>(d->fRandom->nextRangeU(0, 1));
     return GrSRGBEffect::Make(testMode, Alpha::kPremul);
 }
diff --git a/src/gpu/effects/GrSRGBEffect.h b/src/gpu/effects/GrSRGBEffect.h
index ef6fd28..9b51fca 100644
--- a/src/gpu/effects/GrSRGBEffect.h
+++ b/src/gpu/effects/GrSRGBEffect.h
@@ -25,8 +25,8 @@
     /**
      * Creates an effect that applies the sRGB transfer function (or its inverse)
      */
-    static sk_sp<GrFragmentProcessor> Make(Mode mode, Alpha alpha) {
-        return sk_sp<GrFragmentProcessor>(new GrSRGBEffect(mode, alpha));
+    static std::unique_ptr<GrFragmentProcessor> Make(Mode mode, Alpha alpha) {
+        return std::unique_ptr<GrFragmentProcessor>(new GrSRGBEffect(mode, alpha));
     }
 
     const char* name() const override { return "sRGB"; }
@@ -34,7 +34,7 @@
     Mode mode() const { return fMode; }
     Alpha alpha() const { return fAlpha; }
 
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
 
 private:
     GrSRGBEffect(Mode mode, Alpha);
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index bd2b805..9a0017c 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -80,12 +80,13 @@
     this->addTextureSampler(&fImage);
     this->addCoordTransform(&fImageCoordTransform);
 }
-sk_sp<GrFragmentProcessor> GrSimpleTextureEffect::clone() const {
-    return sk_sp<GrFragmentProcessor>(new GrSimpleTextureEffect(*this));
+std::unique_ptr<GrFragmentProcessor> GrSimpleTextureEffect::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(new GrSimpleTextureEffect(*this));
 }
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrSimpleTextureEffect);
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrSimpleTextureEffect::TestCreate(GrProcessorTestData* testData) {
+std::unique_ptr<GrFragmentProcessor> GrSimpleTextureEffect::TestCreate(
+        GrProcessorTestData* testData) {
     int texIdx = testData->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
                                                : GrProcessorUnitTest::kAlphaTextureIdx;
     static const SkShader::TileMode kTileModes[] = {
diff --git a/src/gpu/effects/GrSimpleTextureEffect.fp b/src/gpu/effects/GrSimpleTextureEffect.fp
index 6f7c818..80824fe 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.fp
+++ b/src/gpu/effects/GrSimpleTextureEffect.fp
@@ -22,29 +22,29 @@
 }
 
 @make {
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
-                                           sk_sp<GrColorSpaceXform> colorSpaceXform,
-                                           const SkMatrix& matrix) {
-        return sk_sp<GrFragmentProcessor>(
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+                                                     sk_sp<GrColorSpaceXform> colorSpaceXform,
+                                                     const SkMatrix& matrix) {
+        return std::unique_ptr<GrFragmentProcessor>(
             new GrSimpleTextureEffect(std::move(proxy), std::move(colorSpaceXform), matrix,
                     GrSamplerParams(SkShader::kClamp_TileMode, GrSamplerParams::kNone_FilterMode)));
     }
 
     /* clamp mode */
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
-                                           sk_sp<GrColorSpaceXform> colorSpaceXform,
-                                           const SkMatrix& matrix,
-                                           GrSamplerParams::FilterMode filterMode) {
-        return sk_sp<GrFragmentProcessor>(
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+                                                     sk_sp<GrColorSpaceXform> colorSpaceXform,
+                                                     const SkMatrix& matrix,
+                                                     GrSamplerParams::FilterMode filterMode) {
+        return std::unique_ptr<GrFragmentProcessor>(
             new GrSimpleTextureEffect(std::move(proxy), std::move(colorSpaceXform), matrix,
                                       GrSamplerParams(SkShader::kClamp_TileMode, filterMode)));
      }
 
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
-                                           sk_sp<GrColorSpaceXform> colorSpaceXform,
-                                           const SkMatrix& matrix,
-                                           const GrSamplerParams& p) {
-        return sk_sp<GrFragmentProcessor>(
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+                                                     sk_sp<GrColorSpaceXform> colorSpaceXform,
+                                                     const SkMatrix& matrix,
+                                                     const GrSamplerParams& p) {
+        return std::unique_ptr<GrFragmentProcessor>(
             new GrSimpleTextureEffect(std::move(proxy), std::move(colorSpaceXform), matrix, p));
     }
 }
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h
index 25ef1c5..11564bb 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/GrSimpleTextureEffect.h
@@ -20,35 +20,35 @@
     sk_sp<GrColorSpaceXform> colorXform() const { return fColorXform; }
     SkMatrix44 matrix() const { return fMatrix; }
 
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
-                                           sk_sp<GrColorSpaceXform>
-                                                   colorSpaceXform,
-                                           const SkMatrix& matrix) {
-        return sk_sp<GrFragmentProcessor>(new GrSimpleTextureEffect(
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+                                                     sk_sp<GrColorSpaceXform>
+                                                             colorSpaceXform,
+                                                     const SkMatrix& matrix) {
+        return std::unique_ptr<GrFragmentProcessor>(new GrSimpleTextureEffect(
                 std::move(proxy), std::move(colorSpaceXform), matrix,
                 GrSamplerParams(SkShader::kClamp_TileMode, GrSamplerParams::kNone_FilterMode)));
     }
 
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
-                                           sk_sp<GrColorSpaceXform>
-                                                   colorSpaceXform,
-                                           const SkMatrix& matrix,
-                                           GrSamplerParams::FilterMode filterMode) {
-        return sk_sp<GrFragmentProcessor>(
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+                                                     sk_sp<GrColorSpaceXform>
+                                                             colorSpaceXform,
+                                                     const SkMatrix& matrix,
+                                                     GrSamplerParams::FilterMode filterMode) {
+        return std::unique_ptr<GrFragmentProcessor>(
                 new GrSimpleTextureEffect(std::move(proxy), std::move(colorSpaceXform), matrix,
                                           GrSamplerParams(SkShader::kClamp_TileMode, filterMode)));
     }
 
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
-                                           sk_sp<GrColorSpaceXform>
-                                                   colorSpaceXform,
-                                           const SkMatrix& matrix,
-                                           const GrSamplerParams& p) {
-        return sk_sp<GrFragmentProcessor>(
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
+                                                     sk_sp<GrColorSpaceXform>
+                                                             colorSpaceXform,
+                                                     const SkMatrix& matrix,
+                                                     const GrSamplerParams& p) {
+        return std::unique_ptr<GrFragmentProcessor>(
                 new GrSimpleTextureEffect(std::move(proxy), std::move(colorSpaceXform), matrix, p));
     }
     GrSimpleTextureEffect(const GrSimpleTextureEffect& src);
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
     const char* name() const override { return "SimpleTextureEffect"; }
 
 private:
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index ee7985c..5101762 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -206,21 +206,20 @@
     }
 }
 
-sk_sp<GrFragmentProcessor> GrTextureDomainEffect::Make(sk_sp<GrTextureProxy> proxy,
-                                                       sk_sp<GrColorSpaceXform> colorSpaceXform,
-                                                       const SkMatrix& matrix,
-                                                       const SkRect& domain,
-                                                       GrTextureDomain::Mode mode,
-                                                       GrSamplerParams::FilterMode filterMode) {
+std::unique_ptr<GrFragmentProcessor> GrTextureDomainEffect::Make(
+        sk_sp<GrTextureProxy> proxy,
+        sk_sp<GrColorSpaceXform> colorSpaceXform,
+        const SkMatrix& matrix,
+        const SkRect& domain,
+        GrTextureDomain::Mode mode,
+        GrSamplerParams::FilterMode filterMode) {
     if (GrTextureDomain::kIgnore_Mode == mode ||
         (GrTextureDomain::kClamp_Mode == mode && can_ignore_rect(proxy.get(), domain))) {
         return GrSimpleTextureEffect::Make(std::move(proxy),
                                            std::move(colorSpaceXform), matrix, filterMode);
     } else {
-        return sk_sp<GrFragmentProcessor>(
-            new GrTextureDomainEffect(std::move(proxy),
-                                      std::move(colorSpaceXform),
-                                      matrix, domain, mode, filterMode));
+        return std::unique_ptr<GrFragmentProcessor>(new GrTextureDomainEffect(
+                std::move(proxy), std::move(colorSpaceXform), matrix, domain, mode, filterMode));
     }
 }
 
@@ -312,7 +311,7 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrTextureDomainEffect);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrTextureDomainEffect::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> GrTextureDomainEffect::TestCreate(GrProcessorTestData* d) {
     int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
                                         : GrProcessorUnitTest::kAlphaTextureIdx;
     sk_sp<GrTextureProxy> proxy = d->textureProxy(texIdx);
@@ -337,11 +336,9 @@
 #endif
 
 ///////////////////////////////////////////////////////////////////////////////
-sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::Make(
-        sk_sp<GrTextureProxy> proxy,
-        const SkIRect& subset,
-        const SkIPoint& deviceSpaceOffset) {
-    return sk_sp<GrFragmentProcessor>(new GrDeviceSpaceTextureDecalFragmentProcessor(
+std::unique_ptr<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::Make(
+        sk_sp<GrTextureProxy> proxy, const SkIRect& subset, const SkIPoint& deviceSpaceOffset) {
+    return std::unique_ptr<GrFragmentProcessor>(new GrDeviceSpaceTextureDecalFragmentProcessor(
             std::move(proxy), subset, deviceSpaceOffset));
 }
 
@@ -369,8 +366,9 @@
     this->addTextureSampler(&fTextureSampler);
 }
 
-sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::clone() const {
-    return sk_sp<GrFragmentProcessor>(new GrDeviceSpaceTextureDecalFragmentProcessor(*this));
+std::unique_ptr<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(
+            new GrDeviceSpaceTextureDecalFragmentProcessor(*this));
 }
 
 GrGLSLFragmentProcessor* GrDeviceSpaceTextureDecalFragmentProcessor::onCreateGLSLInstance() const  {
@@ -441,7 +439,7 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrDeviceSpaceTextureDecalFragmentProcessor);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::TestCreate(
+std::unique_ptr<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::TestCreate(
         GrProcessorTestData* d) {
     int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
                                         : GrProcessorUnitTest::kAlphaTextureIdx;
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h
index 10c2e56..0db7d2c 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -153,17 +153,17 @@
  */
 class GrTextureDomainEffect : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>,
-                                           sk_sp<GrColorSpaceXform>,
-                                           const SkMatrix&,
-                                           const SkRect& domain,
-                                           GrTextureDomain::Mode,
-                                           GrSamplerParams::FilterMode filterMode);
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>,
+                                                     sk_sp<GrColorSpaceXform>,
+                                                     const SkMatrix&,
+                                                     const SkRect& domain,
+                                                     GrTextureDomain::Mode,
+                                                     GrSamplerParams::FilterMode filterMode);
 
     const char* name() const override { return "TextureDomain"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override {
-        return sk_sp<GrFragmentProcessor>(new GrTextureDomainEffect(*this));
+    std::unique_ptr<GrFragmentProcessor> clone() const override {
+        return std::unique_ptr<GrFragmentProcessor>(new GrTextureDomainEffect(*this));
     }
 
     SkString dumpInfo() const override {
@@ -207,9 +207,9 @@
 
 class GrDeviceSpaceTextureDecalFragmentProcessor : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>,
-                                           const SkIRect& subset,
-                                           const SkIPoint& deviceSpaceOffset);
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>,
+                                                     const SkIRect& subset,
+                                                     const SkIPoint& deviceSpaceOffset);
 
     const char* name() const override { return "GrDeviceSpaceTextureDecalFragmentProcessor"; }
 
@@ -223,7 +223,7 @@
         return str;
     }
 
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
 
 private:
     TextureSampler fTextureSampler;
diff --git a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
index 490cb39..f2c026f 100644
--- a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
+++ b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp
@@ -29,11 +29,11 @@
 
 class ComposeTwoFragmentProcessor : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrFragmentProcessor> src,
-                                           sk_sp<GrFragmentProcessor> dst,
-                                           SkBlendMode mode) {
-        return sk_sp<GrFragmentProcessor>(new ComposeTwoFragmentProcessor(std::move(src),
-                                                                          std::move(dst), mode));
+    static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> src,
+                                                     std::unique_ptr<GrFragmentProcessor> dst,
+                                                     SkBlendMode mode) {
+        return std::unique_ptr<GrFragmentProcessor>(
+                new ComposeTwoFragmentProcessor(std::move(src), std::move(dst), mode));
     }
 
     const char* name() const override { return "ComposeTwo"; }
@@ -50,16 +50,15 @@
         return str;
     }
 
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
 
     SkBlendMode getMode() const { return fMode; }
 
 private:
-    ComposeTwoFragmentProcessor(sk_sp<GrFragmentProcessor> src,
-                                sk_sp<GrFragmentProcessor> dst,
+    ComposeTwoFragmentProcessor(std::unique_ptr<GrFragmentProcessor> src,
+                                std::unique_ptr<GrFragmentProcessor> dst,
                                 SkBlendMode mode)
-            : INHERITED(OptFlags(src.get(), dst.get(), mode))
-            , fMode(mode) {
+            : INHERITED(OptFlags(src.get(), dst.get(), mode)), fMode(mode) {
         this->initClassID<ComposeTwoFragmentProcessor>();
         SkDEBUGCODE(int shaderAChildIndex = )this->registerChildProcessor(std::move(src));
         SkDEBUGCODE(int shaderBChildIndex = )this->registerChildProcessor(std::move(dst));
@@ -182,24 +181,25 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ComposeTwoFragmentProcessor);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> ComposeTwoFragmentProcessor::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> ComposeTwoFragmentProcessor::TestCreate(
+        GrProcessorTestData* d) {
     // Create two random frag procs.
-    sk_sp<GrFragmentProcessor> fpA(GrProcessorUnitTest::MakeChildFP(d));
-    sk_sp<GrFragmentProcessor> fpB(GrProcessorUnitTest::MakeChildFP(d));
+    std::unique_ptr<GrFragmentProcessor> fpA(GrProcessorUnitTest::MakeChildFP(d));
+    std::unique_ptr<GrFragmentProcessor> fpB(GrProcessorUnitTest::MakeChildFP(d));
 
     SkBlendMode mode;
     do {
         mode = static_cast<SkBlendMode>(d->fRandom->nextRangeU(0, (int)SkBlendMode::kLastMode));
     } while (SkBlendMode::kClear == mode || SkBlendMode::kSrc == mode || SkBlendMode::kDst == mode);
-    return sk_sp<GrFragmentProcessor>(
-        new ComposeTwoFragmentProcessor(std::move(fpA), std::move(fpB), mode));
+    return std::unique_ptr<GrFragmentProcessor>(
+            new ComposeTwoFragmentProcessor(std::move(fpA), std::move(fpB), mode));
 }
 #endif
 
-sk_sp<GrFragmentProcessor> ComposeTwoFragmentProcessor::clone() const {
+std::unique_ptr<GrFragmentProcessor> ComposeTwoFragmentProcessor::clone() const {
     auto src = this->childProcessor(0).clone();
     auto dst = this->childProcessor(1).clone();
-    return sk_sp<GrFragmentProcessor>(
+    return std::unique_ptr<GrFragmentProcessor>(
             new ComposeTwoFragmentProcessor(std::move(src), std::move(dst), fMode));
 }
 
@@ -242,8 +242,10 @@
     }
 }
 
-sk_sp<GrFragmentProcessor> GrXfermodeFragmentProcessor::MakeFromTwoProcessors(
-         sk_sp<GrFragmentProcessor> src, sk_sp<GrFragmentProcessor> dst, SkBlendMode mode) {
+std::unique_ptr<GrFragmentProcessor> GrXfermodeFragmentProcessor::MakeFromTwoProcessors(
+        std::unique_ptr<GrFragmentProcessor> src,
+        std::unique_ptr<GrFragmentProcessor> dst,
+        SkBlendMode mode) {
     switch (mode) {
         case SkBlendMode::kClear:
             return GrConstColorProcessor::Make(GrColor4f::TransparentBlack(),
@@ -266,13 +268,13 @@
         kSrc_Child,
     };
 
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrFragmentProcessor> fp, SkBlendMode mode,
-                                           Child child) {
+    static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> fp,
+                                                     SkBlendMode mode, Child child) {
         if (!fp) {
             return nullptr;
         }
-        return sk_sp<GrFragmentProcessor>(new ComposeOneFragmentProcessor(std::move(fp),
-                                                                          mode, child));
+        return std::unique_ptr<GrFragmentProcessor>(
+                new ComposeOneFragmentProcessor(std::move(fp), mode, child));
     }
 
     const char* name() const override { return "ComposeOne"; }
@@ -290,7 +292,7 @@
         return str;
     }
 
-    sk_sp<GrFragmentProcessor> clone() const override;
+    std::unique_ptr<GrFragmentProcessor> clone() const override;
 
     SkBlendMode mode() const { return fMode; }
 
@@ -417,10 +419,9 @@
     }
 
 private:
-    ComposeOneFragmentProcessor(sk_sp<GrFragmentProcessor> fp, SkBlendMode mode, Child child)
-            : INHERITED(OptFlags(fp.get(), mode, child))
-            , fMode(mode)
-            , fChild(child) {
+    ComposeOneFragmentProcessor(std::unique_ptr<GrFragmentProcessor> fp, SkBlendMode mode,
+                                Child child)
+            : INHERITED(OptFlags(fp.get(), mode, child)), fMode(mode), fChild(child) {
         this->initClassID<ComposeOneFragmentProcessor>();
         SkDEBUGCODE(int dstIndex =) this->registerChildProcessor(std::move(fp));
         SkASSERT(0 == dstIndex);
@@ -474,11 +475,12 @@
 GR_DEFINE_FRAGMENT_PROCESSOR_TEST(ComposeOneFragmentProcessor);
 
 #if GR_TEST_UTILS
-sk_sp<GrFragmentProcessor> ComposeOneFragmentProcessor::TestCreate(GrProcessorTestData* d) {
+std::unique_ptr<GrFragmentProcessor> ComposeOneFragmentProcessor::TestCreate(
+        GrProcessorTestData* d) {
     // Create one random frag procs.
     // For now, we'll prevent either children from being a shader with children to prevent the
     // possibility of an arbitrarily large tree of procs.
-    sk_sp<GrFragmentProcessor> dst(GrProcessorUnitTest::MakeChildFP(d));
+    std::unique_ptr<GrFragmentProcessor> dst(GrProcessorUnitTest::MakeChildFP(d));
     SkBlendMode mode;
     ComposeOneFragmentProcessor::Child child;
     do {
@@ -486,7 +488,8 @@
         child = d->fRandom->nextBool() ? kDst_Child : kSrc_Child;
     } while (SkBlendMode::kClear == mode || (SkBlendMode::kDst == mode && child == kSrc_Child) ||
              (SkBlendMode::kSrc == mode && child == kDst_Child));
-    return sk_sp<GrFragmentProcessor>(new ComposeOneFragmentProcessor(std::move(dst), mode, child));
+    return std::unique_ptr<GrFragmentProcessor>(
+            new ComposeOneFragmentProcessor(std::move(dst), mode, child));
 }
 #endif
 
@@ -494,8 +497,8 @@
     return new GLComposeOneFragmentProcessor;
 }
 
-sk_sp<GrFragmentProcessor> ComposeOneFragmentProcessor::clone() const {
-    return sk_sp<GrFragmentProcessor>(
+std::unique_ptr<GrFragmentProcessor> ComposeOneFragmentProcessor::clone() const {
+    return std::unique_ptr<GrFragmentProcessor>(
             new ComposeOneFragmentProcessor(this->childProcessor(0).clone(), fMode, fChild));
 }
 
@@ -507,8 +510,8 @@
 // ignore the original input. This could be implemented as:
 // RunInSeries(ConstColor(GrColor_WHITE, kIgnoreInput), inputFP).
 
-sk_sp<GrFragmentProcessor> GrXfermodeFragmentProcessor::MakeFromDstProcessor(
-    sk_sp<GrFragmentProcessor> dst, SkBlendMode mode) {
+std::unique_ptr<GrFragmentProcessor> GrXfermodeFragmentProcessor::MakeFromDstProcessor(
+        std::unique_ptr<GrFragmentProcessor> dst, SkBlendMode mode) {
     switch (mode) {
         case SkBlendMode::kClear:
             return GrConstColorProcessor::Make(GrColor4f::TransparentBlack(),
@@ -521,8 +524,8 @@
     }
 }
 
-sk_sp<GrFragmentProcessor> GrXfermodeFragmentProcessor::MakeFromSrcProcessor(
-    sk_sp<GrFragmentProcessor> src, SkBlendMode mode) {
+std::unique_ptr<GrFragmentProcessor> GrXfermodeFragmentProcessor::MakeFromSrcProcessor(
+        std::unique_ptr<GrFragmentProcessor> src, SkBlendMode mode) {
     switch (mode) {
         case SkBlendMode::kClear:
             return GrConstColorProcessor::Make(GrColor4f::TransparentBlack(),
diff --git a/src/gpu/effects/GrXfermodeFragmentProcessor.h b/src/gpu/effects/GrXfermodeFragmentProcessor.h
index edc5ae7..c5d0c59 100644
--- a/src/gpu/effects/GrXfermodeFragmentProcessor.h
+++ b/src/gpu/effects/GrXfermodeFragmentProcessor.h
@@ -14,22 +14,24 @@
 class GrFragmentProcessor;
 
 namespace GrXfermodeFragmentProcessor {
-    /** The color input to the returned processor is treated as the src and the passed in processor
-        is the dst. */
-    sk_sp<GrFragmentProcessor> MakeFromDstProcessor(sk_sp<GrFragmentProcessor> dst,
-                                                    SkBlendMode mode);
 
-    /** The color input to the returned processor is treated as the dst and the passed in processor
-        is the src. */
-    sk_sp<GrFragmentProcessor> MakeFromSrcProcessor(sk_sp<GrFragmentProcessor> src,
-                                                    SkBlendMode mode);
+/** The color input to the returned processor is treated as the src and the passed in processor is
+    the dst. */
+std::unique_ptr<GrFragmentProcessor> MakeFromDstProcessor(std::unique_ptr<GrFragmentProcessor> dst,
+                                                          SkBlendMode mode);
 
-    /** Takes the input color, which is assumed to be unpremultiplied, passes it as an opaque color
-        to both src and dst. The outputs of a src and dst are blended using mode and the original
-        input's alpha is applied to the blended color to produce a premul output. */
-    sk_sp<GrFragmentProcessor> MakeFromTwoProcessors(sk_sp<GrFragmentProcessor> src,
-                                                     sk_sp<GrFragmentProcessor> dst,
-                                                     SkBlendMode mode);
+/** The color input to the returned processor is treated as the dst and the passed in processor is
+    the src. */
+std::unique_ptr<GrFragmentProcessor> MakeFromSrcProcessor(std::unique_ptr<GrFragmentProcessor> src,
+                                                          SkBlendMode mode);
+
+/** Takes the input color, which is assumed to be unpremultiplied, passes it as an opaque color
+    to both src and dst. The outputs of a src and dst are blended using mode and the original
+    input's alpha is applied to the blended color to produce a premul output. */
+std::unique_ptr<GrFragmentProcessor> MakeFromTwoProcessors(std::unique_ptr<GrFragmentProcessor> src,
+                                                           std::unique_ptr<GrFragmentProcessor> dst,
+                                                           SkBlendMode mode);
+
 };
 
 #endif
diff --git a/src/gpu/effects/GrYUVEffect.cpp b/src/gpu/effects/GrYUVEffect.cpp
index 5b2eb7e..80e87c2 100644
--- a/src/gpu/effects/GrYUVEffect.cpp
+++ b/src/gpu/effects/GrYUVEffect.cpp
@@ -62,10 +62,11 @@
 
 class YUVtoRGBEffect : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> yProxy,
-                                           sk_sp<GrTextureProxy> uProxy,
-                                           sk_sp<GrTextureProxy> vProxy, const SkISize sizes[3],
-                                           SkYUVColorSpace colorSpace, bool nv12) {
+    static std::unique_ptr<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> yProxy,
+                                                     sk_sp<GrTextureProxy> uProxy,
+                                                     sk_sp<GrTextureProxy> vProxy,
+                                                     const SkISize sizes[3],
+                                                     SkYUVColorSpace colorSpace, bool nv12) {
         SkScalar w[3], h[3];
         w[0] = SkIntToScalar(sizes[0].fWidth);
         h[0] = SkIntToScalar(sizes[0].fHeight);
@@ -85,15 +86,15 @@
              (sizes[2].fHeight != sizes[0].fHeight)) ?
             GrSamplerParams::kBilerp_FilterMode :
             GrSamplerParams::kNone_FilterMode;
-        return sk_sp<GrFragmentProcessor>(new YUVtoRGBEffect(
-            std::move(yProxy), std::move(uProxy), std::move(vProxy),
-            yuvMatrix, uvFilterMode, colorSpace, nv12));
+        return std::unique_ptr<GrFragmentProcessor>(
+                new YUVtoRGBEffect(std::move(yProxy), std::move(uProxy), std::move(vProxy),
+                                   yuvMatrix, uvFilterMode, colorSpace, nv12));
     }
 
     const char* name() const override { return "YUV to RGB"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override {
-        return sk_sp<GrFragmentProcessor>(new YUVtoRGBEffect(*this));
+    std::unique_ptr<GrFragmentProcessor> clone() const override {
+        return std::unique_ptr<GrFragmentProcessor>(new YUVtoRGBEffect(*this));
     }
 
     SkYUVColorSpace getColorSpace() const { return fColorSpace; }
@@ -241,15 +242,16 @@
         kV_OutputChannels
     };
 
-    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrFragmentProcessor> rgbFP,
-                                           SkYUVColorSpace colorSpace,
-                                           OutputChannels output) {
-        return sk_sp<GrFragmentProcessor>(new RGBToYUVEffect(std::move(rgbFP), colorSpace, output));
+    static std::unique_ptr<GrFragmentProcessor> Make(std::unique_ptr<GrFragmentProcessor> rgbFP,
+                                                     SkYUVColorSpace colorSpace,
+                                                     OutputChannels output) {
+        return std::unique_ptr<GrFragmentProcessor>(
+                new RGBToYUVEffect(std::move(rgbFP), colorSpace, output));
     }
 
     const char* name() const override { return "RGBToYUV"; }
 
-    sk_sp<GrFragmentProcessor> clone() const override {
+    std::unique_ptr<GrFragmentProcessor> clone() const override {
         return Make(this->childProcessor(0).clone(), fColorSpace, fOutputChannels);
     }
 
@@ -353,7 +355,7 @@
     };
 
 private:
-    RGBToYUVEffect(sk_sp<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace,
+    RGBToYUVEffect(std::unique_ptr<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace,
                    OutputChannels output)
             // This could advertise kConstantOutputForConstantInput, but doesn't seem useful.
             : INHERITED(kPreservesOpaqueInput_OptimizationFlag)
@@ -393,42 +395,40 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-sk_sp<GrFragmentProcessor> GrYUVEffect::MakeYUVToRGB(sk_sp<GrTextureProxy> yProxy,
-                                                     sk_sp<GrTextureProxy> uProxy,
-                                                     sk_sp<GrTextureProxy> vProxy,
-                                                     const SkISize sizes[3],
-                                                     SkYUVColorSpace colorSpace, bool nv12) {
+std::unique_ptr<GrFragmentProcessor> GrYUVEffect::MakeYUVToRGB(
+        sk_sp<GrTextureProxy> yProxy, sk_sp<GrTextureProxy> uProxy, sk_sp<GrTextureProxy> vProxy,
+        const SkISize sizes[3], SkYUVColorSpace colorSpace, bool nv12) {
     SkASSERT(yProxy && uProxy && vProxy && sizes);
     return YUVtoRGBEffect::Make(std::move(yProxy), std::move(uProxy), std::move(vProxy),
                                 sizes, colorSpace, nv12);
 }
 
-sk_sp<GrFragmentProcessor>
-GrYUVEffect::MakeRGBToYUV(sk_sp<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace) {
+std::unique_ptr<GrFragmentProcessor> GrYUVEffect::MakeRGBToYUV(
+        std::unique_ptr<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace) {
     SkASSERT(rgbFP);
     return RGBToYUVEffect::Make(std::move(rgbFP), colorSpace, RGBToYUVEffect::kYUV_OutputChannels);
 }
 
-sk_sp<GrFragmentProcessor>
-GrYUVEffect::MakeRGBToY(sk_sp<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace) {
+std::unique_ptr<GrFragmentProcessor> GrYUVEffect::MakeRGBToY(
+        std::unique_ptr<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace) {
     SkASSERT(rgbFP);
     return RGBToYUVEffect::Make(std::move(rgbFP), colorSpace, RGBToYUVEffect::kY_OutputChannels);
 }
 
-sk_sp<GrFragmentProcessor>
-GrYUVEffect::MakeRGBToUV(sk_sp<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace) {
+std::unique_ptr<GrFragmentProcessor> GrYUVEffect::MakeRGBToUV(
+        std::unique_ptr<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace) {
     SkASSERT(rgbFP);
     return RGBToYUVEffect::Make(std::move(rgbFP), colorSpace, RGBToYUVEffect::kUV_OutputChannels);
 }
 
-sk_sp<GrFragmentProcessor>
-GrYUVEffect::MakeRGBToU(sk_sp<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace) {
+std::unique_ptr<GrFragmentProcessor> GrYUVEffect::MakeRGBToU(
+        std::unique_ptr<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace) {
     SkASSERT(rgbFP);
     return RGBToYUVEffect::Make(std::move(rgbFP), colorSpace, RGBToYUVEffect::kU_OutputChannels);
 }
 
-sk_sp<GrFragmentProcessor>
-GrYUVEffect::MakeRGBToV(sk_sp<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace) {
+std::unique_ptr<GrFragmentProcessor> GrYUVEffect::MakeRGBToV(
+        std::unique_ptr<GrFragmentProcessor> rgbFP, SkYUVColorSpace colorSpace) {
     SkASSERT(rgbFP);
     return RGBToYUVEffect::Make(std::move(rgbFP), colorSpace, RGBToYUVEffect::kV_OutputChannels);
 }
diff --git a/src/gpu/effects/GrYUVEffect.h b/src/gpu/effects/GrYUVEffect.h
index ae62a16..2ea41bf 100644
--- a/src/gpu/effects/GrYUVEffect.h
+++ b/src/gpu/effects/GrYUVEffect.h
@@ -18,32 +18,38 @@
      * Creates an effect that performs color conversion from YUV to RGB. The input textures are
      * assumed to be kA8_GrPixelConfig.
      */
-    sk_sp<GrFragmentProcessor> MakeYUVToRGB(sk_sp<GrTextureProxy> yProxy,
-                                            sk_sp<GrTextureProxy> uProxy,
-                                            sk_sp<GrTextureProxy> vProxy, const SkISize sizes[3],
-                                            SkYUVColorSpace colorSpace, bool nv12);
+std::unique_ptr<GrFragmentProcessor> MakeYUVToRGB(sk_sp<GrTextureProxy> yProxy,
+                                                  sk_sp<GrTextureProxy> uProxy,
+                                                  sk_sp<GrTextureProxy> vProxy,
+                                                  const SkISize sizes[3],
+                                                  SkYUVColorSpace colorSpace, bool nv12);
 
-    /**
-     * Creates a processor that performs color conversion from the passed in processor's RGB
-     * channels to Y, U ,and V channels. The output color is (y, u, v, a) where a is the passed in
-     * processor's alpha output.
-     */
-    sk_sp<GrFragmentProcessor> MakeRGBToYUV(sk_sp<GrFragmentProcessor>, SkYUVColorSpace);
+/**
+ * Creates a processor that performs color conversion from the passed in processor's RGB
+ * channels to Y, U ,and V channels. The output color is (y, u, v, a) where a is the passed in
+ * processor's alpha output.
+ */
+std::unique_ptr<GrFragmentProcessor> MakeRGBToYUV(std::unique_ptr<GrFragmentProcessor>,
+                                                  SkYUVColorSpace);
 
-    /**
-     * Creates a processor that performs color conversion from the passed in processor's RGB
-     * channels to U and V channels. The output color is (u, v, 0, a) where a is the passed in
-     * processor's alpha output.
-     */
-    sk_sp<GrFragmentProcessor> MakeRGBToUV(sk_sp<GrFragmentProcessor>, SkYUVColorSpace);
-    /**
-     * Creates a processor that performs color conversion from the passed in fragment processors's
-     * RGB channels to Y, U, or V (replicated across all four output color channels). The alpha
-     * output of the passed in fragment processor is ignored.
-     */
-    sk_sp<GrFragmentProcessor> MakeRGBToY(sk_sp<GrFragmentProcessor>, SkYUVColorSpace);
-    sk_sp<GrFragmentProcessor> MakeRGBToU(sk_sp<GrFragmentProcessor>, SkYUVColorSpace);
-    sk_sp<GrFragmentProcessor> MakeRGBToV(sk_sp<GrFragmentProcessor>, SkYUVColorSpace);
+/**
+ * Creates a processor that performs color conversion from the passed in processor's RGB
+ * channels to U and V channels. The output color is (u, v, 0, a) where a is the passed in
+ * processor's alpha output.
+ */
+std::unique_ptr<GrFragmentProcessor> MakeRGBToUV(std::unique_ptr<GrFragmentProcessor>,
+                                                 SkYUVColorSpace);
+/**
+ * Creates a processor that performs color conversion from the passed in fragment processors's
+ * RGB channels to Y, U, or V (replicated across all four output color channels). The alpha
+ * output of the passed in fragment processor is ignored.
+ */
+std::unique_ptr<GrFragmentProcessor> MakeRGBToY(std::unique_ptr<GrFragmentProcessor>,
+                                                SkYUVColorSpace);
+std::unique_ptr<GrFragmentProcessor> MakeRGBToU(std::unique_ptr<GrFragmentProcessor>,
+                                                SkYUVColorSpace);
+std::unique_ptr<GrFragmentProcessor> MakeRGBToV(std::unique_ptr<GrFragmentProcessor>,
+                                                SkYUVColorSpace);
 };
 
 #endif