GrSurfaceContext not ref counted.

Also don't specify redundant width/height to SkGpuDevice.

Change-Id: I389df5c4b073c2c05632ba6b7c95b02a22dfaf98
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/235824
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/effects/GrConfigConversionEffect.fp b/src/gpu/effects/GrConfigConversionEffect.fp
index ba58cc2..890d188 100644
--- a/src/gpu/effects/GrConfigConversionEffect.fp
+++ b/src/gpu/effects/GrConfigConversionEffect.fp
@@ -40,14 +40,14 @@
         const SkImageInfo ii = SkImageInfo::Make(kSize, kSize,
                                                  kRGBA_8888_SkColorType, kPremul_SkAlphaType);
 
-        sk_sp<GrRenderTargetContext> readRTC(
+        auto readRTC =
                 context->priv().makeDeferredRenderTargetContext(SkBackingFit::kExact,
                                                                 kSize, kSize,
-                                                                kColorType, nullptr));
-        sk_sp<GrRenderTargetContext> tempRTC(
+                                                                kColorType, nullptr);
+        auto tempRTC =
                 context->priv().makeDeferredRenderTargetContext(SkBackingFit::kExact,
                                                                 kSize, kSize,
-                                                                kColorType, nullptr));
+                                                                kColorType, nullptr);
         if (!readRTC || !readRTC->asTextureProxy() || !tempRTC) {
             return false;
         }
diff --git a/src/gpu/effects/GrRRectBlurEffect.fp b/src/gpu/effects/GrRRectBlurEffect.fp
index cf23511..6a39777 100644
--- a/src/gpu/effects/GrRRectBlurEffect.fp
+++ b/src/gpu/effects/GrRRectBlurEffect.fp
@@ -54,10 +54,10 @@
                 key, GrColorType::kAlpha_8, kBottomLeft_GrSurfaceOrigin));
         if (!mask) {
             // TODO: this could be approx but the texture coords will need to be updated
-            sk_sp<GrRenderTargetContext> rtc(
+            auto rtc =
                     context->priv().makeDeferredRenderTargetContextWithFallback(
                                                 SkBackingFit::kExact, size.fWidth,
-                                                size.fHeight, GrColorType::kAlpha_8, nullptr));
+                                                size.fHeight, GrColorType::kAlpha_8, nullptr);
             if (!rtc) {
                 return nullptr;
             }
@@ -73,7 +73,7 @@
             if (!srcProxy) {
                 return nullptr;
             }
-            sk_sp<GrRenderTargetContext> rtc2(
+            auto rtc2 =
                       SkGpuBlurUtils::GaussianBlur(context,
                                                    std::move(srcProxy),
                                                    SkIPoint::Make(0, 0),
@@ -84,7 +84,7 @@
                                                    xformedSigma,
                                                    GrTextureDomain::kIgnore_Mode,
                                                    kPremul_SkAlphaType,
-                                                   SkBackingFit::kExact));
+                                                   SkBackingFit::kExact);
             if (!rtc2) {
                 return nullptr;
             }
diff --git a/src/gpu/effects/generated/GrConfigConversionEffect.h b/src/gpu/effects/generated/GrConfigConversionEffect.h
index ee45889..95df89e 100644
--- a/src/gpu/effects/generated/GrConfigConversionEffect.h
+++ b/src/gpu/effects/generated/GrConfigConversionEffect.h
@@ -48,10 +48,10 @@
         const SkImageInfo ii =
                 SkImageInfo::Make(kSize, kSize, kRGBA_8888_SkColorType, kPremul_SkAlphaType);
 
-        sk_sp<GrRenderTargetContext> readRTC(context->priv().makeDeferredRenderTargetContext(
-                SkBackingFit::kExact, kSize, kSize, kColorType, nullptr));
-        sk_sp<GrRenderTargetContext> tempRTC(context->priv().makeDeferredRenderTargetContext(
-                SkBackingFit::kExact, kSize, kSize, kColorType, nullptr));
+        auto readRTC = context->priv().makeDeferredRenderTargetContext(SkBackingFit::kExact, kSize,
+                                                                       kSize, kColorType, nullptr);
+        auto tempRTC = context->priv().makeDeferredRenderTargetContext(SkBackingFit::kExact, kSize,
+                                                                       kSize, kColorType, nullptr);
         if (!readRTC || !readRTC->asTextureProxy() || !tempRTC) {
             return false;
         }
diff --git a/src/gpu/effects/generated/GrRRectBlurEffect.h b/src/gpu/effects/generated/GrRRectBlurEffect.h
index ffec0a3..aaff4d3 100644
--- a/src/gpu/effects/generated/GrRRectBlurEffect.h
+++ b/src/gpu/effects/generated/GrRRectBlurEffect.h
@@ -55,10 +55,9 @@
                 key, GrColorType::kAlpha_8, kBottomLeft_GrSurfaceOrigin));
         if (!mask) {
             // TODO: this could be approx but the texture coords will need to be updated
-            sk_sp<GrRenderTargetContext> rtc(
-                    context->priv().makeDeferredRenderTargetContextWithFallback(
-                            SkBackingFit::kExact, size.fWidth, size.fHeight, GrColorType::kAlpha_8,
-                            nullptr));
+            auto rtc = context->priv().makeDeferredRenderTargetContextWithFallback(
+                    SkBackingFit::kExact, size.fWidth, size.fHeight, GrColorType::kAlpha_8,
+                    nullptr);
             if (!rtc) {
                 return nullptr;
             }
@@ -74,18 +73,17 @@
             if (!srcProxy) {
                 return nullptr;
             }
-            sk_sp<GrRenderTargetContext> rtc2(
-                    SkGpuBlurUtils::GaussianBlur(context,
-                                                 std::move(srcProxy),
-                                                 SkIPoint::Make(0, 0),
-                                                 nullptr,
-                                                 SkIRect::MakeWH(size.fWidth, size.fHeight),
-                                                 SkIRect::EmptyIRect(),
-                                                 xformedSigma,
-                                                 xformedSigma,
-                                                 GrTextureDomain::kIgnore_Mode,
-                                                 kPremul_SkAlphaType,
-                                                 SkBackingFit::kExact));
+            auto rtc2 = SkGpuBlurUtils::GaussianBlur(context,
+                                                     std::move(srcProxy),
+                                                     SkIPoint::Make(0, 0),
+                                                     nullptr,
+                                                     SkIRect::MakeWH(size.fWidth, size.fHeight),
+                                                     SkIRect::EmptyIRect(),
+                                                     xformedSigma,
+                                                     xformedSigma,
+                                                     GrTextureDomain::kIgnore_Mode,
+                                                     kPremul_SkAlphaType,
+                                                     SkBackingFit::kExact);
             if (!rtc2) {
                 return nullptr;
             }