src/gpu: s/SkAutoTUnref/sk_sp/g

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4527

Change-Id: I23f0548f98e7c355da05e143e8baa330d4bc04cc
Reviewed-on: https://skia-review.googlesource.com/4527
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index aabe8fb..13d1f3d 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -289,7 +289,7 @@
         this->flush();
     }
 
-    SkAutoTUnref<GrTexture> tempTexture;
+    sk_sp<GrTexture> tempTexture;
     if (GrGpu::kNoDraw_DrawPreference != drawPreference) {
         tempTexture.reset(
             this->textureProvider()->createApproxTexture(tempDrawInfo.fTempSurfaceDesc));
@@ -305,7 +305,7 @@
         SkMatrix textureMatrix;
         textureMatrix.setIDiv(tempTexture->width(), tempTexture->height());
         if (applyPremulToSrc) {
-            fp = this->createUPMToPMEffect(tempTexture, tempDrawInfo.fSwizzle, textureMatrix);
+            fp = this->createUPMToPMEffect(tempTexture.get(), tempDrawInfo.fSwizzle, textureMatrix);
             // If premultiplying was the only reason for the draw, fall back to a straight write.
             if (!fp) {
                 if (GrGpu::kCallerPrefersDraw_DrawPreference == drawPreference) {
@@ -317,7 +317,7 @@
         }
         if (tempTexture) {
             if (!fp) {
-                fp = GrConfigConversionEffect::Make(tempTexture, tempDrawInfo.fSwizzle,
+                fp = GrConfigConversionEffect::Make(tempTexture.get(), tempDrawInfo.fSwizzle,
                                                     GrConfigConversionEffect::kNone_PMConversion,
                                                     textureMatrix);
                 if (!fp) {
@@ -340,7 +340,7 @@
                 buffer = tmpPixels.get();
                 applyPremulToSrc = false;
             }
-            if (!fGpu->writePixels(tempTexture, 0, 0, width, height,
+            if (!fGpu->writePixels(tempTexture.get(), 0, 0, width, height,
                                    tempDrawInfo.fWriteConfig, buffer,
                                    rowBytes)) {
                 return false;
@@ -429,7 +429,7 @@
         return false;
     }
 
-    SkAutoTUnref<GrSurface> surfaceToRead(SkRef(src));
+    sk_sp<GrSurface> surfaceToRead(SkRef(src));
     bool didTempDraw = false;
     if (GrGpu::kNoDraw_DrawPreference != drawPreference) {
         if (SkBackingFit::kExact == tempDrawInfo.fTempSurfaceFit) {
@@ -491,11 +491,11 @@
     }
     GrPixelConfig configToRead = dstConfig;
     if (didTempDraw) {
-        this->flushSurfaceWrites(surfaceToRead);
+        this->flushSurfaceWrites(surfaceToRead.get());
         configToRead = tempDrawInfo.fReadConfig;
     }
-    if (!fGpu->readPixels(surfaceToRead, left, top, width, height, configToRead, buffer,
-                           rowBytes)) {
+    if (!fGpu->readPixels(surfaceToRead.get(), left, top, width, height, configToRead, buffer,
+                          rowBytes)) {
         return false;
     }