Remove asTextureProxyRef from SkSpecialImage.

We replace all uses of the function with asSurfaceProxyViewRef.

Bug: skia:9556
Change-Id: I23d425531d78e30fc401b04169d5dc96072cdd80
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/267181
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/effects/GrMatrixConvolutionEffect.cpp b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
index 4369bb0..e6f9e9c 100644
--- a/src/gpu/effects/GrMatrixConvolutionEffect.cpp
+++ b/src/gpu/effects/GrMatrixConvolutionEffect.cpp
@@ -143,7 +143,7 @@
     fDomain.setData(pdman, conv.domain(), view, conv.textureSampler(0).samplerState());
 }
 
-GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(sk_sp<GrSurfaceProxy> srcProxy,
+GrMatrixConvolutionEffect::GrMatrixConvolutionEffect(GrSurfaceProxyView srcView,
                                                      const SkIRect& srcBounds,
                                                      const SkISize& kernelSize,
                                                      const SkScalar* kernel,
@@ -155,10 +155,10 @@
         // To advertise either the modulation or opaqueness optimizations we'd have to examine the
         // parameters.
         : INHERITED(kGrMatrixConvolutionEffect_ClassID, kNone_OptimizationFlags)
-        , fCoordTransform(srcProxy.get())
-        , fDomain(srcProxy.get(), GrTextureDomain::MakeTexelDomain(srcBounds, tileMode),
+        , fCoordTransform(srcView.proxy())
+        , fDomain(srcView.proxy(), GrTextureDomain::MakeTexelDomain(srcBounds, tileMode),
                   tileMode, tileMode)
-        , fTextureSampler(std::move(srcProxy))
+        , fTextureSampler(std::move(srcView))
         , fKernelSize(kernelSize)
         , fGain(SkScalarToFloat(gain))
         , fBias(SkScalarToFloat(bias) / 255.0f)
@@ -308,8 +308,12 @@
 
     fill_in_2D_gaussian_kernel(kernel, kernelSize.width(), kernelSize.height(), sigmaX, sigmaY);
 
+    GrSurfaceOrigin origin = srcProxy->origin();
+    GrSwizzle swizzle = srcProxy->textureSwizzle();
+    GrSurfaceProxyView view(std::move(srcProxy), origin, swizzle);
+
     return std::unique_ptr<GrFragmentProcessor>(
-            new GrMatrixConvolutionEffect(std::move(srcProxy), srcBounds, kernelSize, kernel,
+            new GrMatrixConvolutionEffect(std::move(view), srcBounds, kernelSize, kernel,
                                           gain, bias, kernelOffset, tileMode, convolveAlpha));
 }
 
@@ -337,7 +341,12 @@
     GrTextureDomain::Mode tileMode =
             static_cast<GrTextureDomain::Mode>(d->fRandom->nextRangeU(0, 2));
     bool convolveAlpha = d->fRandom->nextBool();
-    return GrMatrixConvolutionEffect::Make(std::move(proxy),
+
+    GrSurfaceOrigin origin = proxy->origin();
+    GrSwizzle swizzle = proxy->textureSwizzle();
+    GrSurfaceProxyView view(std::move(proxy), origin, swizzle);
+
+    return GrMatrixConvolutionEffect::Make(std::move(view),
                                            bounds,
                                            kernelSize,
                                            kernel.get(),