gm: s/SkAutoTUnref/sk_sp/

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

Change-Id: Ib2bea321617a17012190b33f2c7c439a5b6b3025
Reviewed-on: https://skia-review.googlesource.com/4434
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp
index 34f5e2b..e3b78a6 100644
--- a/gm/yuvtorgbeffect.cpp
+++ b/gm/yuvtorgbeffect.cpp
@@ -80,7 +80,7 @@
             return;
         }
 
-        SkAutoTUnref<GrTexture> texture[3];
+        sk_sp<GrTexture> texture[3];
         texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0],
                                                   GrTextureParams::ClampBilerp(),
                                                   SkSourceGammaTreatment::kRespect));
@@ -115,17 +115,21 @@
             for (int i = 0; i < 6; ++i) {
                 GrPaint grPaint;
                 grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkBlendMode::kSrc));
-                sk_sp<GrFragmentProcessor> fp(GrYUVEffect::MakeYUVToRGB(
-                    texture[indices[i][0]], texture[indices[i][1]], texture[indices[i][2]], sizes,
-                    static_cast<SkYUVColorSpace>(space), false));
+                sk_sp<GrFragmentProcessor> fp(
+                        GrYUVEffect::MakeYUVToRGB(texture[indices[i][0]].get(),
+                                                  texture[indices[i][1]].get(),
+                                                  texture[indices[i][2]].get(),
+                                                  sizes,
+                                                  static_cast<SkYUVColorSpace>(space),
+                                                  false));
                 if (fp) {
                     SkMatrix viewMatrix;
                     viewMatrix.setTranslate(x, y);
                     grPaint.addColorFragmentProcessor(std::move(fp));
-                    SkAutoTUnref<GrDrawBatch> batch(
+                    sk_sp<GrDrawBatch> batch(
                             GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, viewMatrix,
                                                                 renderRect, nullptr, nullptr));
-                    renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+                    renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
                 }
                 x += renderRect.width() + kTestPad;
             }
@@ -201,7 +205,7 @@
             return;
         }
 
-        SkAutoTUnref<GrTexture> texture[3];
+        sk_sp<GrTexture> texture[3];
         texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0], GrTextureParams::ClampBilerp(),
                                                   SkSourceGammaTreatment::kRespect));
         texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1], GrTextureParams::ClampBilerp(),
@@ -229,15 +233,15 @@
             GrPaint grPaint;
             grPaint.setXPFactory(GrPorterDuffXPFactory::Make(SkBlendMode::kSrc));
             sk_sp<GrFragmentProcessor> fp(
-                GrYUVEffect::MakeYUVToRGB(texture[0], texture[1], texture[2], sizes,
-                                          static_cast<SkYUVColorSpace>(space), true));
+                GrYUVEffect::MakeYUVToRGB(texture[0].get(), texture[1].get(), texture[2].get(),
+                                          sizes, static_cast<SkYUVColorSpace>(space), true));
             if (fp) {
                 SkMatrix viewMatrix;
                 viewMatrix.setTranslate(x, y);
                 grPaint.addColorFragmentProcessor(fp);
-                SkAutoTUnref<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(
+                sk_sp<GrDrawBatch> batch(GrRectBatchFactory::CreateNonAAFill(
                     GrColor_WHITE, viewMatrix, renderRect, nullptr, nullptr));
-                renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch);
+                renderTargetContext->priv().testingOnly_drawBatch(grPaint, batch.get());
             }
         }
     }