Clean up GrResourceProvider usage

The only substantive changes are the removal of GrProxy instantiation in:

SkGpuBlurUtils::GaussianBlur
GrSimpleTextureEffect::Make*

Change-Id: I10970609693bd6ff5b3a3c21b41d82642bb277bc
Reviewed-on: https://skia-review.googlesource.com/19965
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/core/SkColorSpaceXformImageGenerator.cpp b/src/core/SkColorSpaceXformImageGenerator.cpp
index 5d97a02..79b4650 100644
--- a/src/core/SkColorSpaceXformImageGenerator.cpp
+++ b/src/core/SkColorSpaceXformImageGenerator.cpp
@@ -71,8 +71,8 @@
 
     SkASSERT(ctx);
 
-    sk_sp<GrTextureProxy> proxy =
-            GrUploadBitmapToTextureProxy(ctx->resourceProvider(), fSrc, nullptr);
+    sk_sp<GrTextureProxy> proxy = GrUploadBitmapToTextureProxy(ctx->resourceProvider(),
+                                                               fSrc, nullptr);
 
     sk_sp<SkColorSpace> srcSpace =
             fSrc.colorSpace() ? sk_ref_sp(fSrc.colorSpace()) : SkColorSpace::MakeSRGB();
@@ -89,8 +89,8 @@
 
     GrPaint paint;
     paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
-    paint.addColorTextureProcessor(ctx->resourceProvider(), proxy, nullptr,
-            SkMatrix::MakeTrans(origin.fX, origin.fY));
+    paint.addColorTextureProcessor(std::move(proxy), nullptr,
+                                   SkMatrix::MakeTrans(origin.fX, origin.fY));
     paint.addColorFragmentProcessor(std::move(xform));
 
     const SkRect rect = SkRect::MakeWH(info.width(), info.height());
diff --git a/src/core/SkGpuBlurUtils.cpp b/src/core/SkGpuBlurUtils.cpp
index 64bf203..40a6c24 100644
--- a/src/core/SkGpuBlurUtils.cpp
+++ b/src/core/SkGpuBlurUtils.cpp
@@ -79,10 +79,8 @@
     GrPaint paint;
     paint.setGammaCorrect(renderTargetContext->isGammaCorrect());
 
-    GrResourceProvider* resourceProvider = renderTargetContext->resourceProvider();
-
     sk_sp<GrFragmentProcessor> conv(GrGaussianConvolutionFragmentProcessor::Make(
-            resourceProvider, std::move(proxy), direction, radius, sigma, useBounds, bounds));
+            std::move(proxy), direction, radius, sigma, useBounds, bounds));
     paint.addColorFragmentProcessor(std::move(conv));
     paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
     SkMatrix localMatrix = SkMatrix::MakeTrans(-SkIntToScalar(srcOffset.x()),
@@ -109,10 +107,8 @@
     paint.setGammaCorrect(renderTargetContext->isGammaCorrect());
     SkIRect bounds = srcBounds ? *srcBounds : SkIRect::EmptyIRect();
 
-    GrResourceProvider* resourceProvider = renderTargetContext->resourceProvider();
-
     sk_sp<GrFragmentProcessor> conv(GrMatrixConvolutionEffect::MakeGaussian(
-            resourceProvider, std::move(proxy), bounds, size, 1.0, 0.0, kernelOffset,
+            std::move(proxy), bounds, size, 1.0, 0.0, kernelOffset,
             srcBounds ? GrTextureDomain::kDecal_Mode : GrTextureDomain::kIgnore_Mode,
             true, sigmaX, sigmaY));
     paint.addColorFragmentProcessor(std::move(conv));
@@ -197,16 +193,6 @@
                                           SkBackingFit fit) {
     SkASSERT(context);
 
-    {
-        // MDB TODO: remove this
-        // Chrome is crashing with proxies when they need to be instantiated.
-        // Force an instantiation here (where, in olden days, we used to require a GrTexture)
-        // to see if the input is already un-instantiable.
-        if (!srcProxy->instantiate(context->resourceProvider())) {
-            return nullptr;
-        }
-    }
-
     SkIRect clearRect;
     int scaleFactorX, radiusX;
     int scaleFactorY, radiusY;
@@ -280,7 +266,6 @@
             domain.inset((i < scaleFactorX) ? SK_ScalarHalf : 0.0f,
                          (i < scaleFactorY) ? SK_ScalarHalf : 0.0f);
             sk_sp<GrFragmentProcessor> fp(GrTextureDomainEffect::Make(
-                                                        context->resourceProvider(),
                                                         std::move(srcProxy),
                                                         nullptr,
                                                         SkMatrix::I(),
@@ -292,7 +277,7 @@
             srcOffset.set(0, 0);
         } else {
             GrSamplerParams params(SkShader::kClamp_TileMode, GrSamplerParams::kBilerp_FilterMode);
-            paint.addColorTextureProcessor(context->resourceProvider(), std::move(srcProxy),
+            paint.addColorTextureProcessor(std::move(srcProxy),
                                            nullptr, SkMatrix::I(), params);
         }
         paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
@@ -379,7 +364,7 @@
             return nullptr;
         }
 
-        paint.addColorTextureProcessor(context->resourceProvider(), std::move(proxy),
+        paint.addColorTextureProcessor(std::move(proxy),
                                        nullptr, SkMatrix::I(), params);
         paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
 
diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.cpp b/src/effects/GrAlphaThresholdFragmentProcessor.cpp
index de1b74e..2a45c5b 100644
--- a/src/effects/GrAlphaThresholdFragmentProcessor.cpp
+++ b/src/effects/GrAlphaThresholdFragmentProcessor.cpp
@@ -27,7 +27,6 @@
 }
 
 GrAlphaThresholdFragmentProcessor::GrAlphaThresholdFragmentProcessor(
-                                                           GrResourceProvider* resourceProvider,
                                                            sk_sp<GrTextureProxy> proxy,
                                                            sk_sp<GrColorSpaceXform> colorSpaceXform,
                                                            sk_sp<GrTextureProxy> maskProxy,
@@ -37,14 +36,13 @@
         : INHERITED(OptFlags(outerThreshold))
         , fInnerThreshold(innerThreshold)
         , fOuterThreshold(outerThreshold)
-        , fImageCoordTransform(resourceProvider, SkMatrix::I(), proxy.get())
-        , fImageTextureSampler(resourceProvider, std::move(proxy))
+        , fImageCoordTransform(SkMatrix::I(), proxy.get())
+        , fImageTextureSampler(std::move(proxy))
         , fColorSpaceXform(std::move(colorSpaceXform))
         , fMaskCoordTransform(
-                  resourceProvider,
                   SkMatrix::MakeTrans(SkIntToScalar(-bounds.x()), SkIntToScalar(-bounds.y())),
                   maskProxy.get())
-        , fMaskTextureSampler(resourceProvider, maskProxy) {
+        , fMaskTextureSampler(std::move(maskProxy)) {
     this->initClassID<GrAlphaThresholdFragmentProcessor>();
     this->addCoordTransform(&fImageCoordTransform);
     this->addTextureSampler(&fImageTextureSampler);
@@ -159,8 +157,7 @@
     uint32_t y = d->fRandom->nextULessThan(kMaxHeight - height);
     SkIRect bounds = SkIRect::MakeXYWH(x, y, width, height);
     sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(d->fRandom);
-    return GrAlphaThresholdFragmentProcessor::Make(d->resourceProvider(),
-                                                   std::move(bmpProxy),
+    return GrAlphaThresholdFragmentProcessor::Make(std::move(bmpProxy),
                                                    std::move(colorSpaceXform),
                                                    std::move(maskProxy),
                                                    innerThresh, outerThresh,
diff --git a/src/effects/GrAlphaThresholdFragmentProcessor.h b/src/effects/GrAlphaThresholdFragmentProcessor.h
index f7690d3..de58bbf 100644
--- a/src/effects/GrAlphaThresholdFragmentProcessor.h
+++ b/src/effects/GrAlphaThresholdFragmentProcessor.h
@@ -20,15 +20,13 @@
 class GrAlphaThresholdFragmentProcessor : public GrFragmentProcessor {
 
 public:
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
                                            sk_sp<GrColorSpaceXform> colorSpaceXform,
                                            sk_sp<GrTextureProxy> maskProxy,
                                            float innerThreshold,
                                            float outerThreshold,
                                            const SkIRect& bounds) {
         return sk_sp<GrFragmentProcessor>(new GrAlphaThresholdFragmentProcessor(
-                                                                    resourceProvider,
                                                                     std::move(proxy),
                                                                     std::move(colorSpaceXform),
                                                                     std::move(maskProxy),
@@ -46,8 +44,7 @@
 private:
     static OptimizationFlags OptFlags(float outerThreshold);
 
-    GrAlphaThresholdFragmentProcessor(GrResourceProvider*,
-                                      sk_sp<GrTextureProxy> proxy,
+    GrAlphaThresholdFragmentProcessor(sk_sp<GrTextureProxy> proxy,
                                       sk_sp<GrColorSpaceXform> colorSpaceXform,
                                       sk_sp<GrTextureProxy> maskProxy,
                                       float innerThreshold,
diff --git a/src/effects/GrCircleBlurFragmentProcessor.cpp b/src/effects/GrCircleBlurFragmentProcessor.cpp
index 56dd456..d99f0c7 100644
--- a/src/effects/GrCircleBlurFragmentProcessor.cpp
+++ b/src/effects/GrCircleBlurFragmentProcessor.cpp
@@ -82,8 +82,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GrCircleBlurFragmentProcessor::GrCircleBlurFragmentProcessor(GrResourceProvider* resourceProvider,
-                                                             const SkRect& circle,
+GrCircleBlurFragmentProcessor::GrCircleBlurFragmentProcessor(const SkRect& circle,
                                                              float textureRadius,
                                                              float solidRadius,
                                                              sk_sp<GrTextureProxy> blurProfile)
@@ -91,8 +90,7 @@
         , fCircle(circle)
         , fSolidRadius(solidRadius)
         , fTextureRadius(textureRadius)
-        , fBlurProfileSampler(resourceProvider, std::move(blurProfile),
-                              GrSamplerParams::kBilerp_FilterMode) {
+        , fBlurProfileSampler(std::move(blurProfile), GrSamplerParams::kBilerp_FilterMode) {
     this->initClassID<GrCircleBlurFragmentProcessor>();
     this->addTextureSampler(&fBlurProfileSampler);
 }
@@ -340,8 +338,7 @@
     if (!profile) {
         return nullptr;
     }
-    return sk_sp<GrFragmentProcessor>(new GrCircleBlurFragmentProcessor(resourceProvider,
-                                                                        circle,
+    return sk_sp<GrFragmentProcessor>(new GrCircleBlurFragmentProcessor(circle,
                                                                         textureRadius, solidRadius,
                                                                         std::move(profile)));
 }
diff --git a/src/effects/GrCircleBlurFragmentProcessor.h b/src/effects/GrCircleBlurFragmentProcessor.h
index c6cf3ba..f25bd8c 100644
--- a/src/effects/GrCircleBlurFragmentProcessor.h
+++ b/src/effects/GrCircleBlurFragmentProcessor.h
@@ -45,7 +45,7 @@
      * The x texture coord should map from 0 to 1 across the radius range of solidRadius to
      * solidRadius + textureRadius.
      */
-    GrCircleBlurFragmentProcessor(GrResourceProvider*, const SkRect& circle,
+    GrCircleBlurFragmentProcessor(const SkRect& circle,
                                   float textureRadius, float innerRadius,
                                   sk_sp<GrTextureProxy> blurProfile);
 
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index b725257..4918859 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -173,7 +173,6 @@
                                                                            outProps.colorSpace());
 
         sk_sp<GrFragmentProcessor> fp(GrAlphaThresholdFragmentProcessor::Make(
-                                            context->resourceProvider(),
                                             std::move(inputProxy),
                                             std::move(colorSpaceXform),
                                             std::move(maskProxy),
diff --git a/src/effects/SkArithmeticImageFilter.cpp b/src/effects/SkArithmeticImageFilter.cpp
index eebaa95..94be346 100644
--- a/src/effects/SkArithmeticImageFilter.cpp
+++ b/src/effects/SkArithmeticImageFilter.cpp
@@ -324,11 +324,9 @@
 
 sk_sp<SkSpecialImage> ArithmeticImageFilterImpl::filterImageGPU(
         SkSpecialImage* source,
-        sk_sp<SkSpecialImage>
-                background,
+        sk_sp<SkSpecialImage> background,
         const SkIPoint& backgroundOffset,
-        sk_sp<SkSpecialImage>
-                foreground,
+        sk_sp<SkSpecialImage> foreground,
         const SkIPoint& foregroundOffset,
         const SkIRect& bounds,
         const OutputProperties& outputProperties) const {
@@ -355,7 +353,7 @@
         sk_sp<GrColorSpaceXform> bgXform =
                 GrColorSpaceXform::Make(background->getColorSpace(), outputProperties.colorSpace());
         bgFP = GrTextureDomainEffect::Make(
-                context->resourceProvider(), std::move(backgroundProxy), std::move(bgXform),
+                std::move(backgroundProxy), std::move(bgXform),
                 backgroundMatrix, GrTextureDomain::MakeTexelDomain(background->subset()),
                 GrTextureDomain::kDecal_Mode, GrSamplerParams::kNone_FilterMode);
     } else {
@@ -371,7 +369,7 @@
         sk_sp<GrFragmentProcessor> foregroundFP;
 
         foregroundFP = GrTextureDomainEffect::Make(
-                context->resourceProvider(), std::move(foregroundProxy), std::move(fgXform),
+                std::move(foregroundProxy), std::move(fgXform),
                 foregroundMatrix, GrTextureDomain::MakeTexelDomain(foreground->subset()),
                 GrTextureDomain::kDecal_Mode, GrSamplerParams::kNone_FilterMode);
 
diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp
index 93f335b..665abcb 100644
--- a/src/effects/SkBlurMaskFilter.cpp
+++ b/src/effects/SkBlurMaskFilter.cpp
@@ -802,8 +802,7 @@
             precision = kDefault_GrSLPrecision;
         }
 
-        return sk_sp<GrFragmentProcessor>(new GrRectBlurEffect(resourceProvider,
-                                                               rect, sigma,
+        return sk_sp<GrFragmentProcessor>(new GrRectBlurEffect(rect, sigma,
                                                                std::move(blurProfile), precision));
     }
 
@@ -812,7 +811,7 @@
     GrSLPrecision precision() const { return fPrecision; }
 
 private:
-    GrRectBlurEffect(GrResourceProvider*, const SkRect& rect, float sigma,
+    GrRectBlurEffect(const SkRect& rect, float sigma,
                      sk_sp<GrTextureProxy> blurProfile, GrSLPrecision fPrecision);
 
     GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
@@ -973,14 +972,13 @@
     return blurProfile;
 }
 
-GrRectBlurEffect::GrRectBlurEffect(GrResourceProvider* resourceProvider,
-                                   const SkRect& rect, float sigma,
+GrRectBlurEffect::GrRectBlurEffect(const SkRect& rect, float sigma,
                                    sk_sp<GrTextureProxy> blurProfile,
                                    GrSLPrecision precision)
         : INHERITED(kCompatibleWithCoverageAsAlpha_OptimizationFlag)
         , fRect(rect)
         , fSigma(sigma)
-        , fBlurProfileSampler(resourceProvider, std::move(blurProfile))
+        , fBlurProfileSampler(std::move(blurProfile))
         , fPrecision(precision) {
     this->initClassID<GrRectBlurEffect>();
     this->addTextureSampler(&fBlurProfileSampler);
@@ -1084,7 +1082,7 @@
 private:
     GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
 
-    GrRRectBlurEffect(GrResourceProvider*, float sigma, const SkRRect&,
+    GrRRectBlurEffect(float sigma, const SkRRect&,
                       sk_sp<GrTextureProxy> profileProxy);
 
     virtual void onGetGLSLProcessorKey(const GrShaderCaps& caps,
@@ -1198,19 +1196,17 @@
         return nullptr;
     }
 
-    return sk_sp<GrFragmentProcessor>(new GrRRectBlurEffect(context->resourceProvider(),
-                                                            xformedSigma,
+    return sk_sp<GrFragmentProcessor>(new GrRRectBlurEffect(xformedSigma,
                                                             devRRect,
                                                             std::move(mask)));
 }
 
-GrRRectBlurEffect::GrRRectBlurEffect(GrResourceProvider* resourceProvider,
-                                     float sigma, const SkRRect& rrect,
+GrRRectBlurEffect::GrRRectBlurEffect(float sigma, const SkRRect& rrect,
                                      sk_sp<GrTextureProxy> ninePatchProxy)
         : INHERITED(kCompatibleWithCoverageAsAlpha_OptimizationFlag)
         , fRRect(rrect)
         , fSigma(sigma)
-        , fNinePatchSampler(resourceProvider, std::move(ninePatchProxy)) {
+        , fNinePatchSampler(std::move(ninePatchProxy)) {
     this->initClassID<GrRRectBlurEffect>();
     this->addTextureSampler(&fNinePatchSampler);
 }
@@ -1513,8 +1509,7 @@
     if (!isNormalBlur) {
         GrPaint paint;
         // Blend pathTexture over blurTexture.
-        paint.addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(context->resourceProvider(),
-                                                                       std::move(srcProxy),
+        paint.addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(std::move(srcProxy),
                                                                        nullptr, SkMatrix::I()));
         if (kInner_SkBlurStyle == fBlurStyle) {
             // inner:  dst = dst * src
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index 7b5c6e0..82c2b59 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -215,14 +215,13 @@
 class GrDisplacementMapEffect : public GrFragmentProcessor {
 public:
     static sk_sp<GrFragmentProcessor> Make(
-                GrResourceProvider* resourceProvider,
                 SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
                 SkDisplacementMapEffect::ChannelSelectorType yChannelSelector, SkVector scale,
                 sk_sp<GrTextureProxy> displacement, const SkMatrix& offsetMatrix,
                 sk_sp<GrTextureProxy> color,
                 sk_sp<GrColorSpaceXform> colorSpaceXform, const SkISize& colorDimensions) {
         return sk_sp<GrFragmentProcessor>(
-            new GrDisplacementMapEffect(resourceProvider, xChannelSelector, yChannelSelector, scale,
+            new GrDisplacementMapEffect(xChannelSelector, yChannelSelector, scale,
                                         std::move(displacement),
                                         offsetMatrix, std::move(color), std::move(colorSpaceXform),
                                         colorDimensions));
@@ -249,8 +248,7 @@
 
     bool onIsEqual(const GrFragmentProcessor&) const override;
 
-    GrDisplacementMapEffect(GrResourceProvider*,
-                            SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
+    GrDisplacementMapEffect(SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
                             SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
                             const SkVector& scale,
                             sk_sp<GrTextureProxy> displacement, const SkMatrix& offsetMatrix,
@@ -341,8 +339,7 @@
                                                                            colorSpace);
         GrPaint paint;
         paint.addColorFragmentProcessor(
-            GrDisplacementMapEffect::Make(context->resourceProvider(),
-                                          fXChannelSelector,
+            GrDisplacementMapEffect::Make(fXChannelSelector,
                                           fYChannelSelector,
                                           scale,
                                           std::move(displProxy),
@@ -500,7 +497,6 @@
 }
 
 GrDisplacementMapEffect::GrDisplacementMapEffect(
-        GrResourceProvider* resourceProvider,
         SkDisplacementMapEffect::ChannelSelectorType xChannelSelector,
         SkDisplacementMapEffect::ChannelSelectorType yChannelSelector,
         const SkVector& scale,
@@ -511,12 +507,12 @@
         const SkISize& colorDimensions)
         : INHERITED(GrPixelConfigIsOpaque(color->config()) ? kPreservesOpaqueInput_OptimizationFlag
                                                            : kNone_OptimizationFlags)
-        , fDisplacementTransform(resourceProvider, offsetMatrix, displacement.get())
-        , fDisplacementSampler(resourceProvider, displacement)
-        , fColorTransform(resourceProvider, color.get())
+        , fDisplacementTransform(offsetMatrix, displacement.get())
+        , fDisplacementSampler(displacement)
+        , fColorTransform(color.get())
         , fDomain(color.get(), GrTextureDomain::MakeTexelDomain(SkIRect::MakeSize(colorDimensions)),
                   GrTextureDomain::kDecal_Mode)
-        , fColorSampler(resourceProvider, color)
+        , fColorSampler(color)
         , fColorSpaceXform(std::move(colorSpaceXform))
         , fXChannelSelector(xChannelSelector)
         , fYChannelSelector(yChannelSelector)
@@ -563,8 +559,7 @@
     colorDimensions.fWidth = d->fRandom->nextRangeU(0, colorProxy->width());
     colorDimensions.fHeight = d->fRandom->nextRangeU(0, colorProxy->height());
     auto colorSpaceXform = GrTest::TestColorXform(d->fRandom);
-    return GrDisplacementMapEffect::Make(d->resourceProvider(),
-                                         xChannelSelector, yChannelSelector, scale,
+    return GrDisplacementMapEffect::Make(xChannelSelector, yChannelSelector, scale,
                                          std::move(dispProxy), SkMatrix::I(),
                                          std::move(colorProxy), colorSpaceXform,
                                          colorDimensions);
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 6254430..fe6a39a 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -360,8 +360,7 @@
                                          const SkIRect& bounds,
                                          const SkMatrix& matrix,
                                          const OutputProperties& outputProperties) const;
-    virtual sk_sp<GrFragmentProcessor> makeFragmentProcessor(GrResourceProvider*,
-                                                             sk_sp<GrTextureProxy>,
+    virtual sk_sp<GrFragmentProcessor> makeFragmentProcessor(sk_sp<GrTextureProxy>,
                                                              const SkMatrix&,
                                                              const SkIRect* srcBounds,
                                                              BoundaryMode boundaryMode) const = 0;
@@ -389,12 +388,10 @@
                                              BoundaryMode boundaryMode,
                                              const SkIRect* srcBounds,
                                              const SkIRect& bounds) const {
-    GrResourceProvider* resourceProvider = renderTargetContext->resourceProvider();
-
     SkRect srcRect = dstRect.makeOffset(SkIntToScalar(bounds.x()), SkIntToScalar(bounds.y()));
     GrPaint paint;
     paint.setGammaCorrect(renderTargetContext->isGammaCorrect());
-    sk_sp<GrFragmentProcessor> fp(this->makeFragmentProcessor(resourceProvider, std::move(srcProxy),
+    sk_sp<GrFragmentProcessor> fp(this->makeFragmentProcessor(std::move(srcProxy),
                                                               matrix, srcBounds,
                                                               boundaryMode));
     paint.addColorFragmentProcessor(std::move(fp));
@@ -493,7 +490,7 @@
     sk_sp<SkImageFilter> onMakeColorSpace(SkColorSpaceXformer*) const override;
 
 #if SK_SUPPORT_GPU
-    sk_sp<GrFragmentProcessor> makeFragmentProcessor(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    sk_sp<GrFragmentProcessor> makeFragmentProcessor(sk_sp<GrTextureProxy>,
                                                      const SkMatrix&, const SkIRect* bounds,
                                                      BoundaryMode) const override;
 #endif
@@ -530,7 +527,7 @@
     sk_sp<SkImageFilter> onMakeColorSpace(SkColorSpaceXformer*) const override;
 
 #if SK_SUPPORT_GPU
-    sk_sp<GrFragmentProcessor> makeFragmentProcessor(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    sk_sp<GrFragmentProcessor> makeFragmentProcessor(sk_sp<GrTextureProxy>,
                                                      const SkMatrix&, const SkIRect* bounds,
                                                      BoundaryMode) const override;
 #endif
@@ -546,7 +543,7 @@
 
 class GrLightingEffect : public GrSingleTextureEffect {
 public:
-    GrLightingEffect(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    GrLightingEffect(sk_sp<GrTextureProxy>,
                      const SkImageFilterLight* light, SkScalar surfaceScale,
                      const SkMatrix& matrix, BoundaryMode boundaryMode, const SkIRect* srcBounds);
     ~GrLightingEffect() override;
@@ -573,8 +570,7 @@
 
 class GrDiffuseLightingEffect : public GrLightingEffect {
 public:
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
                                            const SkImageFilterLight* light,
                                            SkScalar surfaceScale,
                                            const SkMatrix& matrix,
@@ -582,7 +578,7 @@
                                            BoundaryMode boundaryMode,
                                            const SkIRect* srcBounds) {
         return sk_sp<GrFragmentProcessor>(
-            new GrDiffuseLightingEffect(resourceProvider, std::move(proxy), light,
+            new GrDiffuseLightingEffect(std::move(proxy), light,
                                         surfaceScale, matrix, kd, boundaryMode, srcBounds));
     }
 
@@ -597,7 +593,7 @@
 
     bool onIsEqual(const GrFragmentProcessor&) const override;
 
-    GrDiffuseLightingEffect(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    GrDiffuseLightingEffect(sk_sp<GrTextureProxy>,
                             const SkImageFilterLight* light,
                             SkScalar surfaceScale,
                             const SkMatrix& matrix,
@@ -613,8 +609,7 @@
 
 class GrSpecularLightingEffect : public GrLightingEffect {
 public:
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
                                            const SkImageFilterLight* light,
                                            SkScalar surfaceScale,
                                            const SkMatrix& matrix,
@@ -623,7 +618,7 @@
                                            BoundaryMode boundaryMode,
                                            const SkIRect* srcBounds) {
         return sk_sp<GrFragmentProcessor>(
-            new GrSpecularLightingEffect(resourceProvider, std::move(proxy),
+            new GrSpecularLightingEffect(std::move(proxy),
                                          light, surfaceScale, matrix, ks, shininess,
                                          boundaryMode, srcBounds));
     }
@@ -640,7 +635,7 @@
 
     bool onIsEqual(const GrFragmentProcessor&) const override;
 
-    GrSpecularLightingEffect(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    GrSpecularLightingEffect(sk_sp<GrTextureProxy>,
                              const SkImageFilterLight* light,
                              SkScalar surfaceScale,
                              const SkMatrix& matrix,
@@ -1372,13 +1367,12 @@
 
 #if SK_SUPPORT_GPU
 sk_sp<GrFragmentProcessor> SkDiffuseLightingImageFilter::makeFragmentProcessor(
-                                                   GrResourceProvider* resourceProvider,
                                                    sk_sp<GrTextureProxy> proxy,
                                                    const SkMatrix& matrix,
                                                    const SkIRect* srcBounds,
                                                    BoundaryMode boundaryMode) const {
     SkScalar scale = this->surfaceScale() * 255;
-    return GrDiffuseLightingEffect::Make(resourceProvider, std::move(proxy),
+    return GrDiffuseLightingEffect::Make(std::move(proxy),
                                          this->light(), scale, matrix, this->kd(),
                                          boundaryMode, srcBounds);
 }
@@ -1547,13 +1541,12 @@
 
 #if SK_SUPPORT_GPU
 sk_sp<GrFragmentProcessor> SkSpecularLightingImageFilter::makeFragmentProcessor(
-                                                    GrResourceProvider* resourceProvider,
                                                     sk_sp<GrTextureProxy> proxy,
                                                     const SkMatrix& matrix,
                                                     const SkIRect* srcBounds,
                                                     BoundaryMode boundaryMode) const {
     SkScalar scale = this->surfaceScale() * 255;
-    return GrSpecularLightingEffect::Make(resourceProvider, std::move(proxy), this->light(),
+    return GrSpecularLightingEffect::Make(std::move(proxy), this->light(),
                                           scale, matrix, this->ks(),
                                           this->shininess(), boundaryMode, srcBounds);
 }
@@ -1734,15 +1727,14 @@
     }
 }
 
-GrLightingEffect::GrLightingEffect(GrResourceProvider* resourceProvider,
-                                   sk_sp<GrTextureProxy> proxy,
+GrLightingEffect::GrLightingEffect(sk_sp<GrTextureProxy> proxy,
                                    const SkImageFilterLight* light,
                                    SkScalar surfaceScale,
                                    const SkMatrix& matrix,
                                    BoundaryMode boundaryMode,
                                    const SkIRect* srcBounds)
         // Perhaps this could advertise the opaque or coverage-as-alpha optimizations?
-        : INHERITED(resourceProvider, kNone_OptimizationFlags, proxy, nullptr, SkMatrix::I())
+        : INHERITED(kNone_OptimizationFlags, proxy, nullptr, SkMatrix::I())
         , fLight(light)
         , fSurfaceScale(surfaceScale)
         , fFilterMatrix(matrix)
@@ -1764,16 +1756,14 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GrDiffuseLightingEffect::GrDiffuseLightingEffect(GrResourceProvider* resourceProvider,
-                                                 sk_sp<GrTextureProxy> proxy,
+GrDiffuseLightingEffect::GrDiffuseLightingEffect(sk_sp<GrTextureProxy> proxy,
                                                  const SkImageFilterLight* light,
                                                  SkScalar surfaceScale,
                                                  const SkMatrix& matrix,
                                                  SkScalar kd,
                                                  BoundaryMode boundaryMode,
                                                  const SkIRect* srcBounds)
-    : INHERITED(resourceProvider, std::move(proxy), light, surfaceScale, matrix,
-                boundaryMode, srcBounds), fKD(kd) {
+    : INHERITED(std::move(proxy), light, surfaceScale, matrix, boundaryMode, srcBounds), fKD(kd) {
     this->initClassID<GrDiffuseLightingEffect>();
 }
 
@@ -1810,8 +1800,7 @@
                                           d->fRandom->nextRangeU(0, proxy->width()),
                                           d->fRandom->nextRangeU(0, proxy->height()));
     BoundaryMode mode = static_cast<BoundaryMode>(d->fRandom->nextU() % kBoundaryModeCount);
-    return GrDiffuseLightingEffect::Make(d->resourceProvider(),
-                                         std::move(proxy), light.get(), surfaceScale,
+    return GrDiffuseLightingEffect::Make(std::move(proxy), light.get(), surfaceScale,
                                          matrix, kd, mode, &srcBounds);
 }
 #endif
@@ -1981,8 +1970,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GrSpecularLightingEffect::GrSpecularLightingEffect(GrResourceProvider* resourceProvider,
-                                                   sk_sp<GrTextureProxy> proxy,
+GrSpecularLightingEffect::GrSpecularLightingEffect(sk_sp<GrTextureProxy> proxy,
                                                    const SkImageFilterLight* light,
                                                    SkScalar surfaceScale,
                                                    const SkMatrix& matrix,
@@ -1990,7 +1978,7 @@
                                                    SkScalar shininess,
                                                    BoundaryMode boundaryMode,
                                                    const SkIRect* srcBounds)
-    : INHERITED(resourceProvider, std::move(proxy), light, surfaceScale,
+    : INHERITED(std::move(proxy), light, surfaceScale,
                 matrix, boundaryMode, srcBounds)
     , fKS(ks)
     , fShininess(shininess) {
@@ -2033,7 +2021,7 @@
                                           d->fRandom->nextRangeU(0, proxy->height()),
                                           d->fRandom->nextRangeU(0, proxy->width()),
                                           d->fRandom->nextRangeU(0, proxy->height()));
-    return GrSpecularLightingEffect::Make(d->resourceProvider(), std::move(proxy),
+    return GrSpecularLightingEffect::Make(std::move(proxy),
                                           light.get(), surfaceScale, matrix, ks, shininess, mode,
                                           &srcBounds);
 }
diff --git a/src/effects/SkMagnifierImageFilter.cpp b/src/effects/SkMagnifierImageFilter.cpp
index 1927715..5e4b466 100644
--- a/src/effects/SkMagnifierImageFilter.cpp
+++ b/src/effects/SkMagnifierImageFilter.cpp
@@ -49,8 +49,7 @@
 #if SK_SUPPORT_GPU
 class GrMagnifierEffect : public GrSingleTextureEffect {
 public:
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
                                            sk_sp<GrColorSpaceXform> colorSpaceXform,
                                            const SkIRect& bounds,
                                            const SkRect& srcRect,
@@ -58,8 +57,7 @@
                                            float yInvZoom,
                                            float xInvInset,
                                            float yInvInset) {
-        return sk_sp<GrFragmentProcessor>(new GrMagnifierEffect(resourceProvider,
-                                                                std::move(proxy),
+        return sk_sp<GrFragmentProcessor>(new GrMagnifierEffect(std::move(proxy),
                                                                 std::move(colorSpaceXform),
                                                                 bounds, srcRect,
                                                                 xInvZoom, yInvZoom,
@@ -82,8 +80,7 @@
     float yInvInset() const { return fYInvInset; }
 
 private:
-    GrMagnifierEffect(GrResourceProvider* resourceProvider,
-                      sk_sp<GrTextureProxy> proxy,
+    GrMagnifierEffect(sk_sp<GrTextureProxy> proxy,
                       sk_sp<GrColorSpaceXform> colorSpaceXform,
                       const SkIRect& bounds,
                       const SkRect& srcRect,
@@ -91,8 +88,7 @@
                       float yInvZoom,
                       float xInvInset,
                       float yInvInset)
-            : INHERITED{resourceProvider,
-                        ModulationFlags(proxy->config()),
+            : INHERITED{ModulationFlags(proxy->config()),
                         GR_PROXY_MOVE(proxy),
                         std::move(colorSpaceXform),
                         SkMatrix::I()} // TODO: no GrSamplerParams::kBilerp_FilterMode?
@@ -268,7 +264,6 @@
     SkRect srcRect = SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height));
 
     sk_sp<GrFragmentProcessor> effect(GrMagnifierEffect::Make(
-        d->resourceProvider(),
         std::move(proxy),
         std::move(colorSpaceXform),
         bounds,
@@ -359,7 +354,6 @@
         sk_sp<GrColorSpaceXform> colorSpaceXform = GrColorSpaceXform::Make(input->getColorSpace(),
                                                                            dstColorSpace);
         sk_sp<GrFragmentProcessor> fp(GrMagnifierEffect::Make(
-                                                        context->resourceProvider(),
                                                         std::move(inputProxy),
                                                         std::move(colorSpaceXform),
                                                         bounds,
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp
index 6644ef8..e92f072 100644
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp
@@ -315,8 +315,7 @@
         offset->fY = bounds.top();
         bounds.offset(-inputOffset);
 
-        sk_sp<GrFragmentProcessor> fp(GrMatrixConvolutionEffect::Make(context->resourceProvider(),
-                                                                      std::move(inputProxy),
+        sk_sp<GrFragmentProcessor> fp(GrMatrixConvolutionEffect::Make(std::move(inputProxy),
                                                                       bounds,
                                                                       fKernelSize,
                                                                       fKernel,
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 57abec9..0de1735 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -145,17 +145,15 @@
         kDilate_MorphologyType,
     };
 
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
                                            Direction dir, int radius, MorphologyType type) {
-        return sk_sp<GrFragmentProcessor>(new GrMorphologyEffect(resourceProvider, std::move(proxy),
+        return sk_sp<GrFragmentProcessor>(new GrMorphologyEffect(std::move(proxy),
                                                                  dir, radius, type));
     }
 
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy, Direction dir, int radius,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy, Direction dir, int radius,
                                            MorphologyType type, const float bounds[2]) {
-        return sk_sp<GrFragmentProcessor>(new GrMorphologyEffect(resourceProvider, std::move(proxy),
+        return sk_sp<GrFragmentProcessor>(new GrMorphologyEffect(std::move(proxy),
                                                                  dir, radius, type, bounds));
     }
 
@@ -180,9 +178,9 @@
 
     bool onIsEqual(const GrFragmentProcessor&) const override;
 
-    GrMorphologyEffect(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    GrMorphologyEffect(sk_sp<GrTextureProxy>,
                        Direction, int radius, MorphologyType);
-    GrMorphologyEffect(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    GrMorphologyEffect(sk_sp<GrTextureProxy>,
                        Direction, int radius, MorphologyType, const float bounds[2]);
 
     GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
@@ -322,30 +320,22 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GrMorphologyEffect::GrMorphologyEffect(GrResourceProvider* resourceProvider,
-                                       sk_sp<GrTextureProxy> proxy,
+GrMorphologyEffect::GrMorphologyEffect(sk_sp<GrTextureProxy> proxy,
                                        Direction direction,
                                        int radius,
                                        MorphologyType type)
-        : INHERITED{resourceProvider,
-                    ModulationFlags(proxy->config()),
-                    GR_PROXY_MOVE(proxy),
-                    direction, radius}
+        : INHERITED{ModulationFlags(proxy->config()), GR_PROXY_MOVE(proxy), direction, radius}
         , fType(type)
         , fUseRange(false) {
     this->initClassID<GrMorphologyEffect>();
 }
 
-GrMorphologyEffect::GrMorphologyEffect(GrResourceProvider* resourceProvider,
-                                       sk_sp<GrTextureProxy> proxy,
+GrMorphologyEffect::GrMorphologyEffect(sk_sp<GrTextureProxy> proxy,
                                        Direction direction,
                                        int radius,
                                        MorphologyType type,
                                        const float range[2])
-        : INHERITED{resourceProvider,
-                    ModulationFlags(proxy->config()),
-                    GR_PROXY_MOVE(proxy),
-                    direction, radius}
+        : INHERITED{ModulationFlags(proxy->config()), GR_PROXY_MOVE(proxy), direction, radius}
         , fType(type)
         , fUseRange(true) {
     this->initClassID<GrMorphologyEffect>();
@@ -388,8 +378,7 @@
     MorphologyType type = d->fRandom->nextBool() ? GrMorphologyEffect::kErode_MorphologyType
                                                  : GrMorphologyEffect::kDilate_MorphologyType;
 
-    return GrMorphologyEffect::Make(d->resourceProvider(),
-                                    std::move(proxy), dir, radius, type);
+    return GrMorphologyEffect::Make(std::move(proxy), dir, radius, type);
 }
 #endif
 
@@ -406,9 +395,7 @@
     GrPaint paint;
     paint.setGammaCorrect(renderTargetContext->isGammaCorrect());
 
-    GrResourceProvider* resourceProvider = renderTargetContext->resourceProvider();
-
-    paint.addColorFragmentProcessor(GrMorphologyEffect::Make(resourceProvider, std::move(proxy),
+    paint.addColorFragmentProcessor(GrMorphologyEffect::Make(std::move(proxy),
                                                              direction, radius, morphType,
                                                              bounds));
     paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
@@ -427,9 +414,7 @@
     GrPaint paint;
     paint.setGammaCorrect(renderTargetContext->isGammaCorrect());
 
-    GrResourceProvider* resourceProvider = renderTargetContext->resourceProvider();
-
-    paint.addColorFragmentProcessor(GrMorphologyEffect::Make(resourceProvider, std::move(proxy),
+    paint.addColorFragmentProcessor(GrMorphologyEffect::Make(std::move(proxy),
                                                              direction, radius, morphType));
     paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
     renderTargetContext->fillRectToRect(clip, std::move(paint), GrAA::kNo, SkMatrix::I(),
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index 93d784f..589b672 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -386,7 +386,7 @@
 
     bool onIsEqual(const GrFragmentProcessor&) const override;
 
-    ColorTableEffect(GrResourceProvider* , sk_sp<GrTextureProxy> proxy,
+    ColorTableEffect(sk_sp<GrTextureProxy> proxy,
                      GrTextureStripAtlas* atlas, int row, unsigned flags);
 
     GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
@@ -508,16 +508,13 @@
         return nullptr;
     }
 
-    return sk_sp<GrFragmentProcessor>(new ColorTableEffect(context->resourceProvider(),
-                                                           std::move(proxy),
-                                                           atlas, row, flags));
+    return sk_sp<GrFragmentProcessor>(new ColorTableEffect(std::move(proxy), atlas, row, flags));
 }
 
-ColorTableEffect::ColorTableEffect(GrResourceProvider* resourceProvider,
-                                   sk_sp<GrTextureProxy> proxy,
+ColorTableEffect::ColorTableEffect(sk_sp<GrTextureProxy> proxy,
                                    GrTextureStripAtlas* atlas, int row, unsigned flags)
         : INHERITED(kNone_OptimizationFlags)  // Not bothering with table-specific optimizations.
-        , fTextureSampler(resourceProvider, std::move(proxy))
+        , fTextureSampler(std::move(proxy))
         , fAtlas(atlas)
         , fRow(row) {
     this->initClassID<ColorTableEffect>();
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index 533df33..976d2d1 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -254,7 +254,7 @@
         sk_sp<GrColorSpaceXform> bgXform = GrColorSpaceXform::Make(background->getColorSpace(),
                                                                    outputProperties.colorSpace());
         bgFP = GrTextureDomainEffect::Make(
-                            context->resourceProvider(), std::move(backgroundProxy),
+                            std::move(backgroundProxy),
                             std::move(bgXform), bgMatrix,
                             GrTextureDomain::MakeTexelDomain(background->subset()),
                             GrTextureDomain::kDecal_Mode,
@@ -272,7 +272,7 @@
         sk_sp<GrFragmentProcessor> foregroundFP;
 
         foregroundFP = GrTextureDomainEffect::Make(
-                            context->resourceProvider(), std::move(foregroundProxy),
+                            std::move(foregroundProxy),
                             std::move(fgXform), fgMatrix,
                             GrTextureDomain::MakeTexelDomain(foreground->subset()),
                             GrTextureDomain::kDecal_Mode,
diff --git a/src/gpu/GrAHardwareBufferImageGenerator.cpp b/src/gpu/GrAHardwareBufferImageGenerator.cpp
index 06fa584..5412574 100644
--- a/src/gpu/GrAHardwareBufferImageGenerator.cpp
+++ b/src/gpu/GrAHardwareBufferImageGenerator.cpp
@@ -16,7 +16,6 @@
 #include "GrBackendSurface.h"
 #include "GrContext.h"
 #include "GrContextPriv.h"
-#include "GrResourceProvider.h"
 #include "GrTexture.h"
 
 #include <EGL/egl.h>
diff --git a/src/gpu/GrBlurUtils.cpp b/src/gpu/GrBlurUtils.cpp
index 76443ff..3a8c8ec 100644
--- a/src/gpu/GrBlurUtils.cpp
+++ b/src/gpu/GrBlurUtils.cpp
@@ -12,7 +12,6 @@
 #include "GrContextPriv.h"
 #include "GrFixedClip.h"
 #include "GrRenderTargetContextPriv.h"
-#include "GrResourceProvider.h"
 #include "effects/GrSimpleTextureEffect.h"
 #include "GrStyle.h"
 #include "GrTextureProxy.h"
@@ -40,13 +39,10 @@
         return false;
     }
 
-    GrResourceProvider* resourceProvider = renderTargetContext->resourceProvider();
-
     SkMatrix matrix = SkMatrix::MakeTrans(-SkIntToScalar(maskRect.fLeft),
                                           -SkIntToScalar(maskRect.fTop));
     matrix.preConcat(viewMatrix);
-    paint.addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(resourceProvider,
-                                                                   std::move(mask),
+    paint.addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(std::move(mask),
                                                                    nullptr, matrix));
 
     renderTargetContext->fillRectWithLocalMatrix(clip, std::move(paint), GrAA::kNo, SkMatrix::I(),
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp
index af5a7ba..2ab3c46 100644
--- a/src/gpu/GrClipStackClip.cpp
+++ b/src/gpu/GrClipStackClip.cpp
@@ -14,6 +14,7 @@
 #include "GrFixedClip.h"
 #include "GrGpuResourcePriv.h"
 #include "GrRenderTargetPriv.h"
+#include "GrResourceProvider.h"
 #include "GrStencilAttachment.h"
 #include "GrSWMaskHelper.h"
 #include "GrTextureProxy.h"
@@ -72,12 +73,10 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 // set up the draw state to enable the aa clipping mask.
-static sk_sp<GrFragmentProcessor> create_fp_for_mask(GrResourceProvider* resourceProvider,
-                                                     sk_sp<GrTextureProxy> mask,
+static sk_sp<GrFragmentProcessor> create_fp_for_mask(sk_sp<GrTextureProxy> mask,
                                                      const SkIRect &devBound) {
     SkIRect domainTexels = SkIRect::MakeWH(devBound.width(), devBound.height());
-    return GrDeviceSpaceTextureDecalFragmentProcessor::Make(resourceProvider,
-                                                            std::move(mask), domainTexels,
+    return GrDeviceSpaceTextureDecalFragmentProcessor::Make(std::move(mask), domainTexels,
                                                             {devBound.fLeft, devBound.fTop});
 }
 
@@ -327,8 +326,7 @@
         if (result) {
             // The mask's top left coord should be pinned to the rounded-out top left corner of
             // the clip's device space bounds.
-            out->addCoverageFP(create_fp_for_mask(context->resourceProvider(), std::move(result),
-                                                  reducedClip.ibounds()));
+            out->addCoverageFP(create_fp_for_mask(std::move(result), reducedClip.ibounds()));
             return true;
         }
 
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index a96fbce..b0d40f6 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -382,7 +382,7 @@
 
     if (tempProxy) {
         sk_sp<GrFragmentProcessor> fp = GrSimpleTextureEffect::Make(
-                fContext->resourceProvider(), tempProxy, nullptr, SkMatrix::I());
+                tempProxy, nullptr, SkMatrix::I());
         if (premulOnGpu) {
             fp = fContext->createUPMToPMEffect(std::move(fp), useConfigConversionEffect);
         }
@@ -507,7 +507,7 @@
             SkMatrix textureMatrix = SkMatrix::MakeTrans(SkIntToScalar(left), SkIntToScalar(top));
             sk_sp<GrTextureProxy> proxy = src->asTextureProxyRef();
             sk_sp<GrFragmentProcessor> fp = GrSimpleTextureEffect::Make(
-                    fContext->resourceProvider(), std::move(proxy), nullptr, textureMatrix);
+                    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.
diff --git a/src/gpu/GrCoordTransform.cpp b/src/gpu/GrCoordTransform.cpp
deleted file mode 100644
index de8b8cc..0000000
--- a/src/gpu/GrCoordTransform.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * Copyright 2014 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#include "GrCoordTransform.h"
-#include "GrResourceProvider.h"
-#include "GrTextureProxy.h"
-
-void GrCoordTransform::reset(GrResourceProvider* resourceProvider, const SkMatrix& m,
-                             GrTextureProxy* proxy, bool normalize) {
-    SkASSERT(proxy);
-    SkASSERT(!fInProcessor);
-
-    fMatrix = m;
-    // MDB TODO: just GrCaps is needed for this method
-    fProxy = proxy;
-    fNormalize = normalize;
-    fReverseY = kBottomLeft_GrSurfaceOrigin == proxy->origin();
-}
diff --git a/src/gpu/GrCoordTransform.h b/src/gpu/GrCoordTransform.h
index a791213..3ba4fd8 100644
--- a/src/gpu/GrCoordTransform.h
+++ b/src/gpu/GrCoordTransform.h
@@ -12,7 +12,6 @@
 #include "GrSurfaceProxyPriv.h"
 #include "GrTextureProxy.h"
 
-class GrResourceProvider;
 class GrTexture;
 
 /**
@@ -32,21 +31,20 @@
      * Create a transformation that maps [0, 1] to a proxy's boundaries. The proxy origin also
      * implies whether a y-reversal should be performed.
      */
-    GrCoordTransform(GrResourceProvider* resourceProvider, GrTextureProxy* proxy) {
+    GrCoordTransform(GrTextureProxy* proxy) {
         SkASSERT(proxy);
         SkDEBUGCODE(fInProcessor = false);
-        this->reset(resourceProvider, SkMatrix::I(), proxy, true);
+        this->reset(SkMatrix::I(), proxy, true);
     }
 
     /**
      * Create a transformation from a matrix. The proxy origin also implies whether a y-reversal
      * should be performed.
      */
-    GrCoordTransform(GrResourceProvider* resourceProvider, const SkMatrix& m,
-                     GrTextureProxy* proxy) {
+    GrCoordTransform(const SkMatrix& m, GrTextureProxy* proxy) {
         SkASSERT(proxy);
         SkDEBUGCODE(fInProcessor = false);
-        this->reset(resourceProvider, m, proxy, true);
+        this->reset(m, proxy, true);
     }
 
     /**
@@ -57,7 +55,15 @@
         this->reset(m);
     }
 
-    void reset(GrResourceProvider*, const SkMatrix&, GrTextureProxy*, bool normalize);
+    void reset(const SkMatrix& m, GrTextureProxy* proxy, bool normalize) {
+        SkASSERT(proxy);
+        SkASSERT(!fInProcessor);
+
+        fMatrix = m;
+        fProxy = proxy;
+        fNormalize = normalize;
+        fReverseY = kBottomLeft_GrSurfaceOrigin == proxy->origin();
+    }
 
     void reset(const SkMatrix& m) {
         SkASSERT(!fInProcessor);
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 99a097a..4d90e9a 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -9,6 +9,7 @@
 
 #include "GrContext.h"
 #include "GrGpu.h"
+#include "GrOnFlushResourceProvider.h"
 #include "GrRenderTargetContext.h"
 #include "GrPathRenderingRenderTargetContext.h"
 #include "GrRenderTargetProxy.h"
diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h
index 51c698d..0cbba5a 100644
--- a/src/gpu/GrDrawingManager.h
+++ b/src/gpu/GrDrawingManager.h
@@ -11,7 +11,6 @@
 #include "GrOpFlushState.h"
 #include "GrPathRenderer.h"
 #include "GrPathRendererChain.h"
-#include "GrOnFlushResourceProvider.h"
 #include "GrRenderTargetOpList.h"
 #include "GrResourceCache.h"
 #include "SkTArray.h"
@@ -19,6 +18,7 @@
 #include "text/GrAtlasTextContext.h"
 
 class GrContext;
+class GrOnFlushCallbackObject;
 class GrRenderTargetContext;
 class GrRenderTargetProxy;
 class GrSingleOWner;
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 54bb3a7..262f155 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -16,9 +16,9 @@
 #include "GrMesh.h"
 #include "GrPathRendering.h"
 #include "GrPipeline.h"
+#include "GrRenderTargetPriv.h"
 #include "GrResourceCache.h"
 #include "GrResourceProvider.h"
-#include "GrRenderTargetPriv.h"
 #include "GrStencilAttachment.h"
 #include "GrStencilSettings.h"
 #include "GrSurfacePriv.h"
diff --git a/src/gpu/GrOnFlushResourceProvider.h b/src/gpu/GrOnFlushResourceProvider.h
index b29dc9c..6b2570a 100644
--- a/src/gpu/GrOnFlushResourceProvider.h
+++ b/src/gpu/GrOnFlushResourceProvider.h
@@ -9,6 +9,7 @@
 #define GrOnFlushResourceProvider_DEFINED
 
 #include "GrTypes.h"
+#include "GrResourceProvider.h"
 #include "SkRefCnt.h"
 #include "SkTArray.h"
 
diff --git a/src/gpu/GrPaint.cpp b/src/gpu/GrPaint.cpp
index 9bbeec5..d9182d2 100644
--- a/src/gpu/GrPaint.cpp
+++ b/src/gpu/GrPaint.cpp
@@ -19,40 +19,33 @@
     this->setXPFactory(GrCoverageSetOpXPFactory::Get(regionOp, invertCoverage));
 }
 
-void GrPaint::addColorTextureProcessor(GrResourceProvider* resourceProvider,
-                                       sk_sp<GrTextureProxy> proxy,
+void GrPaint::addColorTextureProcessor(sk_sp<GrTextureProxy> proxy,
                                        sk_sp<GrColorSpaceXform> colorSpaceXform,
                                        const SkMatrix& matrix) {
-    this->addColorFragmentProcessor(GrSimpleTextureEffect::Make(resourceProvider, std::move(proxy),
+    this->addColorFragmentProcessor(GrSimpleTextureEffect::Make(std::move(proxy),
                                                                 std::move(colorSpaceXform),
                                                                 matrix));
 }
 
-void GrPaint::addColorTextureProcessor(GrResourceProvider* resourceProvider,
-                                       sk_sp<GrTextureProxy> proxy,
+void GrPaint::addColorTextureProcessor(sk_sp<GrTextureProxy> proxy,
                                        sk_sp<GrColorSpaceXform> colorSpaceXform,
                                        const SkMatrix& matrix,
                                        const GrSamplerParams& params) {
-    this->addColorFragmentProcessor(GrSimpleTextureEffect::Make(resourceProvider,
-                                                                std::move(proxy),
+    this->addColorFragmentProcessor(GrSimpleTextureEffect::Make(std::move(proxy),
                                                                 std::move(colorSpaceXform),
                                                                 matrix, params));
 }
 
-void GrPaint::addCoverageTextureProcessor(GrResourceProvider* resourceProvider,
-                                          sk_sp<GrTextureProxy> proxy,
+void GrPaint::addCoverageTextureProcessor(sk_sp<GrTextureProxy> proxy,
                                           const SkMatrix& matrix) {
-    this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(resourceProvider,
-                                                                   std::move(proxy),
+    this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(std::move(proxy),
                                                                    nullptr, matrix));
 }
 
-void GrPaint::addCoverageTextureProcessor(GrResourceProvider* resourceProvider,
-                                          sk_sp<GrTextureProxy> proxy,
+void GrPaint::addCoverageTextureProcessor(sk_sp<GrTextureProxy> proxy,
                                           const SkMatrix& matrix,
                                           const GrSamplerParams& params) {
-    this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(resourceProvider,
-                                                                   std::move(proxy),
+    this->addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(std::move(proxy),
                                                                    nullptr, matrix, params));
 }
 
diff --git a/src/gpu/GrPaint.h b/src/gpu/GrPaint.h
index e2b494f..0d8beb4 100644
--- a/src/gpu/GrPaint.h
+++ b/src/gpu/GrPaint.h
@@ -109,14 +109,14 @@
      * Helpers for adding color or coverage effects that sample a texture. The matrix is applied
      * to the src space position to compute texture coordinates.
      */
-    void addColorTextureProcessor(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    void addColorTextureProcessor(sk_sp<GrTextureProxy>,
                                   sk_sp<GrColorSpaceXform>, const SkMatrix&);
-    void addColorTextureProcessor(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    void addColorTextureProcessor(sk_sp<GrTextureProxy>,
                                   sk_sp<GrColorSpaceXform>, const SkMatrix&,
                                   const GrSamplerParams&);
 
-    void addCoverageTextureProcessor(GrResourceProvider*, sk_sp<GrTextureProxy>, const SkMatrix&);
-    void addCoverageTextureProcessor(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    void addCoverageTextureProcessor(sk_sp<GrTextureProxy>, const SkMatrix&);
+    void addCoverageTextureProcessor(sk_sp<GrTextureProxy>,
                                      const SkMatrix&, const GrSamplerParams&);
 
     int numColorFragmentProcessors() const { return fColorFragmentProcessors.count(); }
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h
index fb9c384..c55ed57 100644
--- a/src/gpu/GrPathRenderer.h
+++ b/src/gpu/GrPathRenderer.h
@@ -11,7 +11,6 @@
 #include "GrCaps.h"
 #include "GrRenderTargetContext.h"
 #include "GrPaint.h"
-#include "GrResourceProvider.h"
 #include "GrShape.h"
 #include "GrUserStencilSettings.h"
 
diff --git a/src/gpu/GrProcessor.cpp b/src/gpu/GrProcessor.cpp
index 51cfdfb..bff3348 100644
--- a/src/gpu/GrProcessor.cpp
+++ b/src/gpu/GrProcessor.cpp
@@ -136,8 +136,7 @@
     fBufferAccesses.push_back(access);
 }
 
-void GrResourceIOProcessor::addImageStorageAccess(GrResourceProvider* resourceProvider,
-                                                  const ImageStorageAccess* access) {
+void GrResourceIOProcessor::addImageStorageAccess(const ImageStorageAccess* access) {
     fImageStorageAccesses.push_back(access);
 }
 
@@ -223,22 +222,19 @@
 
 GrResourceIOProcessor::TextureSampler::TextureSampler() {}
 
-GrResourceIOProcessor::TextureSampler::TextureSampler(GrResourceProvider* resourceProvider,
-                                                      sk_sp<GrTextureProxy> proxy,
+GrResourceIOProcessor::TextureSampler::TextureSampler(sk_sp<GrTextureProxy> proxy,
                                                       const GrSamplerParams& params) {
-    this->reset(resourceProvider, std::move(proxy), params);
+    this->reset(std::move(proxy), params);
 }
 
-GrResourceIOProcessor::TextureSampler::TextureSampler(GrResourceProvider* resourceProvider,
-                                                      sk_sp<GrTextureProxy> proxy,
+GrResourceIOProcessor::TextureSampler::TextureSampler(sk_sp<GrTextureProxy> proxy,
                                                       GrSamplerParams::FilterMode filterMode,
                                                       SkShader::TileMode tileXAndY,
                                                       GrShaderFlags visibility) {
-    this->reset(resourceProvider, std::move(proxy), filterMode, tileXAndY, visibility);
+    this->reset(std::move(proxy), filterMode, tileXAndY, visibility);
 }
 
-void GrResourceIOProcessor::TextureSampler::reset(GrResourceProvider* resourceProvider,
-                                                  sk_sp<GrTextureProxy> proxy,
+void GrResourceIOProcessor::TextureSampler::reset(sk_sp<GrTextureProxy> proxy,
                                                   const GrSamplerParams& params,
                                                   GrShaderFlags visibility) {
     fParams = params;
@@ -247,8 +243,7 @@
     fVisibility = visibility;
 }
 
-void GrResourceIOProcessor::TextureSampler::reset(GrResourceProvider* resourceProvider,
-                                                  sk_sp<GrTextureProxy> proxy,
+void GrResourceIOProcessor::TextureSampler::reset(sk_sp<GrTextureProxy> proxy,
                                                   GrSamplerParams::FilterMode filterMode,
                                                   SkShader::TileMode tileXAndY,
                                                   GrShaderFlags visibility) {
diff --git a/src/gpu/GrProcessor.h b/src/gpu/GrProcessor.h
index f186af5..b7abf2f 100644
--- a/src/gpu/GrProcessor.h
+++ b/src/gpu/GrProcessor.h
@@ -190,7 +190,7 @@
      */
     void addTextureSampler(const TextureSampler*);
     void addBufferAccess(const BufferAccess*);
-    void addImageStorageAccess(GrResourceProvider* resourceProvider, const ImageStorageAccess*);
+    void addImageStorageAccess(const ImageStorageAccess*);
 
     bool hasSameSamplersAndAccesses(const GrResourceIOProcessor&) const;
 
@@ -219,15 +219,14 @@
      */
     TextureSampler();
 
-    // MDB TODO: ultimately we shouldn't need the resource provider parameter
-    TextureSampler(GrResourceProvider*, sk_sp<GrTextureProxy>, const GrSamplerParams&);
-    explicit TextureSampler(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    TextureSampler(sk_sp<GrTextureProxy>, const GrSamplerParams&);
+    explicit TextureSampler(sk_sp<GrTextureProxy>,
                             GrSamplerParams::FilterMode = GrSamplerParams::kNone_FilterMode,
                             SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode,
                             GrShaderFlags visibility = kFragment_GrShaderFlag);
-    void reset(GrResourceProvider*, sk_sp<GrTextureProxy>, const GrSamplerParams&,
+    void reset(sk_sp<GrTextureProxy>, const GrSamplerParams&,
                GrShaderFlags visibility = kFragment_GrShaderFlag);
-    void reset(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    void reset(sk_sp<GrTextureProxy>,
                GrSamplerParams::FilterMode = GrSamplerParams::kNone_FilterMode,
                SkShader::TileMode tileXAndY = SkShader::kClamp_TileMode,
                GrShaderFlags visibility = kFragment_GrShaderFlag);
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index bc36247..c5a115f 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -1815,7 +1815,7 @@
     args.fAppliedClip = &appliedClip;
     args.fRenderTarget = rt;
     args.fCaps = this->caps();
-    args.fResourceProvider = this->resourceProvider();
+    args.fResourceProvider = resourceProvider;
 
     if (analysis.requiresDstTexture()) {
         if (!this->setupDstProxy(this->asRenderTargetProxy(), clip, bounds, &args.fDstProxy)) {
diff --git a/src/gpu/GrRenderTargetContext.h b/src/gpu/GrRenderTargetContext.h
index c471eac..bc22604 100644
--- a/src/gpu/GrRenderTargetContext.h
+++ b/src/gpu/GrRenderTargetContext.h
@@ -54,10 +54,6 @@
 public:
     ~GrRenderTargetContext() override;
 
-    // MDB TODO: This access is mainly provided for the image filters. Remove it when they
-    // no longer need to pass it to the FragmentProcessor ctors.
-    GrResourceProvider* resourceProvider() { return fContext->resourceProvider(); }
-
     // We use SkPaint rather than GrPaint here for two reasons:
     //    * The SkPaint carries extra text settings. If these were extracted to a lighter object
     //      we could use GrPaint except that
diff --git a/src/gpu/GrRenderTargetOpList.cpp b/src/gpu/GrRenderTargetOpList.cpp
index 1972032..10922ac 100644
--- a/src/gpu/GrRenderTargetOpList.cpp
+++ b/src/gpu/GrRenderTargetOpList.cpp
@@ -12,7 +12,6 @@
 #include "GrGpuCommandBuffer.h"
 #include "GrRect.h"
 #include "GrRenderTargetContext.h"
-#include "GrResourceProvider.h"
 #include "instanced/InstancedRendering.h"
 #include "ops/GrClearOp.h"
 #include "ops/GrCopySurfaceOp.h"
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index fb66886..8809913 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -160,8 +160,6 @@
         return;
     }
 
-    GrResourceProvider* resourceProvider = renderTargetContext->resourceProvider();
-
     SkRect dstRect = SkRect::Make(deviceSpaceRectToDraw);
 
     // We use device coords to compute the texture coordinates. We take the device coords and apply
@@ -171,7 +169,7 @@
                                               SkIntToScalar(-textureOriginInDeviceSpace.fY));
     maskMatrix.preConcat(viewMatrix);
     paint.addCoverageFragmentProcessor(GrSimpleTextureEffect::Make(
-            resourceProvider, std::move(proxy), nullptr, maskMatrix,
+            std::move(proxy), nullptr, maskMatrix,
             GrSamplerParams::kNone_FilterMode));
     renderTargetContext->addDrawOp(clip,
                                    GrRectOpFactory::MakeNonAAFillWithLocalMatrix(
diff --git a/src/gpu/GrTextureAdjuster.cpp b/src/gpu/GrTextureAdjuster.cpp
index 183ec70..86027dd 100644
--- a/src/gpu/GrTextureAdjuster.cpp
+++ b/src/gpu/GrTextureAdjuster.cpp
@@ -163,7 +163,7 @@
              (domain.fLeft <= domain.fRight && domain.fTop <= domain.fBottom));
     sk_sp<GrColorSpaceXform> colorSpaceXform = GrColorSpaceXform::Make(fColorSpace,
                                                                        dstColorSpace);
-    return CreateFragmentProcessorForDomainAndFilter(fContext->resourceProvider(), std::move(proxy),
+    return CreateFragmentProcessorForDomainAndFilter(std::move(proxy),
                                                      std::move(colorSpaceXform),
                                                      textureMatrix, domainMode, domain,
                                                      filterOrNullForBicubic);
diff --git a/src/gpu/GrTextureContext.cpp b/src/gpu/GrTextureContext.cpp
index b4e76cb..dca8984 100644
--- a/src/gpu/GrTextureContext.cpp
+++ b/src/gpu/GrTextureContext.cpp
@@ -9,7 +9,6 @@
 
 #include "GrContextPriv.h"
 #include "GrDrawingManager.h"
-#include "GrResourceProvider.h"
 #include "GrTextureOpList.h"
 
 #include "../private/GrAuditTrail.h"
diff --git a/src/gpu/GrTextureMaker.cpp b/src/gpu/GrTextureMaker.cpp
index 69e3a6e..44212fe 100644
--- a/src/gpu/GrTextureMaker.cpp
+++ b/src/gpu/GrTextureMaker.cpp
@@ -113,7 +113,7 @@
     SkASSERT(kTightCopy_DomainMode != domainMode);
     sk_sp<GrColorSpaceXform> colorSpaceXform = GrColorSpaceXform::Make(texColorSpace.get(),
                                                                        dstColorSpace);
-    return CreateFragmentProcessorForDomainAndFilter(fContext->resourceProvider(), std::move(proxy),
+    return CreateFragmentProcessorForDomainAndFilter(std::move(proxy),
                                                      std::move(colorSpaceXform),
                                                      adjustedMatrix, domainMode, domain,
                                                      filterOrNullForBicubic);
diff --git a/src/gpu/GrTextureProducer.cpp b/src/gpu/GrTextureProducer.cpp
index c8ab782..276dc10 100644
--- a/src/gpu/GrTextureProducer.cpp
+++ b/src/gpu/GrTextureProducer.cpp
@@ -57,13 +57,11 @@
         // better!
         SkASSERT(copyParams.fFilter != GrSamplerParams::kMipMap_FilterMode);
         paint.addColorFragmentProcessor(
-            GrTextureDomainEffect::Make(context->resourceProvider(), std::move(inputProxy),
-                                        nullptr, SkMatrix::I(),
+            GrTextureDomainEffect::Make(std::move(inputProxy), nullptr, SkMatrix::I(),
                                         domain, GrTextureDomain::kClamp_Mode, copyParams.fFilter));
     } else {
         GrSamplerParams params(SkShader::kClamp_TileMode, copyParams.fFilter);
-        paint.addColorTextureProcessor(context->resourceProvider(), std::move(inputProxy),
-                                       nullptr, SkMatrix::I(), params);
+        paint.addColorTextureProcessor(std::move(inputProxy), nullptr, SkMatrix::I(), params);
     }
     paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
 
@@ -220,7 +218,6 @@
 }
 
 sk_sp<GrFragmentProcessor> GrTextureProducer::CreateFragmentProcessorForDomainAndFilter(
-                                        GrResourceProvider* resourceProvider,
                                         sk_sp<GrTextureProxy> proxy,
                                         sk_sp<GrColorSpaceXform> colorSpaceXform,
                                         const SkMatrix& textureMatrix,
@@ -230,26 +227,24 @@
     SkASSERT(kTightCopy_DomainMode != domainMode);
     if (filterOrNullForBicubic) {
         if (kDomain_DomainMode == domainMode) {
-            return GrTextureDomainEffect::Make(resourceProvider, std::move(proxy),
+            return GrTextureDomainEffect::Make(std::move(proxy),
                                                std::move(colorSpaceXform), textureMatrix,
                                                domain, GrTextureDomain::kClamp_Mode,
                                                *filterOrNullForBicubic);
         } else {
             GrSamplerParams params(SkShader::kClamp_TileMode, *filterOrNullForBicubic);
-            return GrSimpleTextureEffect::Make(resourceProvider, std::move(proxy),
+            return GrSimpleTextureEffect::Make(std::move(proxy),
                                                std::move(colorSpaceXform), textureMatrix,
                                                params);
         }
     } else {
         if (kDomain_DomainMode == domainMode) {
-            return GrBicubicEffect::Make(resourceProvider, std::move(proxy),
-                                         std::move(colorSpaceXform),
+            return GrBicubicEffect::Make(std::move(proxy), std::move(colorSpaceXform),
                                          textureMatrix, domain);
         } else {
             static const SkShader::TileMode kClampClamp[] =
                 { SkShader::kClamp_TileMode, SkShader::kClamp_TileMode };
-            return GrBicubicEffect::Make(resourceProvider, std::move(proxy),
-                                         std::move(colorSpaceXform),
+            return GrBicubicEffect::Make(std::move(proxy), std::move(colorSpaceXform),
                                          textureMatrix, kClampClamp);
         }
     }
diff --git a/src/gpu/GrTextureProducer.h b/src/gpu/GrTextureProducer.h
index 35e60f0..6a32e2f 100644
--- a/src/gpu/GrTextureProducer.h
+++ b/src/gpu/GrTextureProducer.h
@@ -12,7 +12,6 @@
 #include "GrResourceKey.h"
 
 class GrColorSpaceXform;
-class GrResourceProvider;
 class GrTexture;
 class GrTextureProxy;
 
@@ -132,7 +131,6 @@
         SkRect* domainRect);
 
     static sk_sp<GrFragmentProcessor> CreateFragmentProcessorForDomainAndFilter(
-        GrResourceProvider*,
         sk_sp<GrTextureProxy> proxy,
         sk_sp<GrColorSpaceXform>,
         const SkMatrix& textureMatrix,
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp
index 98cc75b..cf1010c 100644
--- a/src/gpu/GrTextureProxy.cpp
+++ b/src/gpu/GrTextureProxy.cpp
@@ -7,7 +7,6 @@
 
 #include "GrTextureProxy.h"
 
-#include "GrResourceProvider.h"
 #include "GrTexturePriv.h"
 
 GrTextureProxy::GrTextureProxy(const GrSurfaceDesc& srcDesc, SkBackingFit fit, SkBudgeted budgeted,
diff --git a/src/gpu/GrYUVProvider.cpp b/src/gpu/GrYUVProvider.cpp
index 6b51303..5ab926b 100644
--- a/src/gpu/GrYUVProvider.cpp
+++ b/src/gpu/GrYUVProvider.cpp
@@ -132,8 +132,7 @@
 
     GrPaint paint;
     sk_sp<GrFragmentProcessor> yuvToRgbProcessor(
-        GrYUVEffect::MakeYUVToRGB(ctx->resourceProvider(),
-                                  yuvTextureContexts[0]->asTextureProxyRef(),
+        GrYUVEffect::MakeYUVToRGB(yuvTextureContexts[0]->asTextureProxyRef(),
                                   yuvTextureContexts[1]->asTextureProxyRef(),
                                   yuvTextureContexts[2]->asTextureProxyRef(),
                                   yuvInfo.fSizeInfo.fSizes, yuvInfo.fColorSpace, false));
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 09467a1..be842ba 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1046,10 +1046,10 @@
             domain.fTop = domain.fBottom = srcRect.centerY();
         }
         if (bicubic) {
-            fp = GrBicubicEffect::Make(this->context()->resourceProvider(), std::move(proxy),
+            fp = GrBicubicEffect::Make(std::move(proxy),
                                        std::move(colorSpaceXform), texMatrix, domain);
         } else {
-            fp = GrTextureDomainEffect::Make(this->context()->resourceProvider(), std::move(proxy),
+            fp = GrTextureDomainEffect::Make(std::move(proxy),
                                              std::move(colorSpaceXform), texMatrix,
                                              domain, GrTextureDomain::kClamp_Mode,
                                              params.filterMode());
@@ -1057,10 +1057,10 @@
     } else if (bicubic) {
         SkASSERT(GrSamplerParams::kNone_FilterMode == params.filterMode());
         SkShader::TileMode tileModes[2] = { params.getTileModeX(), params.getTileModeY() };
-        fp = GrBicubicEffect::Make(this->context()->resourceProvider(), std::move(proxy),
+        fp = GrBicubicEffect::Make(std::move(proxy),
                                    std::move(colorSpaceXform), texMatrix, tileModes);
     } else {
-        fp = GrSimpleTextureEffect::Make(this->context()->resourceProvider(), std::move(proxy),
+        fp = GrSimpleTextureEffect::Make(std::move(proxy),
                                          std::move(colorSpaceXform), texMatrix, params);
     }
 
@@ -1132,8 +1132,7 @@
     sk_sp<GrColorSpaceXform> colorSpaceXform =
         GrColorSpaceXform::Make(result->getColorSpace(), fRenderTargetContext->getColorSpace());
 
-    sk_sp<GrFragmentProcessor> fp(GrSimpleTextureEffect::Make(this->context()->resourceProvider(),
-                                                              std::move(proxy),
+    sk_sp<GrFragmentProcessor> fp(GrSimpleTextureEffect::Make(std::move(proxy),
                                                               std::move(colorSpaceXform),
                                                               SkMatrix::I()));
     if (GrPixelConfigIsAlphaOnly(config)) {
diff --git a/src/gpu/effects/Gr1DKernelEffect.h b/src/gpu/effects/Gr1DKernelEffect.h
index c8d6a55..bc05e45 100644
--- a/src/gpu/effects/Gr1DKernelEffect.h
+++ b/src/gpu/effects/Gr1DKernelEffect.h
@@ -28,9 +28,9 @@
         kY_Direction,
     };
 
-    Gr1DKernelEffect(GrResourceProvider* resourceProvider, OptimizationFlags optFlags,
+    Gr1DKernelEffect(OptimizationFlags optFlags,
                      sk_sp<GrTextureProxy> proxy, Direction direction, int radius)
-        : INHERITED(resourceProvider, optFlags, std::move(proxy), nullptr, SkMatrix::I())
+        : INHERITED(optFlags, std::move(proxy), nullptr, SkMatrix::I())
         , fDirection(direction)
         , fRadius(radius) {
     }
diff --git a/src/gpu/effects/GrBicubicEffect.cpp b/src/gpu/effects/GrBicubicEffect.cpp
index d54f4df..6d8072f 100644
--- a/src/gpu/effects/GrBicubicEffect.cpp
+++ b/src/gpu/effects/GrBicubicEffect.cpp
@@ -132,28 +132,27 @@
     }
 }
 
-GrBicubicEffect::GrBicubicEffect(GrResourceProvider* resourceProvider, sk_sp<GrTextureProxy> proxy,
+GrBicubicEffect::GrBicubicEffect(sk_sp<GrTextureProxy> proxy,
                                  sk_sp<GrColorSpaceXform> colorSpaceXform,
                                  const SkMatrix &matrix,
                                  const SkShader::TileMode tileModes[2])
-  : INHERITED{resourceProvider,
-              ModulationFlags(proxy->config()),
-              GR_PROXY_MOVE(proxy),
-              std::move(colorSpaceXform),
-              matrix,
-              GrSamplerParams(tileModes, GrSamplerParams::kNone_FilterMode)}
-  , fDomain(GrTextureDomain::IgnoredDomain()) {
+        : INHERITED{ModulationFlags(proxy->config()),
+                    GR_PROXY_MOVE(proxy),
+                    std::move(colorSpaceXform),
+                    matrix,
+                    GrSamplerParams(tileModes, GrSamplerParams::kNone_FilterMode)}
+        , fDomain(GrTextureDomain::IgnoredDomain()) {
     this->initClassID<GrBicubicEffect>();
 }
 
-GrBicubicEffect::GrBicubicEffect(GrResourceProvider* resourceProvider, sk_sp<GrTextureProxy> proxy,
+GrBicubicEffect::GrBicubicEffect(sk_sp<GrTextureProxy> proxy,
                                  sk_sp<GrColorSpaceXform> colorSpaceXform,
                                  const SkMatrix &matrix,
                                  const SkRect& domain)
-  : INHERITED(resourceProvider, ModulationFlags(proxy->config()), proxy,
-              std::move(colorSpaceXform), matrix,
-              GrSamplerParams(SkShader::kClamp_TileMode, GrSamplerParams::kNone_FilterMode))
-  , fDomain(proxy.get(), domain, GrTextureDomain::kClamp_Mode) {
+        : INHERITED(ModulationFlags(proxy->config()), proxy,
+                    std::move(colorSpaceXform), matrix,
+                    GrSamplerParams(SkShader::kClamp_TileMode, GrSamplerParams::kNone_FilterMode))
+        , fDomain(proxy.get(), domain, GrTextureDomain::kClamp_Mode) {
     this->initClassID<GrBicubicEffect>();
 }
 
@@ -183,8 +182,7 @@
     sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(d->fRandom);
     static const SkShader::TileMode kClampClamp[] =
         { SkShader::kClamp_TileMode, SkShader::kClamp_TileMode };
-    return GrBicubicEffect::Make(d->resourceProvider(),
-                                 d->textureProxy(texIdx), std::move(colorSpaceXform),
+    return GrBicubicEffect::Make(d->textureProxy(texIdx), std::move(colorSpaceXform),
                                  SkMatrix::I(), kClampClamp);
 }
 #endif
diff --git a/src/gpu/effects/GrBicubicEffect.h b/src/gpu/effects/GrBicubicEffect.h
index 7cc8c1e..de9468b 100644
--- a/src/gpu/effects/GrBicubicEffect.h
+++ b/src/gpu/effects/GrBicubicEffect.h
@@ -29,12 +29,11 @@
     /**
      * Create a Mitchell filter effect with specified texture matrix and x/y tile modes.
      */
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    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(resourceProvider, std::move(proxy),
+        return sk_sp<GrFragmentProcessor>(new GrBicubicEffect(std::move(proxy),
                                                               std::move(colorSpaceXform),
                                                               matrix, tileModes));
     }
@@ -42,12 +41,11 @@
     /**
      * Create a Mitchell filter effect with a texture matrix and a domain.
      */
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    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(resourceProvider, std::move(proxy),
+        return sk_sp<GrFragmentProcessor>(new GrBicubicEffect(std::move(proxy),
                                                               std::move(colorSpaceXform),
                                                               matrix, domain));
     }
@@ -63,9 +61,9 @@
                                  GrSamplerParams::FilterMode* filterMode);
 
 private:
-    GrBicubicEffect(GrResourceProvider*, sk_sp<GrTextureProxy>, sk_sp<GrColorSpaceXform>,
+    GrBicubicEffect(sk_sp<GrTextureProxy>, sk_sp<GrColorSpaceXform>,
                     const SkMatrix &matrix, const SkShader::TileMode tileModes[2]);
-    GrBicubicEffect(GrResourceProvider*, sk_sp<GrTextureProxy>, sk_sp<GrColorSpaceXform>,
+    GrBicubicEffect(sk_sp<GrTextureProxy>, sk_sp<GrColorSpaceXform>,
                     const SkMatrix &matrix, const SkRect& domain);
 
     GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index eb9b7b8..9de3b46 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -114,14 +114,14 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GrBitmapTextGeoProc::GrBitmapTextGeoProc(GrResourceProvider* resourceProvider, GrColor color,
+GrBitmapTextGeoProc::GrBitmapTextGeoProc(GrColor color,
                                          sk_sp<GrTextureProxy> proxy,
                                          const GrSamplerParams& params, GrMaskFormat format,
                                          const SkMatrix& localMatrix, bool usesLocalCoords)
     : fColor(color)
     , fLocalMatrix(localMatrix)
     , fUsesLocalCoords(usesLocalCoords)
-    , fTextureSampler(resourceProvider, std::move(proxy), params)
+    , fTextureSampler(std::move(proxy), params)
     , fInColor(nullptr)
     , fMaskFormat(format) {
     this->initClassID<GrBitmapTextGeoProc>();
@@ -181,8 +181,7 @@
             break;
     }
 
-    return GrBitmapTextGeoProc::Make(d->resourceProvider(), GrRandomColor(d->fRandom),
-                                     std::move(proxy),
+    return GrBitmapTextGeoProc::Make(GrRandomColor(d->fRandom), std::move(proxy),
                                      params, format, GrTest::TestMatrix(d->fRandom),
                                      d->fRandom->nextBool());
 }
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.h b/src/gpu/effects/GrBitmapTextGeoProc.h
index aa9afc2..c3ddadc 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.h
+++ b/src/gpu/effects/GrBitmapTextGeoProc.h
@@ -21,12 +21,12 @@
  */
 class GrBitmapTextGeoProc : public GrGeometryProcessor {
 public:
-    static sk_sp<GrGeometryProcessor> Make(GrResourceProvider* resourceProvider, GrColor color,
+    static sk_sp<GrGeometryProcessor> Make(GrColor color,
                                            sk_sp<GrTextureProxy> proxy, const GrSamplerParams& p,
                                            GrMaskFormat format, const SkMatrix& localMatrix,
                                            bool usesLocalCoords) {
         return sk_sp<GrGeometryProcessor>(
-            new GrBitmapTextGeoProc(resourceProvider, color, std::move(proxy), p, format,
+            new GrBitmapTextGeoProc(color, std::move(proxy), p, format,
                                     localMatrix, usesLocalCoords));
     }
 
@@ -48,7 +48,7 @@
     GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps& caps) const override;
 
 private:
-    GrBitmapTextGeoProc(GrResourceProvider*, GrColor, sk_sp<GrTextureProxy>,
+    GrBitmapTextGeoProc(GrColor, sk_sp<GrTextureProxy>,
                         const GrSamplerParams& params,
                         GrMaskFormat format, const SkMatrix& localMatrix, bool usesLocalCoords);
 
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 41c7e6f..e4989de 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -137,8 +137,8 @@
     desc.fHeight = kSize;
     desc.fConfig = kConfig;
 
-    GrResourceProvider* resourceProvider = context->resourceProvider();
-    sk_sp<GrTextureProxy> dataProxy = GrSurfaceProxy::MakeDeferred(resourceProvider, desc,
+    sk_sp<GrTextureProxy> dataProxy = GrSurfaceProxy::MakeDeferred(context->resourceProvider(),
+                                                                   desc,
                                                                    SkBudgeted::kYes, data, 0);
     if (!dataProxy) {
         return false;
@@ -156,7 +156,7 @@
     sk_sp<GrFragmentProcessor> pmToUPM(new GrConfigConversionEffect(kToUnpremul_PMConversion));
     sk_sp<GrFragmentProcessor> upmToPM(new GrConfigConversionEffect(kToPremul_PMConversion));
 
-    paint1.addColorTextureProcessor(resourceProvider, dataProxy, nullptr, SkMatrix::I());
+    paint1.addColorTextureProcessor(dataProxy, nullptr, SkMatrix::I());
     paint1.addColorFragmentProcessor(pmToUPM);
     paint1.setPorterDuffXPFactory(SkBlendMode::kSrc);
 
@@ -165,14 +165,14 @@
         return false;
     }
 
-    paint2.addColorTextureProcessor(resourceProvider, readRTC->asTextureProxyRef(), nullptr,
+    paint2.addColorTextureProcessor(readRTC->asTextureProxyRef(), nullptr,
                                     SkMatrix::I());
     paint2.addColorFragmentProcessor(std::move(upmToPM));
     paint2.setPorterDuffXPFactory(SkBlendMode::kSrc);
 
     tempRTC->fillRectToRect(GrNoClip(), std::move(paint2), GrAA::kNo, SkMatrix::I(), kRect, kRect);
 
-    paint3.addColorTextureProcessor(resourceProvider, tempRTC->asTextureProxyRef(), nullptr,
+    paint3.addColorTextureProcessor(tempRTC->asTextureProxyRef(), nullptr,
                                     SkMatrix::I());
     paint3.addColorFragmentProcessor(std::move(pmToUPM));
     paint3.setPorterDuffXPFactory(SkBlendMode::kSrc);
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.cpp b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
index 51c4b55..f0f4ec4 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.cpp
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.cpp
@@ -222,8 +222,7 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 
-GrDistanceFieldA8TextGeoProc::GrDistanceFieldA8TextGeoProc(GrResourceProvider* resourceProvider,
-                                                           GrColor color,
+GrDistanceFieldA8TextGeoProc::GrDistanceFieldA8TextGeoProc(GrColor color,
                                                            const SkMatrix& viewMatrix,
                                                            sk_sp<GrTextureProxy> proxy,
                                                            const GrSamplerParams& params,
@@ -234,7 +233,7 @@
                                                            bool usesLocalCoords)
     : fColor(color)
     , fViewMatrix(viewMatrix)
-    , fTextureSampler(resourceProvider, std::move(proxy), params)
+    , fTextureSampler(std::move(proxy), params)
 #ifdef SK_GAMMA_APPLY_TO_A8
     , fDistanceAdjust(distanceAdjust)
 #endif
@@ -289,8 +288,7 @@
         flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0;
     }
 
-    return GrDistanceFieldA8TextGeoProc::Make(d->resourceProvider(),
-                                              GrRandomColor(d->fRandom),
+    return GrDistanceFieldA8TextGeoProc::Make(GrRandomColor(d->fRandom),
                                               GrTest::TestMatrix(d->fRandom),
                                               std::move(proxy), params,
 #ifdef SK_GAMMA_APPLY_TO_A8
@@ -472,20 +470,18 @@
 };
 
 ///////////////////////////////////////////////////////////////////////////////
-GrDistanceFieldPathGeoProc::GrDistanceFieldPathGeoProc(
-        GrResourceProvider* resourceProvider,
-        GrColor color,
-        const SkMatrix& viewMatrix,
-        sk_sp<GrTextureProxy> proxy,
-        const GrSamplerParams& params,
-        uint32_t flags,
-        bool usesLocalCoords)
-    : fColor(color)
-    , fViewMatrix(viewMatrix)
-    , fTextureSampler(resourceProvider, std::move(proxy), params)
-    , fFlags(flags & kNonLCD_DistanceFieldEffectMask)
-    , fInColor(nullptr)
-    , fUsesLocalCoords(usesLocalCoords) {
+GrDistanceFieldPathGeoProc::GrDistanceFieldPathGeoProc(GrColor color,
+                                                       const SkMatrix& viewMatrix,
+                                                       sk_sp<GrTextureProxy> proxy,
+                                                       const GrSamplerParams& params,
+                                                       uint32_t flags,
+                                                       bool usesLocalCoords)
+        : fColor(color)
+        , fViewMatrix(viewMatrix)
+        , fTextureSampler(std::move(proxy), params)
+        , fFlags(flags & kNonLCD_DistanceFieldEffectMask)
+        , fInColor(nullptr)
+        , fUsesLocalCoords(usesLocalCoords) {
     SkASSERT(!(flags & ~kNonLCD_DistanceFieldEffectMask));
     this->initClassID<GrDistanceFieldPathGeoProc>();
     fInPosition = &this->addVertexAttrib("inPosition", kVec2f_GrVertexAttribType,
@@ -533,8 +529,7 @@
         flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0;
     }
 
-    return GrDistanceFieldPathGeoProc::Make(d->resourceProvider(),
-                                            GrRandomColor(d->fRandom),
+    return GrDistanceFieldPathGeoProc::Make(GrRandomColor(d->fRandom),
                                             GrTest::TestMatrix(d->fRandom),
                                             std::move(proxy),
                                             params,
@@ -776,7 +771,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 GrDistanceFieldLCDTextGeoProc::GrDistanceFieldLCDTextGeoProc(
-                                                  GrResourceProvider* resourceProvider,
                                                   GrColor color, const SkMatrix& viewMatrix,
                                                   sk_sp<GrTextureProxy> proxy,
                                                   const GrSamplerParams& params,
@@ -784,7 +778,7 @@
                                                   uint32_t flags, bool usesLocalCoords)
     : fColor(color)
     , fViewMatrix(viewMatrix)
-    , fTextureSampler(resourceProvider, std::move(proxy), params)
+    , fTextureSampler(std::move(proxy), params)
     , fDistanceAdjust(distanceAdjust)
     , fFlags(flags & kLCD_DistanceFieldEffectMask)
     , fUsesLocalCoords(usesLocalCoords) {
@@ -835,8 +829,7 @@
         flags |= d->fRandom->nextBool() ? kScaleOnly_DistanceFieldEffectFlag : 0;
     }
     flags |= d->fRandom->nextBool() ? kBGR_DistanceFieldEffectFlag : 0;
-    return GrDistanceFieldLCDTextGeoProc::Make(d->resourceProvider(),
-                                               GrRandomColor(d->fRandom),
+    return GrDistanceFieldLCDTextGeoProc::Make(GrRandomColor(d->fRandom),
                                                GrTest::TestMatrix(d->fRandom),
                                                std::move(proxy), params,
                                                wa,
diff --git a/src/gpu/effects/GrDistanceFieldGeoProc.h b/src/gpu/effects/GrDistanceFieldGeoProc.h
index 1384d2f..c0cc2e9 100644
--- a/src/gpu/effects/GrDistanceFieldGeoProc.h
+++ b/src/gpu/effects/GrDistanceFieldGeoProc.h
@@ -49,23 +49,21 @@
 class GrDistanceFieldA8TextGeoProc : public GrGeometryProcessor {
 public:
 #ifdef SK_GAMMA_APPLY_TO_A8
-    static sk_sp<GrGeometryProcessor> Make(GrResourceProvider* resourceProvider,
-                                           GrColor color, const SkMatrix& viewMatrix,
+    static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMatrix,
                                            sk_sp<GrTextureProxy> proxy,
                                            const GrSamplerParams& params,
                                            float lum, uint32_t flags, bool usesLocalCoords) {
         return sk_sp<GrGeometryProcessor>(
-            new GrDistanceFieldA8TextGeoProc(resourceProvider, color, viewMatrix, std::move(proxy),
+            new GrDistanceFieldA8TextGeoProc(color, viewMatrix, std::move(proxy),
                                              params, lum, flags, usesLocalCoords));
     }
 #else
-    static sk_sp<GrGeometryProcessor> Make(GrResourceProvider* resourceProvider,
-                                           GrColor color, const SkMatrix& viewMatrix,
+    static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMatrix,
                                            sk_sp<GrTextureProxy> proxy,
                                            const GrSamplerParams& params,
                                            uint32_t flags, bool usesLocalCoords) {
         return sk_sp<GrGeometryProcessor>(
-            new GrDistanceFieldA8TextGeoProc(resourceProvider, color, viewMatrix, std::move(proxy),
+            new GrDistanceFieldA8TextGeoProc(color, viewMatrix, std::move(proxy),
                                              params, flags, usesLocalCoords));
     }
 #endif
@@ -90,7 +88,7 @@
     GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const override;
 
 private:
-    GrDistanceFieldA8TextGeoProc(GrResourceProvider*, GrColor, const SkMatrix& viewMatrix,
+    GrDistanceFieldA8TextGeoProc(GrColor, const SkMatrix& viewMatrix,
                                  sk_sp<GrTextureProxy> proxy, const GrSamplerParams& params,
 #ifdef SK_GAMMA_APPLY_TO_A8
                                  float distanceAdjust,
@@ -123,12 +121,12 @@
 */
 class GrDistanceFieldPathGeoProc : public GrGeometryProcessor {
 public:
-    static sk_sp<GrGeometryProcessor> Make(GrResourceProvider* resourceProvider, GrColor color,
+    static sk_sp<GrGeometryProcessor> Make(GrColor color,
                                            const SkMatrix& viewMatrix, sk_sp<GrTextureProxy> proxy,
                                            const GrSamplerParams& params,
                                            uint32_t flags, bool usesLocalCoords) {
         return sk_sp<GrGeometryProcessor>(
-            new GrDistanceFieldPathGeoProc(resourceProvider, color, viewMatrix, std::move(proxy),
+            new GrDistanceFieldPathGeoProc(color, viewMatrix, std::move(proxy),
                                            params, flags, usesLocalCoords));
     }
 
@@ -149,7 +147,7 @@
     GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const override;
 
 private:
-    GrDistanceFieldPathGeoProc(GrResourceProvider*, GrColor, const SkMatrix& viewMatrix,
+    GrDistanceFieldPathGeoProc(GrColor, const SkMatrix& viewMatrix,
                                sk_sp<GrTextureProxy>, const GrSamplerParams&, uint32_t flags,
                                bool usesLocalCoords);
 
@@ -190,14 +188,15 @@
         }
     };
 
-    static sk_sp<GrGeometryProcessor> Make(GrResourceProvider* resourceProvider, GrColor color,
+    static sk_sp<GrGeometryProcessor> Make(GrColor color,
                                            const SkMatrix& viewMatrix,
                                            sk_sp<GrTextureProxy> proxy,
                                            const GrSamplerParams& params,
-                                           DistanceAdjust distanceAdjust, uint32_t flags,
+                                           DistanceAdjust distanceAdjust,
+                                           uint32_t flags,
                                            bool usesLocalCoords) {
         return sk_sp<GrGeometryProcessor>(
-            new GrDistanceFieldLCDTextGeoProc(resourceProvider, color, viewMatrix, std::move(proxy),
+            new GrDistanceFieldLCDTextGeoProc(color, viewMatrix, std::move(proxy),
                                               params, distanceAdjust,
                                               flags, usesLocalCoords));
     }
@@ -220,7 +219,7 @@
     GrGLSLPrimitiveProcessor* createGLSLInstance(const GrShaderCaps&) const override;
 
 private:
-    GrDistanceFieldLCDTextGeoProc(GrResourceProvider*, GrColor, const SkMatrix& viewMatrix,
+    GrDistanceFieldLCDTextGeoProc(GrColor, const SkMatrix& viewMatrix,
                                   sk_sp<GrTextureProxy> proxy, const GrSamplerParams& params,
                                   DistanceAdjust wa, uint32_t flags,
                                   bool usesLocalCoords);
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
index ae4de1b..b089409 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.cpp
@@ -168,15 +168,13 @@
 }
 
 GrGaussianConvolutionFragmentProcessor::GrGaussianConvolutionFragmentProcessor(
-                                                            GrResourceProvider* resourceProvider,
                                                             sk_sp<GrTextureProxy> proxy,
                                                             Direction direction,
                                                             int radius,
                                                             float gaussianSigma,
                                                             bool useBounds,
                                                             int bounds[2])
-        : INHERITED{resourceProvider,
-                    ModulationFlags(proxy->config()),
+        : INHERITED{ModulationFlags(proxy->config()),
                     GR_PROXY_MOVE(proxy),
                     direction,
                     radius}
@@ -237,8 +235,7 @@
     int radius = d->fRandom->nextRangeU(1, kMaxKernelRadius);
     float sigma = radius / 3.f;
 
-    return GrGaussianConvolutionFragmentProcessor::Make(
-            d->resourceProvider(), d->textureProxy(texIdx),
-            dir, radius, sigma, useBounds, bounds);
+    return GrGaussianConvolutionFragmentProcessor::Make(d->textureProxy(texIdx),
+                                                        dir, radius, sigma, useBounds, bounds);
 }
 #endif
diff --git a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
index dfe4234..d639872 100644
--- a/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
+++ b/src/gpu/effects/GrGaussianConvolutionFragmentProcessor.h
@@ -18,15 +18,14 @@
 class GrGaussianConvolutionFragmentProcessor : public Gr1DKernelEffect {
 public:
     /// Convolve with a Gaussian kernel
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
                                            Direction dir,
                                            int halfWidth,
                                            float gaussianSigma,
                                            bool useBounds,
                                            int* bounds) {
         return sk_sp<GrFragmentProcessor>(new GrGaussianConvolutionFragmentProcessor(
-            resourceProvider, std::move(proxy), dir, halfWidth, gaussianSigma, useBounds, bounds));
+            std::move(proxy), dir, halfWidth, gaussianSigma, useBounds, bounds));
     }
 
     ~GrGaussianConvolutionFragmentProcessor() override;
@@ -49,7 +48,7 @@
 
 private:
     /// Convolve with a Gaussian kernel
-    GrGaussianConvolutionFragmentProcessor(GrResourceProvider*, sk_sp<GrTextureProxy>, Direction,
+    GrGaussianConvolutionFragmentProcessor(sk_sp<GrTextureProxy>, Direction,
                                            int halfWidth, float gaussianSigma, bool useBounds,
                                            int bounds[2]);
 
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index d1726a0..bc1537c 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -148,8 +148,7 @@
     fDomain.setData(pdman, conv.domain(), texture);
 }
 
-GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrResourceProvider* resourceProvider,
-                                                     sk_sp<GrTextureProxy> proxy,
+GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(sk_sp<GrTextureProxy> proxy,
                                                      const SkIRect& bounds,
                                                      const SkISize& kernelSize,
                                                      const SkScalar* kernel,
@@ -160,7 +159,7 @@
                                                      bool convolveAlpha)
     // To advertise either the modulation or opaqueness optimizations we'd have to examine the
     // parameters.
-    : INHERITED(resourceProvider, kNone_OptimizationFlags, proxy, nullptr, SkMatrix::I())
+    : INHERITED(kNone_OptimizationFlags, proxy, nullptr, SkMatrix::I())
     , fKernelSize(kernelSize)
     , fGain(SkScalarToFloat(gain))
     , fBias(SkScalarToFloat(bias) / 255.0f)
@@ -226,7 +225,6 @@
 
 // Static function to create a 2D convolution
 sk_sp<GrFragmentProcessor> GrMatrixConvolutionEffect::MakeGaussian(
-                                                            GrResourceProvider* resourceProvider,
                                                             sk_sp<GrTextureProxy> proxy,
                                                             const SkIRect& bounds,
                                                             const SkISize& kernelSize,
@@ -242,7 +240,7 @@
     fill_in_2D_gaussian_kernel(kernel, kernelSize.width(), kernelSize.height(), sigmaX, sigmaY);
 
     return sk_sp<GrFragmentProcessor>(
-        new GrMatrixConvolutionEffect(resourceProvider, std::move(proxy), bounds, kernelSize,
+        new GrMatrixConvolutionEffect(std::move(proxy), bounds, kernelSize,
                                       kernel, gain, bias, kernelOffset, tileMode, convolveAlpha));
 }
 
@@ -272,8 +270,7 @@
     GrTextureDomain::Mode tileMode =
             static_cast<GrTextureDomain::Mode>(d->fRandom->nextRangeU(0, 2));
     bool convolveAlpha = d->fRandom->nextBool();
-    return GrMatrixConvolutionEffect::Make(d->resourceProvider(),
-                                           std::move(proxy),
+    return GrMatrixConvolutionEffect::Make(std::move(proxy),
                                            bounds,
                                            kernelSize,
                                            kernel.get(),
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.h b/src/gpu/effects/GrMatrixConvolutionEffect.h
index 6104f11..ffd05fa 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.h
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.h
@@ -17,8 +17,7 @@
 
 class GrMatrixConvolutionEffect : public GrSingleTextureEffect {
 public:
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
                                            const SkIRect& bounds,
                                            const SkISize& kernelSize,
                                            const SkScalar* kernel,
@@ -28,12 +27,11 @@
                                            GrTextureDomain::Mode tileMode,
                                            bool convolveAlpha) {
         return sk_sp<GrFragmentProcessor>(
-            new GrMatrixConvolutionEffect(resourceProvider, std::move(proxy), bounds, kernelSize,
+            new GrMatrixConvolutionEffect(std::move(proxy), bounds, kernelSize,
                                           kernel, gain, bias, kernelOffset, tileMode, convolveAlpha));
     }
 
-    static sk_sp<GrFragmentProcessor> MakeGaussian(GrResourceProvider*,
-                                                   sk_sp<GrTextureProxy> proxy,
+    static sk_sp<GrFragmentProcessor> MakeGaussian(sk_sp<GrTextureProxy> proxy,
                                                    const SkIRect& bounds,
                                                    const SkISize& kernelSize,
                                                    SkScalar gain,
@@ -56,8 +54,7 @@
     const char* name() const override { return "MatrixConvolution"; }
 
 private:
-    GrMatrixConvolutionEffect(GrResourceProvider*,
-                              sk_sp<GrTextureProxy> proxy,
+    GrMatrixConvolutionEffect(sk_sp<GrTextureProxy> proxy,
                               const SkIRect& bounds,
                               const SkISize& kernelSize,
                               const SkScalar* kernel,
diff --git a/src/gpu/effects/GrSimpleTextureEffect.cpp b/src/gpu/effects/GrSimpleTextureEffect.cpp
index 307188b..938fb04 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.cpp
+++ b/src/gpu/effects/GrSimpleTextureEffect.cpp
@@ -11,13 +11,11 @@
 #include "glsl/GrGLSLFragmentProcessor.h"
 #include "glsl/GrGLSLFragmentShaderBuilder.h"
 
-GrSimpleTextureEffect::GrSimpleTextureEffect(GrResourceProvider* resourceProvider,
-                                             sk_sp<GrTextureProxy> proxy,
+GrSimpleTextureEffect::GrSimpleTextureEffect(sk_sp<GrTextureProxy> proxy,
                                              sk_sp<GrColorSpaceXform> colorSpaceXform,
                                              const SkMatrix& matrix,
                                              GrSamplerParams::FilterMode filterMode)
-        : INHERITED{resourceProvider,
-                    ModulationFlags(proxy->config()),
+        : INHERITED{ModulationFlags(proxy->config()),
                     GR_PROXY_MOVE(proxy),
                     std::move(colorSpaceXform),
                     matrix,
@@ -25,13 +23,11 @@
     this->initClassID<GrSimpleTextureEffect>();
 }
 
-GrSimpleTextureEffect::GrSimpleTextureEffect(GrResourceProvider* resourceProvider,
-                                             sk_sp<GrTextureProxy> proxy,
+GrSimpleTextureEffect::GrSimpleTextureEffect(sk_sp<GrTextureProxy> proxy,
                                              sk_sp<GrColorSpaceXform> colorSpaceXform,
                                              const SkMatrix& matrix,
                                              const GrSamplerParams& params)
-        : INHERITED{resourceProvider,
-                    ModulationFlags(proxy->config()),
+        : INHERITED{ModulationFlags(proxy->config()),
                     GR_PROXY_MOVE(proxy),
                     std::move(colorSpaceXform),
                     matrix,
@@ -109,7 +105,7 @@
 
     const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom);
     sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(d->fRandom);
-    return GrSimpleTextureEffect::Make(d->resourceProvider(), d->textureProxy(texIdx),
+    return GrSimpleTextureEffect::Make(d->textureProxy(texIdx),
                                        std::move(colorSpaceXform), matrix);
 }
 #endif
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h
index 0b01ac7..0bf2dcc 100644
--- a/src/gpu/effects/GrSimpleTextureEffect.h
+++ b/src/gpu/effects/GrSimpleTextureEffect.h
@@ -21,56 +21,31 @@
 class GrSimpleTextureEffect : public GrSingleTextureEffect {
 public:
     /* unfiltered, clamp mode */
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
                                            sk_sp<GrColorSpaceXform> colorSpaceXform,
                                            const SkMatrix& matrix) {
-        // MDB TODO: remove this instantiation once instantiation is pushed past the
-        // TextureSamplers. Instantiation failure in the TextureSampler is difficult to
-        // recover from.
-        if (!proxy->instantiate(resourceProvider)) {
-            return nullptr;
-        }
-
         return sk_sp<GrFragmentProcessor>(
-            new GrSimpleTextureEffect(resourceProvider, std::move(proxy),
+            new GrSimpleTextureEffect(std::move(proxy),
                                       std::move(colorSpaceXform), matrix,
                                       GrSamplerParams::kNone_FilterMode));
     }
 
     /* clamp mode */
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
                                            sk_sp<GrColorSpaceXform> colorSpaceXform,
                                            const SkMatrix& matrix,
                                            GrSamplerParams::FilterMode filterMode) {
-        // MDB TODO: remove this instantiation once instantiation is pushed past the
-        // TextureSamplers. Instantiation failure in the TextureSampler is difficult to
-        // recover from.
-        if (!proxy->instantiate(resourceProvider)) {
-            return nullptr;
-        }
-
         return sk_sp<GrFragmentProcessor>(
-            new GrSimpleTextureEffect(resourceProvider, std::move(proxy),
+            new GrSimpleTextureEffect(std::move(proxy),
                                       std::move(colorSpaceXform),
                                       matrix, filterMode));
     }
 
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> proxy,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy> proxy,
                                            sk_sp<GrColorSpaceXform> colorSpaceXform,
                                            const SkMatrix& matrix,
                                            const GrSamplerParams& p) {
-        // MDB TODO: remove this instantiation once instantiation is pushed past the
-        // TextureSamplers. Instantiation failure in the TextureSampler is difficult to
-        // recover from.
-        if (!proxy->instantiate(resourceProvider)) {
-            return nullptr;
-        }
-
-        return sk_sp<GrFragmentProcessor>(new GrSimpleTextureEffect(resourceProvider,
-                                                                    std::move(proxy),
+        return sk_sp<GrFragmentProcessor>(new GrSimpleTextureEffect(std::move(proxy),
                                                                     std::move(colorSpaceXform),
                                                                     matrix, p));
     }
@@ -80,11 +55,11 @@
     const char* name() const override { return "SimpleTexture"; }
 
 private:
-    GrSimpleTextureEffect(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    GrSimpleTextureEffect(sk_sp<GrTextureProxy>,
                           sk_sp<GrColorSpaceXform>, const SkMatrix& matrix,
                           GrSamplerParams::FilterMode);
 
-    GrSimpleTextureEffect(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    GrSimpleTextureEffect(sk_sp<GrTextureProxy>,
                           sk_sp<GrColorSpaceXform>, const SkMatrix& matrix,
                           const GrSamplerParams&);
 
diff --git a/src/gpu/effects/GrSingleTextureEffect.cpp b/src/gpu/effects/GrSingleTextureEffect.cpp
index f5d7000..9dbf32d 100644
--- a/src/gpu/effects/GrSingleTextureEffect.cpp
+++ b/src/gpu/effects/GrSingleTextureEffect.cpp
@@ -9,41 +9,38 @@
 
 #include "GrTextureProxy.h"
 
-GrSingleTextureEffect::GrSingleTextureEffect(GrResourceProvider* resourceProvider,
-                                             OptimizationFlags optFlags,
+GrSingleTextureEffect::GrSingleTextureEffect(OptimizationFlags optFlags,
                                              sk_sp<GrTextureProxy> proxy,
                                              sk_sp<GrColorSpaceXform> colorSpaceXform,
                                              const SkMatrix& m)
         : INHERITED(optFlags)
-        , fCoordTransform(resourceProvider, m, proxy.get())
-        , fTextureSampler(resourceProvider, std::move(proxy))
+        , fCoordTransform(m, proxy.get())
+        , fTextureSampler(std::move(proxy))
         , fColorSpaceXform(std::move(colorSpaceXform)) {
     this->addCoordTransform(&fCoordTransform);
     this->addTextureSampler(&fTextureSampler);
 }
 
-GrSingleTextureEffect::GrSingleTextureEffect(GrResourceProvider* resourceProvider,
-                                             OptimizationFlags optFlags,
+GrSingleTextureEffect::GrSingleTextureEffect(OptimizationFlags optFlags,
                                              sk_sp<GrTextureProxy> proxy,
                                              sk_sp<GrColorSpaceXform> colorSpaceXform,
                                              const SkMatrix& m,
                                              GrSamplerParams::FilterMode filterMode)
         : INHERITED(optFlags)
-        , fCoordTransform(resourceProvider, m, proxy.get())
-        , fTextureSampler(resourceProvider, std::move(proxy), filterMode)
+        , fCoordTransform(m, proxy.get())
+        , fTextureSampler(std::move(proxy), filterMode)
         , fColorSpaceXform(std::move(colorSpaceXform)) {
     this->addCoordTransform(&fCoordTransform);
     this->addTextureSampler(&fTextureSampler);
 }
 
-GrSingleTextureEffect::GrSingleTextureEffect(GrResourceProvider* resourceProvider,
-                                             OptimizationFlags optFlags,
+GrSingleTextureEffect::GrSingleTextureEffect(OptimizationFlags optFlags,
                                              sk_sp<GrTextureProxy> proxy,
                                              sk_sp<GrColorSpaceXform> colorSpaceXform,
                                              const SkMatrix& m, const GrSamplerParams& params)
         : INHERITED(optFlags)
-        , fCoordTransform(resourceProvider, m, proxy.get())
-        , fTextureSampler(resourceProvider, std::move(proxy), params)
+        , fCoordTransform(m, proxy.get())
+        , fTextureSampler(std::move(proxy), params)
         , fColorSpaceXform(std::move(colorSpaceXform)) {
     this->addCoordTransform(&fCoordTransform);
     this->addTextureSampler(&fTextureSampler);
diff --git a/src/gpu/effects/GrSingleTextureEffect.h b/src/gpu/effects/GrSingleTextureEffect.h
index 5c7c0bd..eab29c6 100644
--- a/src/gpu/effects/GrSingleTextureEffect.h
+++ b/src/gpu/effects/GrSingleTextureEffect.h
@@ -11,9 +11,9 @@
 #include "GrFragmentProcessor.h"
 #include "GrColorSpaceXform.h"
 #include "GrCoordTransform.h"
-#include "SkMatrix.h"
 
 class GrTextureProxy;
+class SkMatrix;
 
 /**
  * A base class for effects that draw a single texture with a texture matrix. This effect has no
@@ -31,13 +31,13 @@
 
 protected:
     /** unfiltered, clamp mode */
-    GrSingleTextureEffect(GrResourceProvider*, OptimizationFlags, sk_sp<GrTextureProxy>,
+    GrSingleTextureEffect(OptimizationFlags, sk_sp<GrTextureProxy>,
                           sk_sp<GrColorSpaceXform>, const SkMatrix&);
     /** clamp mode */
-    GrSingleTextureEffect(GrResourceProvider*, OptimizationFlags, sk_sp<GrTextureProxy>,
+    GrSingleTextureEffect(OptimizationFlags, sk_sp<GrTextureProxy>,
                           sk_sp<GrColorSpaceXform>, const SkMatrix&,
                           GrSamplerParams::FilterMode filterMode);
-    GrSingleTextureEffect(GrResourceProvider*, OptimizationFlags, sk_sp<GrTextureProxy>,
+    GrSingleTextureEffect(OptimizationFlags, sk_sp<GrTextureProxy>,
                           sk_sp<GrColorSpaceXform>, const SkMatrix&, const GrSamplerParams&);
 
     /**
@@ -56,8 +56,8 @@
     }
 
 private:
-    GrCoordTransform fCoordTransform;
-    TextureSampler fTextureSampler;
+    GrCoordTransform         fCoordTransform;
+    TextureSampler           fTextureSampler;
     sk_sp<GrColorSpaceXform> fColorSpaceXform;
 
     typedef GrFragmentProcessor INHERITED;
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 3269f41..dce16a8 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -243,8 +243,7 @@
     }
 }
 
-sk_sp<GrFragmentProcessor> GrTextureDomainEffect::Make(GrResourceProvider* resourceProvider,
-                                                       sk_sp<GrTextureProxy> proxy,
+sk_sp<GrFragmentProcessor> GrTextureDomainEffect::Make(sk_sp<GrTextureProxy> proxy,
                                                        sk_sp<GrColorSpaceXform> colorSpaceXform,
                                                        const SkMatrix& matrix,
                                                        const SkRect& domain,
@@ -252,24 +251,23 @@
                                                        GrSamplerParams::FilterMode filterMode) {
     if (GrTextureDomain::kIgnore_Mode == mode ||
         (GrTextureDomain::kClamp_Mode == mode && can_ignore_rect(proxy.get(), domain))) {
-        return GrSimpleTextureEffect::Make(resourceProvider, std::move(proxy),
+        return GrSimpleTextureEffect::Make(std::move(proxy),
                                            std::move(colorSpaceXform), matrix, filterMode);
     } else {
         return sk_sp<GrFragmentProcessor>(
-            new GrTextureDomainEffect(resourceProvider, std::move(proxy),
+            new GrTextureDomainEffect(std::move(proxy),
                                       std::move(colorSpaceXform),
                                       matrix, domain, mode, filterMode));
     }
 }
 
-GrTextureDomainEffect::GrTextureDomainEffect(GrResourceProvider* resourceProvider,
-                                             sk_sp<GrTextureProxy> proxy,
+GrTextureDomainEffect::GrTextureDomainEffect(sk_sp<GrTextureProxy> proxy,
                                              sk_sp<GrColorSpaceXform> colorSpaceXform,
                                              const SkMatrix& matrix,
                                              const SkRect& domain,
                                              GrTextureDomain::Mode mode,
                                              GrSamplerParams::FilterMode filterMode)
-    : GrSingleTextureEffect(resourceProvider, OptFlags(proxy->config(), mode), proxy,
+    : GrSingleTextureEffect(OptFlags(proxy->config(), mode), proxy,
                             std::move(colorSpaceXform), matrix, filterMode)
     , fTextureDomain(proxy.get(), domain, mode) {
     SkASSERT(mode != GrTextureDomain::kRepeat_Mode ||
@@ -350,8 +348,7 @@
     const SkMatrix& matrix = GrTest::TestMatrix(d->fRandom);
     bool bilerp = mode != GrTextureDomain::kRepeat_Mode ? d->fRandom->nextBool() : false;
     sk_sp<GrColorSpaceXform> colorSpaceXform = GrTest::TestColorXform(d->fRandom);
-    return GrTextureDomainEffect::Make(d->resourceProvider(),
-                                       std::move(proxy),
+    return GrTextureDomainEffect::Make(std::move(proxy),
                                        std::move(colorSpaceXform),
                                        matrix,
                                        domain,
@@ -363,21 +360,19 @@
 
 ///////////////////////////////////////////////////////////////////////////////
 sk_sp<GrFragmentProcessor> GrDeviceSpaceTextureDecalFragmentProcessor::Make(
-        GrResourceProvider* resourceProvider,
         sk_sp<GrTextureProxy> proxy,
         const SkIRect& subset,
         const SkIPoint& deviceSpaceOffset) {
     return sk_sp<GrFragmentProcessor>(new GrDeviceSpaceTextureDecalFragmentProcessor(
-            resourceProvider, std::move(proxy), subset, deviceSpaceOffset));
+            std::move(proxy), subset, deviceSpaceOffset));
 }
 
 GrDeviceSpaceTextureDecalFragmentProcessor::GrDeviceSpaceTextureDecalFragmentProcessor(
-        GrResourceProvider* resourceProvider,
-        sk_sp<GrTextureProxy> proxy,
-        const SkIRect& subset,
-        const SkIPoint& deviceSpaceOffset)
+                    sk_sp<GrTextureProxy> proxy,
+                    const SkIRect& subset,
+                    const SkIPoint& deviceSpaceOffset)
         : INHERITED(kCompatibleWithCoverageAsAlpha_OptimizationFlag)
-        , fTextureSampler(resourceProvider, proxy, GrSamplerParams::ClampNoFilter())
+        , fTextureSampler(proxy, GrSamplerParams::ClampNoFilter())
         , fTextureDomain(proxy.get(), GrTextureDomain::MakeTexelDomain(subset),
                          GrTextureDomain::kDecal_Mode) {
     this->addTextureSampler(&fTextureSampler);
@@ -465,7 +460,6 @@
     SkIPoint pt;
     pt.fX = d->fRandom->nextULessThan(2048);
     pt.fY = d->fRandom->nextULessThan(2048);
-    return GrDeviceSpaceTextureDecalFragmentProcessor::Make(d->resourceProvider(),
-                                                            std::move(proxy), subset, pt);
+    return GrDeviceSpaceTextureDecalFragmentProcessor::Make(std::move(proxy), subset, pt);
 }
 #endif
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h
index d8cd695..afd4d5f 100644
--- a/src/gpu/effects/GrTextureDomain.h
+++ b/src/gpu/effects/GrTextureDomain.h
@@ -153,8 +153,7 @@
 class GrTextureDomainEffect : public GrSingleTextureEffect {
 
 public:
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider*,
-                                           sk_sp<GrTextureProxy>,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>,
                                            sk_sp<GrColorSpaceXform>,
                                            const SkMatrix&,
                                            const SkRect& domain,
@@ -175,8 +174,7 @@
 private:
     GrTextureDomain fTextureDomain;
 
-    GrTextureDomainEffect(GrResourceProvider*,
-                          sk_sp<GrTextureProxy>,
+    GrTextureDomainEffect(sk_sp<GrTextureProxy>,
                           sk_sp<GrColorSpaceXform>,
                           const SkMatrix&,
                           const SkRect& domain,
@@ -198,7 +196,7 @@
 
 class GrDeviceSpaceTextureDecalFragmentProcessor : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    static sk_sp<GrFragmentProcessor> Make(sk_sp<GrTextureProxy>,
                                            const SkIRect& subset,
                                            const SkIPoint& deviceSpaceOffset);
 
@@ -219,7 +217,7 @@
     GrTextureDomain fTextureDomain;
     SkIPoint fDeviceSpaceOffset;
 
-    GrDeviceSpaceTextureDecalFragmentProcessor(GrResourceProvider*, sk_sp<GrTextureProxy>,
+    GrDeviceSpaceTextureDecalFragmentProcessor(sk_sp<GrTextureProxy>,
                                                const SkIRect&, const SkIPoint&);
 
     GrGLSLFragmentProcessor* onCreateGLSLInstance() const override;
diff --git a/src/gpu/effects/GrYUVEffect.cpp b/src/gpu/effects/GrYUVEffect.cpp
index be4d6c2..feb2670 100644
--- a/src/gpu/effects/GrYUVEffect.cpp
+++ b/src/gpu/effects/GrYUVEffect.cpp
@@ -62,8 +62,7 @@
 
 class YUVtoRGBEffect : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           sk_sp<GrTextureProxy> yProxy,
+    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) {
@@ -87,7 +86,7 @@
             GrSamplerParams::kBilerp_FilterMode :
             GrSamplerParams::kNone_FilterMode;
         return sk_sp<GrFragmentProcessor>(new YUVtoRGBEffect(
-            resourceProvider, std::move(yProxy), std::move(uProxy), std::move(vProxy),
+            std::move(yProxy), std::move(uProxy), std::move(vProxy),
             yuvMatrix, uvFilterMode, colorSpace, nv12));
     }
 
@@ -153,16 +152,15 @@
     };
 
 private:
-    YUVtoRGBEffect(GrResourceProvider* resourceProvider,
-                   sk_sp<GrTextureProxy> yProxy, sk_sp<GrTextureProxy> uProxy,
+    YUVtoRGBEffect(sk_sp<GrTextureProxy> yProxy, sk_sp<GrTextureProxy> uProxy,
                    sk_sp<GrTextureProxy> vProxy, const SkMatrix yuvMatrix[3],
                    GrSamplerParams::FilterMode uvFilterMode, SkYUVColorSpace colorSpace, bool nv12)
             : INHERITED(kPreservesOpaqueInput_OptimizationFlag)
-            , fYTransform(resourceProvider, yuvMatrix[0], yProxy.get())
-            , fYSampler(resourceProvider, std::move(yProxy))
-            , fUTransform(resourceProvider, yuvMatrix[1], uProxy.get())
-            , fUSampler(resourceProvider, std::move(uProxy), uvFilterMode)
-            , fVSampler(resourceProvider, vProxy, uvFilterMode)
+            , fYTransform(yuvMatrix[0], yProxy.get())
+            , fYSampler(std::move(yProxy))
+            , fUTransform(yuvMatrix[1], uProxy.get())
+            , fUSampler(std::move(uProxy), uvFilterMode)
+            , fVSampler(vProxy, uvFilterMode)
             , fColorSpace(colorSpace)
             , fNV12(nv12) {
         this->initClassID<YUVtoRGBEffect>();
@@ -171,7 +169,7 @@
         this->addCoordTransform(&fUTransform);
         this->addTextureSampler(&fUSampler);
         if (!fNV12) {
-            fVTransform = GrCoordTransform(resourceProvider, yuvMatrix[2], vProxy.get());
+            fVTransform = GrCoordTransform(yuvMatrix[2], vProxy.get());
             this->addCoordTransform(&fVTransform);
             this->addTextureSampler(&fVSampler);
         }
@@ -360,15 +358,13 @@
 
 //////////////////////////////////////////////////////////////////////////////
 
-sk_sp<GrFragmentProcessor> GrYUVEffect::MakeYUVToRGB(GrResourceProvider* resourceProvider,
-                                                     sk_sp<GrTextureProxy> yProxy,
+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) {
     SkASSERT(yProxy && uProxy && vProxy && sizes);
-    return YUVtoRGBEffect::Make(resourceProvider,
-                                std::move(yProxy), std::move(uProxy), std::move(vProxy),
+    return YUVtoRGBEffect::Make(std::move(yProxy), std::move(uProxy), std::move(vProxy),
                                 sizes, colorSpace, nv12);
 }
 
diff --git a/src/gpu/effects/GrYUVEffect.h b/src/gpu/effects/GrYUVEffect.h
index 7b05f90..ae62a16 100644
--- a/src/gpu/effects/GrYUVEffect.h
+++ b/src/gpu/effects/GrYUVEffect.h
@@ -10,7 +10,6 @@
 
 #include "SkImageInfo.h"
 
-class GrResourceProvider;
 class GrFragmentProcessor;
 class GrTextureProxy;
 
@@ -19,8 +18,7 @@
      * Creates an effect that performs color conversion from YUV to RGB. The input textures are
      * assumed to be kA8_GrPixelConfig.
      */
-    sk_sp<GrFragmentProcessor> MakeYUVToRGB(GrResourceProvider* resourceProvider,
-                                            sk_sp<GrTextureProxy> yProxy,
+    sk_sp<GrFragmentProcessor> MakeYUVToRGB(sk_sp<GrTextureProxy> yProxy,
                                             sk_sp<GrTextureProxy> uProxy,
                                             sk_sp<GrTextureProxy> vProxy, const SkISize sizes[3],
                                             SkYUVColorSpace colorSpace, bool nv12);
diff --git a/src/gpu/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index c93ff41..b8497bd 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -7,7 +7,6 @@
 
 #include "GrGLTexture.h"
 #include "GrGLGpu.h"
-#include "GrResourceProvider.h"
 #include "GrSemaphore.h"
 #include "GrShaderCaps.h"
 #include "SkTraceMemoryDump.h"
diff --git a/src/gpu/instanced/InstanceProcessor.cpp b/src/gpu/instanced/InstanceProcessor.cpp
index dd36705..500986e 100644
--- a/src/gpu/instanced/InstanceProcessor.cpp
+++ b/src/gpu/instanced/InstanceProcessor.cpp
@@ -10,7 +10,6 @@
 #include "GrContext.h"
 #include "GrRenderTargetPriv.h"
 #include "GrResourceCache.h"
-#include "GrResourceProvider.h"
 #include "GrShaderCaps.h"
 #include "glsl/GrGLSLGeometryProcessor.h"
 #include "glsl/GrGLSLFragmentShaderBuilder.h"
diff --git a/src/gpu/instanced/InstancedRendering.cpp b/src/gpu/instanced/InstancedRendering.cpp
index 6a8fc64..cb4a1de 100644
--- a/src/gpu/instanced/InstancedRendering.cpp
+++ b/src/gpu/instanced/InstancedRendering.cpp
@@ -24,6 +24,9 @@
     SkDEBUGCODE(, fState(State::kRecordingDraws)) {
 }
 
+InstancedRendering::~InstancedRendering() {
+    SkASSERT(State::kRecordingDraws == fState);
+}
 
 void InstancedRendering::beginFlush(GrResourceProvider* rp) {
 #ifdef SK_DEBUG
diff --git a/src/gpu/instanced/InstancedRendering.h b/src/gpu/instanced/InstancedRendering.h
index d0df132..e349f63 100644
--- a/src/gpu/instanced/InstancedRendering.h
+++ b/src/gpu/instanced/InstancedRendering.h
@@ -46,7 +46,7 @@
  */
 class InstancedRendering : public SkNoncopyable {
 public:
-    virtual ~InstancedRendering() { SkASSERT(State::kRecordingDraws == fState); }
+    virtual ~InstancedRendering();
 
     GrGpu* gpu() const { return fGpu.get(); }
 
diff --git a/src/gpu/ops/GrAnalyticRectOp.cpp b/src/gpu/ops/GrAnalyticRectOp.cpp
index f62f0c6..90726c6 100644
--- a/src/gpu/ops/GrAnalyticRectOp.cpp
+++ b/src/gpu/ops/GrAnalyticRectOp.cpp
@@ -11,7 +11,6 @@
 #include "GrGeometryProcessor.h"
 #include "GrOpFlushState.h"
 #include "GrProcessor.h"
-#include "GrResourceProvider.h"
 #include "SkRRect.h"
 #include "SkStrokeRec.h"
 #include "glsl/GrGLSLFragmentShaderBuilder.h"
diff --git a/src/gpu/ops/GrAtlasTextOp.cpp b/src/gpu/ops/GrAtlasTextOp.cpp
index c854a8b..20a5b4f 100644
--- a/src/gpu/ops/GrAtlasTextOp.cpp
+++ b/src/gpu/ops/GrAtlasTextOp.cpp
@@ -88,13 +88,11 @@
     FlushInfo flushInfo;
     if (this->usesDistanceFields()) {
         flushInfo.fGeometryProcessor =
-                this->setupDfProcessor(fFontCache->context()->resourceProvider(),
-                                       this->viewMatrix(),
+                this->setupDfProcessor(this->viewMatrix(),
                                        fLuminanceColor, this->color(), std::move(proxy));
     } else {
         GrSamplerParams params(SkShader::kClamp_TileMode, GrSamplerParams::kNone_FilterMode);
         flushInfo.fGeometryProcessor = GrBitmapTextGeoProc::Make(
-                fFontCache->context()->resourceProvider(),
                 this->color(), std::move(proxy), params,
                 maskFormat, localMatrix, this->usesLocalCoords());
     }
@@ -213,8 +211,7 @@
 
 // TODO just use class params
 // TODO trying to figure out why lcd is so whack
-sk_sp<GrGeometryProcessor> GrAtlasTextOp::setupDfProcessor(GrResourceProvider* resourceProvider,
-                                                           const SkMatrix& viewMatrix,
+sk_sp<GrGeometryProcessor> GrAtlasTextOp::setupDfProcessor(const SkMatrix& viewMatrix,
                                                            SkColor luminanceColor,
                                                            GrColor color,
                                                            sk_sp<GrTextureProxy> proxy) const {
@@ -243,8 +240,7 @@
                 GrDistanceFieldLCDTextGeoProc::DistanceAdjust::Make(
                         redCorrection, greenCorrection, blueCorrection);
 
-        return GrDistanceFieldLCDTextGeoProc::Make(resourceProvider,
-                                                   color, viewMatrix, std::move(proxy),
+        return GrDistanceFieldLCDTextGeoProc::Make(color, viewMatrix, std::move(proxy),
                                                    params, widthAdjust, flags,
                                                    this->usesLocalCoords());
     } else {
@@ -252,12 +248,12 @@
         U8CPU lum = SkColorSpaceLuminance::computeLuminance(SK_GAMMA_EXPONENT, luminanceColor);
         float correction = fDistanceAdjustTable->getAdjustment(lum >> kDistanceAdjustLumShift,
                                                                fUseGammaCorrectDistanceTable);
-        return GrDistanceFieldA8TextGeoProc::Make(resourceProvider, color,
+        return GrDistanceFieldA8TextGeoProc::Make(color,
                                                   viewMatrix, std::move(proxy),
                                                   params, correction, flags,
                                                   this->usesLocalCoords());
 #else
-        return GrDistanceFieldA8TextGeoProc::Make(resourceProvider, color,
+        return GrDistanceFieldA8TextGeoProc::Make(color,
                                                   viewMatrix, std::move(proxy),
                                                   params, flags, this->usesLocalCoords());
 #endif
diff --git a/src/gpu/ops/GrAtlasTextOp.h b/src/gpu/ops/GrAtlasTextOp.h
index e0a4ed0..fcb3db1 100644
--- a/src/gpu/ops/GrAtlasTextOp.h
+++ b/src/gpu/ops/GrAtlasTextOp.h
@@ -148,8 +148,7 @@
     bool onCombineIfPossible(GrOp* t, const GrCaps& caps) override;
 
     // TODO just use class params
-    sk_sp<GrGeometryProcessor> setupDfProcessor(GrResourceProvider*,
-                                                const SkMatrix& viewMatrix, SkColor luminanceColor,
+    sk_sp<GrGeometryProcessor> setupDfProcessor(const SkMatrix& viewMatrix, SkColor luminanceColor,
                                                 GrColor color, sk_sp<GrTextureProxy> proxy) const;
 
     GrColor fColor;
diff --git a/src/gpu/ops/GrClearOp.cpp b/src/gpu/ops/GrClearOp.cpp
new file mode 100644
index 0000000..e40862b
--- /dev/null
+++ b/src/gpu/ops/GrClearOp.cpp
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2017 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */

+

+#include "GrClearOp.h"

+

+#include "GrGpuCommandBuffer.h"

+#include "GrOpFlushState.h"

+#include "GrResourceProvider.h"
+

+GrClearOp::GrClearOp(const GrFixedClip& clip, GrColor color, GrSurfaceProxy* proxy)
+        : INHERITED(ClassID())
+        , fClip(clip)
+        , fColor(color) {
+    const SkIRect rtRect = SkIRect::MakeWH(proxy->width(), proxy->height());
+    if (fClip.scissorEnabled()) {
+        // Don't let scissors extend outside the RT. This may improve op combining.
+        if (!fClip.intersect(rtRect)) {
+            SkASSERT(0);  // should be caught upstream
+            fClip = GrFixedClip(SkIRect::MakeEmpty());
+        }
+
+        if (GrResourceProvider::IsFunctionallyExact(proxy) && fClip.scissorRect() == rtRect) {
+            fClip.disableScissor();
+        }
+    }
+    this->setBounds(SkRect::Make(fClip.scissorEnabled() ? fClip.scissorRect() : rtRect),
+                    HasAABloat::kNo, IsZeroArea::kNo);
+}
+
+void GrClearOp::onExecute(GrOpFlushState* state) {
+    SkASSERT(state->drawOpArgs().fRenderTarget);
+
+    state->commandBuffer()->clear(state->drawOpArgs().fRenderTarget, fClip, fColor);
+}
diff --git a/src/gpu/ops/GrClearOp.h b/src/gpu/ops/GrClearOp.h
index 6d0cf28..56ecb13 100644
--- a/src/gpu/ops/GrClearOp.h
+++ b/src/gpu/ops/GrClearOp.h
@@ -9,10 +9,9 @@
 #define GrClearOp_DEFINED
 
 #include "GrFixedClip.h"
-#include "GrGpuCommandBuffer.h"
 #include "GrOp.h"
-#include "GrOpFlushState.h"
-#include "GrResourceProvider.h"
+
+class GrOpFlushState;
 
 class GrClearOp final : public GrOp {
 public:
@@ -55,26 +54,7 @@
     void setColor(GrColor color) { fColor = color; }
 
 private:
-    GrClearOp(const GrFixedClip& clip, GrColor color, GrSurfaceProxy* proxy)
-        : INHERITED(ClassID())
-        , fClip(clip)
-        , fColor(color) {
-
-        const SkIRect rtRect = SkIRect::MakeWH(proxy->width(), proxy->height());
-        if (fClip.scissorEnabled()) {
-            // Don't let scissors extend outside the RT. This may improve op combining.
-            if (!fClip.intersect(rtRect)) {
-                SkASSERT(0);  // should be caught upstream
-                fClip = GrFixedClip(SkIRect::MakeEmpty());
-            }
-
-            if (GrResourceProvider::IsFunctionallyExact(proxy) && fClip.scissorRect() == rtRect) {
-                fClip.disableScissor();
-            }
-        }
-        this->setBounds(SkRect::Make(fClip.scissorEnabled() ? fClip.scissorRect() : rtRect),
-                        HasAABloat::kNo, IsZeroArea::kNo);
-    }
+    GrClearOp(const GrFixedClip& clip, GrColor color, GrSurfaceProxy* proxy);
 
     GrClearOp(const SkIRect& rect, GrColor color, bool fullScreen)
         : INHERITED(ClassID())
@@ -115,11 +95,7 @@
 
     void onPrepare(GrOpFlushState*) override {}
 
-    void onExecute(GrOpFlushState* state) override {
-        SkASSERT(state->drawOpArgs().fRenderTarget);
-
-        state->commandBuffer()->clear(state->drawOpArgs().fRenderTarget, fClip, fColor);
-    }
+    void onExecute(GrOpFlushState* state) override;
 
     GrFixedClip fClip;
     GrColor     fColor;
diff --git a/src/gpu/ops/GrShadowRRectOp.cpp b/src/gpu/ops/GrShadowRRectOp.cpp
index 13cfc4d..a8e459a 100644
--- a/src/gpu/ops/GrShadowRRectOp.cpp
+++ b/src/gpu/ops/GrShadowRRectOp.cpp
@@ -9,7 +9,6 @@
 
 #include "GrDrawOpTest.h"
 #include "GrOpFlushState.h"
-#include "GrResourceProvider.h"
 #include "GrStyle.h"
 
 #include "effects/GrShadowGeoProc.h"
diff --git a/src/gpu/ops/GrSmallPathRenderer.cpp b/src/gpu/ops/GrSmallPathRenderer.cpp
index f3c43f2..57d8ef6 100644
--- a/src/gpu/ops/GrSmallPathRenderer.cpp
+++ b/src/gpu/ops/GrSmallPathRenderer.cpp
@@ -233,7 +233,6 @@
             flags |= fGammaCorrect ? kGammaCorrect_DistanceFieldEffectFlag : 0;
 
             flushInfo.fGeometryProcessor = GrDistanceFieldPathGeoProc::Make(
-                atlas->context()->resourceProvider(),
                 this->color(), this->viewMatrix(), atlas->getProxy(), params, flags,
                 this->usesLocalCoords());
         } else {
@@ -251,7 +250,6 @@
             }
 
             flushInfo.fGeometryProcessor = GrBitmapTextGeoProc::Make(
-                atlas->context()->resourceProvider(),
                 this->color(), atlas->getProxy(), params, kA8_GrMaskFormat, invert,
                 this->usesLocalCoords());
         }
diff --git a/src/gpu/text/GrAtlasGlyphCache.cpp b/src/gpu/text/GrAtlasGlyphCache.cpp
index 39c3e10..1487d28 100644
--- a/src/gpu/text/GrAtlasGlyphCache.cpp
+++ b/src/gpu/text/GrAtlasGlyphCache.cpp
@@ -9,7 +9,6 @@
 #include "GrContext.h"
 #include "GrGpu.h"
 #include "GrRectanizer.h"
-#include "GrResourceProvider.h"
 #include "GrSurfacePriv.h"
 #include "SkAutoMalloc.h"
 #include "SkString.h"
diff --git a/src/gpu/vk/GrVkPipelineState.cpp b/src/gpu/vk/GrVkPipelineState.cpp
index eb4a516..e4f6faf 100644
--- a/src/gpu/vk/GrVkPipelineState.cpp
+++ b/src/gpu/vk/GrVkPipelineState.cpp
@@ -267,7 +267,7 @@
 
     GrResourceIOProcessor::TextureSampler dstTextureSampler;
     if (GrTextureProxy* dstTextureProxy = pipeline.dstTextureProxy()) {
-        dstTextureSampler.reset(gpu->getContext()->resourceProvider(), sk_ref_sp(dstTextureProxy));
+        dstTextureSampler.reset(sk_ref_sp(dstTextureProxy));
         SkAssertResult(dstTextureSampler.instantiate(gpu->getContext()->resourceProvider()));
         textureBindings.push_back(&dstTextureSampler);
     }
diff --git a/src/image/SkImage_Gpu.cpp b/src/image/SkImage_Gpu.cpp
index f9441e0..41990e8 100644
--- a/src/image/SkImage_Gpu.cpp
+++ b/src/image/SkImage_Gpu.cpp
@@ -401,10 +401,8 @@
 
     GrPaint paint;
     paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
-    paint.addColorFragmentProcessor(
-        GrYUVEffect::MakeYUVToRGB(ctx->resourceProvider(),
-                                  yProxy, uProxy, vProxy,
-                                  yuvSizes, colorSpace, nv12));
+    paint.addColorFragmentProcessor(GrYUVEffect::MakeYUVToRGB(yProxy, uProxy, vProxy,
+                                                              yuvSizes, colorSpace, nv12));
 
     const SkRect rect = SkRect::MakeIWH(width, height);
 
@@ -975,7 +973,7 @@
 
     GrPaint paint;
     paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
-    paint.addColorTextureProcessor(fContext->resourceProvider(), fProxy, nullptr, SkMatrix::I());
+    paint.addColorTextureProcessor(fProxy, nullptr, SkMatrix::I());
     paint.addColorFragmentProcessor(std::move(xform));
 
     const SkRect rect = SkRect::MakeIWH(this->width(), this->height());
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index 4cac474..d558887 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -10,7 +10,6 @@
 #include "GrBackendSurface.h"
 #include "GrContextPriv.h"
 #include "GrRenderTargetContextPriv.h"
-#include "GrResourceProvider.h"
 #include "GrTexture.h"
 
 #include "SkCanvas.h"
diff --git a/src/shaders/SkImageShader.cpp b/src/shaders/SkImageShader.cpp
index bdbd382..808b856 100644
--- a/src/shaders/SkImageShader.cpp
+++ b/src/shaders/SkImageShader.cpp
@@ -171,10 +171,10 @@
                                                                        args.fDstColorSpace);
     sk_sp<GrFragmentProcessor> inner;
     if (doBicubic) {
-        inner = GrBicubicEffect::Make(args.fContext->resourceProvider(), std::move(proxy),
+        inner = GrBicubicEffect::Make(std::move(proxy),
                                       std::move(colorSpaceXform), lmInverse, tm);
     } else {
-        inner = GrSimpleTextureEffect::Make(args.fContext->resourceProvider(), std::move(proxy),
+        inner = GrSimpleTextureEffect::Make(std::move(proxy),
                                             std::move(colorSpaceXform), lmInverse, params);
     }
 
diff --git a/src/shaders/SkPerlinNoiseShader.cpp b/src/shaders/SkPerlinNoiseShader.cpp
index ddcd295..54d8483 100644
--- a/src/shaders/SkPerlinNoiseShader.cpp
+++ b/src/shaders/SkPerlinNoiseShader.cpp
@@ -677,15 +677,14 @@
 
 class GrPerlinNoise2Effect : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           SkPerlinNoiseShaderImpl::Type type,
+    static sk_sp<GrFragmentProcessor> Make(SkPerlinNoiseShaderImpl::Type type,
                                            int numOctaves, bool stitchTiles,
                                            std::unique_ptr<SkPerlinNoiseShaderImpl::PaintingData> paintingData,
                                            sk_sp<GrTextureProxy> permutationsProxy,
                                            sk_sp<GrTextureProxy> noiseProxy,
                                            const SkMatrix& matrix) {
         return sk_sp<GrFragmentProcessor>(
-            new GrPerlinNoise2Effect(resourceProvider, type, numOctaves, stitchTiles,
+            new GrPerlinNoise2Effect(type, numOctaves, stitchTiles,
                                      std::move(paintingData),
                                      std::move(permutationsProxy), std::move(noiseProxy), matrix));
     }
@@ -719,8 +718,7 @@
                fPaintingData->fStitchDataInit == s.fPaintingData->fStitchDataInit;
     }
 
-    GrPerlinNoise2Effect(GrResourceProvider* resourceProvider,
-                         SkPerlinNoiseShaderImpl::Type type, int numOctaves, bool stitchTiles,
+    GrPerlinNoise2Effect(SkPerlinNoiseShaderImpl::Type type, int numOctaves, bool stitchTiles,
                          std::unique_ptr<SkPerlinNoiseShaderImpl::PaintingData> paintingData,
                          sk_sp<GrTextureProxy> permutationsProxy,
                          sk_sp<GrTextureProxy> noiseProxy,
@@ -729,8 +727,8 @@
             , fType(type)
             , fNumOctaves(numOctaves)
             , fStitchTiles(stitchTiles)
-            , fPermutationsSampler(resourceProvider, std::move(permutationsProxy))
-            , fNoiseSampler(resourceProvider, std::move(noiseProxy))
+            , fPermutationsSampler(std::move(permutationsProxy))
+            , fNoiseSampler(std::move(noiseProxy))
             , fPaintingData(std::move(paintingData)) {
         this->initClassID<GrPerlinNoise2Effect>();
         this->addTextureSampler(&fPermutationsSampler);
@@ -741,7 +739,7 @@
 
     GR_DECLARE_FRAGMENT_PROCESSOR_TEST;
 
-    SkPerlinNoiseShaderImpl::Type           fType;
+    SkPerlinNoiseShaderImpl::Type       fType;
     GrCoordTransform                    fCoordTransform;
     int                                 fNumOctaves;
     bool                                fStitchTiles;
@@ -1096,14 +1094,13 @@
 
 class GrImprovedPerlinNoiseEffect : public GrFragmentProcessor {
 public:
-    static sk_sp<GrFragmentProcessor> Make(GrResourceProvider* resourceProvider,
-                                           int octaves, SkScalar z,
+    static sk_sp<GrFragmentProcessor> Make(int octaves, SkScalar z,
                                            std::unique_ptr<SkPerlinNoiseShaderImpl::PaintingData> paintingData,
                                            sk_sp<GrTextureProxy> permutationsProxy,
                                            sk_sp<GrTextureProxy> gradientProxy,
                                            const SkMatrix& matrix) {
         return sk_sp<GrFragmentProcessor>(
-            new GrImprovedPerlinNoiseEffect(resourceProvider, octaves, z, std::move(paintingData),
+            new GrImprovedPerlinNoiseEffect(octaves, z, std::move(paintingData),
                                             std::move(permutationsProxy),
                                             std::move(gradientProxy), matrix));
     }
@@ -1130,8 +1127,7 @@
                fPaintingData->fBaseFrequency == s.fPaintingData->fBaseFrequency;
     }
 
-    GrImprovedPerlinNoiseEffect(GrResourceProvider* resourceProvider,
-                                int octaves, SkScalar z,
+    GrImprovedPerlinNoiseEffect(int octaves, SkScalar z,
                                 std::unique_ptr<SkPerlinNoiseShaderImpl::PaintingData> paintingData,
                                 sk_sp<GrTextureProxy> permutationsProxy,
                                 sk_sp<GrTextureProxy> gradientProxy,
@@ -1139,8 +1135,8 @@
             : INHERITED(kNone_OptimizationFlags)
             , fOctaves(octaves)
             , fZ(z)
-            , fPermutationsSampler(resourceProvider, std::move(permutationsProxy))
-            , fGradientSampler(resourceProvider, std::move(gradientProxy))
+            , fPermutationsSampler(std::move(permutationsProxy))
+            , fGradientSampler(std::move(gradientProxy))
             , fPaintingData(std::move(paintingData)) {
         this->initClassID<GrImprovedPerlinNoiseEffect>();
         this->addTextureSampler(&fPermutationsSampler);
@@ -1380,8 +1376,7 @@
             GrRefCachedBitmapTextureProxy(args.fContext,
                                           paintingData->getGradientBitmap(),
                                           textureParams, nullptr));
-        return GrImprovedPerlinNoiseEffect::Make(args.fContext->resourceProvider(),
-                                                 fNumOctaves, fSeed, std::move(paintingData),
+        return GrImprovedPerlinNoiseEffect::Make(fNumOctaves, fSeed, std::move(paintingData),
                                                  std::move(permutationsTexture),
                                                  std::move(gradientTexture), m);
     }
@@ -1410,8 +1405,7 @@
 
     if (permutationsProxy && noiseProxy) {
         sk_sp<GrFragmentProcessor> inner(
-            GrPerlinNoise2Effect::Make(args.fContext->resourceProvider(),
-                                       fType,
+            GrPerlinNoise2Effect::Make(fType,
                                        fNumOctaves,
                                        fStitchTiles,
                                        std::move(paintingData),
diff --git a/src/shaders/gradients/SkGradientShader.cpp b/src/shaders/gradients/SkGradientShader.cpp
index 07860e4..9d4a250 100644
--- a/src/shaders/gradients/SkGradientShader.cpp
+++ b/src/shaders/gradients/SkGradientShader.cpp
@@ -1846,10 +1846,8 @@
             if (-1 != fRow) {
                 fYCoord = fAtlas->getYOffset(fRow)+SK_ScalarHalf*fAtlas->getNormalizedTexelHeight();
                 // This is 1/2 places where auto-normalization is disabled
-                fCoordTransform.reset(args.fContext->resourceProvider(), *args.fMatrix,
-                                      fAtlas->asTextureProxyRef().get(), false);
-                fTextureSampler.reset(args.fContext->resourceProvider(),
-                                      fAtlas->asTextureProxyRef(), params);
+                fCoordTransform.reset(*args.fMatrix, fAtlas->asTextureProxyRef().get(), false);
+                fTextureSampler.reset(fAtlas->asTextureProxyRef(), params);
             } else {
                 // In this instance we know the params are:
                 //   clampY, bilerp
@@ -1866,10 +1864,8 @@
                     return;
                 }
                 // This is 2/2 places where auto-normalization is disabled
-                fCoordTransform.reset(args.fContext->resourceProvider(), *args.fMatrix,
-                                      proxy.get(), false);
-                fTextureSampler.reset(args.fContext->resourceProvider(),
-                                      std::move(proxy), params);
+                fCoordTransform.reset(*args.fMatrix, proxy.get(), false);
+                fTextureSampler.reset(std::move(proxy), params);
                 fYCoord = SK_ScalarHalf;
             }