Rename view getters in various image subclasses.

This also changes the SkImage_Base header to return a const& view and
then removes the equivalent version in SkImage_GpuBase.

Bug: skia:9556
Change-Id: Ica096693a22c0fc590786058c055fb28387c80a1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/268624
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Auto-Submit: Greg Daniel <egdaniel@google.com>
diff --git a/src/image/SkImage_GpuBase.cpp b/src/image/SkImage_GpuBase.cpp
index ca716f1..c998de1 100644
--- a/src/image/SkImage_GpuBase.cpp
+++ b/src/image/SkImage_GpuBase.cpp
@@ -114,13 +114,14 @@
         }
     }
 
-    GrSurfaceProxyView view = this->asSurfaceProxyViewRef(direct);
+    const GrSurfaceProxyView* view = this->view(direct);
+    SkASSERT(view);
     GrColorType grColorType = SkColorTypeAndFormatToGrColorType(fContext->priv().caps(),
                                                                 this->colorType(),
-                                                                view.proxy()->backendFormat());
+                                                                view->proxy()->backendFormat());
 
-    auto sContext = GrSurfaceContext::Make(direct, std::move(view), grColorType,
-                                           this->alphaType(), this->refColorSpace());
+    auto sContext = GrSurfaceContext::Make(direct, *view, grColorType, this->alphaType(),
+                                           this->refColorSpace());
     if (!sContext) {
         return false;
     }
@@ -142,15 +143,15 @@
         return nullptr;
     }
 
-    const GrSurfaceProxyView& view = this->getSurfaceProxyView(context);
-    SkASSERT(view.proxy());
+    const GrSurfaceProxyView* view = this->view(context);
+    SkASSERT(view && view->proxy());
 
     GrColorType grColorType = SkColorTypeToGrColorType(this->colorType());
 
     GrSurfaceProxyView copyView =
-            GrSurfaceProxy::Copy(context, view.proxy(), view.origin(), grColorType,
+            GrSurfaceProxy::Copy(context, view->proxy(), view->origin(), grColorType,
                                  GrMipMapped::kNo, subset, SkBackingFit::kExact,
-                                 view.proxy()->isBudgeted());
+                                 view->proxy()->isBudgeted());
 
     if (!copyView.proxy()) {
         return nullptr;
@@ -173,13 +174,14 @@
         return false;
     }
 
-    GrSurfaceProxyView view = this->asSurfaceProxyViewRef(direct);
+    const GrSurfaceProxyView* view = this->view(direct);
+    SkASSERT(view);
     GrColorType grColorType = SkColorTypeAndFormatToGrColorType(fContext->priv().caps(),
                                                                 this->colorType(),
-                                                                view.proxy()->backendFormat());
+                                                                view->proxy()->backendFormat());
 
-    auto sContext = GrSurfaceContext::Make(direct, std::move(view), grColorType,
-                                           this->alphaType(), this->refColorSpace());
+    auto sContext = GrSurfaceContext::Make(direct, *view, grColorType, this->alphaType(),
+                                           this->refColorSpace());
     if (!sContext) {
         return false;
     }
@@ -195,8 +197,8 @@
         return nullptr;
     }
 
-    GrTextureAdjuster adjuster(fContext.get(), this->asSurfaceProxyViewRef(context),
-                               this->imageInfo().colorInfo(), this->uniqueID());
+    GrTextureAdjuster adjuster(fContext.get(), *this->view(context), this->imageInfo().colorInfo(),
+                               this->uniqueID());
     return adjuster.viewForParams(params, scaleAdjust).asTextureProxyRef();
 }