Reland "Move ExternalFormat and Type to FormatInfo."

This reverts commit e2c5e8c7eeb07a7c2de566851956027cf6c12b07.

Reason for revert: relanding with fix

Original change's description:
> Revert "Move ExternalFormat and Type to FormatInfo."
>
> This reverts commit 80140518ef7627d103e7d80fec599c052280053a.
>
> Reason for revert: probably breaking angle
>
> Original change's description:
> > Move ExternalFormat and Type to FormatInfo.
> >
> > This also deletes the ConfigInfoTable in GrGLCaps as there is no more use
> > of it.
> >
> > Additionally with the rework of storing External Io info on the format table
> > I rewrote the implimination of supportedReadPixels and supportedWritePixels
> > for GL to loop over the supported types looking for a match instead of
> > simply defaulting to a base value.
> >
> > Finally transferFromOffsetAlignment has been rolled into the SupportedRead
> > instead of being its own query.
> >
> > Bug: skia:6718
> > Change-Id: I39f77adf6c0b5b38245e55e8a7e18c0b428862d0
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229381
> > Commit-Queue: Greg Daniel <egdaniel@google.com>
> > Reviewed-by: Brian Salomon <bsalomon@google.com>
>
> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
>
> Change-Id: Ifef2e7308fdb4d91d649f08488b798815e0aa5fa
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: skia:6718
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229896
> Reviewed-by: Greg Daniel <egdaniel@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: Ida09be706b461cf89467fc0082744177e71e8985
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/229918
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/image/SkImage_GpuBase.cpp b/src/image/SkImage_GpuBase.cpp
index 0590467..60fc1c4 100644
--- a/src/image/SkImage_GpuBase.cpp
+++ b/src/image/SkImage_GpuBase.cpp
@@ -87,9 +87,14 @@
         }
     }
 
+    sk_sp<GrTextureProxy> texProxy = this->asTextureProxyRef(direct);
+    GrColorType grColorType = SkColorTypeAndFormatToGrColorType(fContext->priv().caps(),
+                                                                this->colorType(),
+                                                                texProxy->backendFormat());
+
     sk_sp<GrSurfaceContext> sContext =
-            direct->priv().makeWrappedSurfaceContext(this->asTextureProxyRef(direct),
-                                                     SkColorTypeToGrColorType(this->colorType()),
+            direct->priv().makeWrappedSurfaceContext(std::move(texProxy),
+                                                     grColorType,
                                                      this->alphaType(),
                                                      this->refColorSpace());
     if (!sContext) {
@@ -140,9 +145,13 @@
         return false;
     }
 
+    sk_sp<GrTextureProxy> texProxy = this->asTextureProxyRef(direct);
+    GrColorType grColorType = SkColorTypeAndFormatToGrColorType(fContext->priv().caps(),
+                                                                this->colorType(),
+                                                                texProxy->backendFormat());
+
     sk_sp<GrSurfaceContext> sContext = direct->priv().makeWrappedSurfaceContext(
-            this->asTextureProxyRef(direct), SkColorTypeToGrColorType(this->colorType()),
-            this->alphaType(), this->refColorSpace());
+            std::move(texProxy), grColorType, this->alphaType(), this->refColorSpace());
     if (!sContext) {
         return false;
     }