Add GrCaps::isFormatCompressed
This is part of trying to remove uses of GrPixelConfig from the proxy provider
Change-Id: I12d085cfbff86d0e44829ce3ee36744b937b804e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/230576
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index 2f98524..3ee070b 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -778,6 +778,17 @@
return format_is_srgb(*format.getVkFormat());
}
+bool GrVkCaps::isFormatCompressed(const GrBackendFormat& format) const {
+ if (!format.getVkFormat()) {
+ return false;
+ }
+
+ VkFormat vkFormat = *format.getVkFormat();
+ SkASSERT(GrVkFormatIsSupported(vkFormat));
+
+ return vkFormat == VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK;
+}
+
bool GrVkCaps::isFormatTexturable(GrColorType, const GrBackendFormat& format) const {
if (!format.getVkFormat()) {
return false;