Add SkSurfaceCharacterization::isCompatible

Although the main change in this CL is the addition of GrCaps::areColorTypeAndFormatCompatible.

This is split out of:

https://skia-review.googlesource.com/c/skia/+/222781 (Add bridge between GrContext::createBackendTexture and SkSurface::MakeFromBackendTexture)

Change-Id: I2e50fff91eb07fb1358840e1a4a76dc138a2f195
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/223932
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index cb2cefa..c7d4de9 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -422,8 +422,8 @@
         // SkColorType are correct.
         return true;
     }
-    GrPixelConfig testConfig = caps->getConfigFromBackendFormat(format, colorType);
-    return testConfig != kUnknown_GrPixelConfig;
+
+    return caps->areColorTypeAndFormatCompatible(colorType, format);
 }
 #endif