Remove compressed format support from the GrGpu::createBackendTexture code path
The intent is to add a createCompressedBackendTexture code path. This will decouple the GPU's ability to create compressed textures from raster's support for compressed SkColorTypes.
Change-Id: I5fa5dded6d5013b524fe7f99f2ebe0bdee76b3c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/243657
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 0262554..c05194e 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -754,7 +754,10 @@
return {};
}
- SkASSERT(!caps->isFormatCompressed(format) || !srcData); // There is no ETC1 SkColorType
+ if (caps->isFormatCompressed(format)) {
+ // Compressed formats must go through the createCompressedBackendTexture API
+ return {};
+ }
if (w < 1 || w > caps->maxTextureSize() || h < 1 || h > caps->maxTextureSize()) {
return {};