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/gpu/GrAHardwareBufferImageGenerator.cpp b/src/gpu/GrAHardwareBufferImageGenerator.cpp
index dd97f03..34b9c07 100644
--- a/src/gpu/GrAHardwareBufferImageGenerator.cpp
+++ b/src/gpu/GrAHardwareBufferImageGenerator.cpp
@@ -214,8 +214,9 @@
 
     GrMipMapped mipMapped = willNeedMipMaps ? GrMipMapped::kYes : GrMipMapped::kNo;
 
-    return GrSurfaceProxy::Copy(context, texProxy.get(), mipMapped, subset, SkBackingFit::kExact,
-                                SkBudgeted::kYes);
+    GrColorType grColorType = SkColorTypeToGrColorType(this->getInfo().colorType());
+    return GrSurfaceProxy::Copy(context, texProxy.get(), grColorType, mipMapped, subset,
+                                SkBackingFit::kExact, SkBudgeted::kYes);
 }
 
 bool GrAHardwareBufferImageGenerator::onIsValid(GrContext* context) const {