Pass in a GrColorType into our Copy call.

This allows us to remove looking at the config to infer a color type when
setting up a Surface/RenderTargetContext for the copy.

Bug: skia:6718
Change-Id: I75b63480a84558c96b5eeb248cc6165f96b2a243
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264563
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/image/SkImage_GpuBase.cpp b/src/image/SkImage_GpuBase.cpp
index b2713e3..309d596 100644
--- a/src/image/SkImage_GpuBase.cpp
+++ b/src/image/SkImage_GpuBase.cpp
@@ -144,8 +144,10 @@
 
     sk_sp<GrSurfaceProxy> proxy = this->asTextureProxyRef(context);
 
+    GrColorType grColorType = SkColorTypeToGrColorType(this->colorType());
+
     sk_sp<GrTextureProxy> copyProxy =
-            GrSurfaceProxy::Copy(context, proxy.get(), GrMipMapped::kNo, subset,
+            GrSurfaceProxy::Copy(context, proxy.get(), grColorType, GrMipMapped::kNo, subset,
                                  SkBackingFit::kExact, proxy->isBudgeted());
 
     if (!copyProxy) {