Add interface(s) for compressed backend texture support

This is just the API level interface(s) and the backend virtual calls needed to implement them.

Bug: skia:9680
Change-Id: I6c655751e23ce18c6a184c925e8d472902e8a478
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/259976
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrContext_Base.cpp b/src/gpu/GrContext_Base.cpp
index c62f561..bd1a7c4 100644
--- a/src/gpu/GrContext_Base.cpp
+++ b/src/gpu/GrContext_Base.cpp
@@ -58,6 +58,15 @@
     return format;
 }
 
+GrBackendFormat GrContext_Base::compressedBackendFormat(SkImage::CompressionType c) const {
+    const GrCaps* caps = this->caps();
+
+    GrBackendFormat format = caps->getBackendFormatFromCompressionType(c);
+
+    SkASSERT(!format.isValid() || caps->isFormatTexturable(format));
+    return format;
+}
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 sk_sp<const GrCaps> GrBaseContextPriv::refCaps() const {
     return fContext->refCaps();