Restore ETC1 compressed texture support.
Brings back GL ETC1 support and adds Vulkan support as well.
Bug: skia:8684
Change-Id: Ie65da0a3172793081f0e4072f161bfb9b14678bc
Reviewed-on: https://skia-review.googlesource.com/c/179724
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrTextureProducer.cpp b/src/gpu/GrTextureProducer.cpp
index 97417f9..9ae2eb4 100644
--- a/src/gpu/GrTextureProducer.cpp
+++ b/src/gpu/GrTextureProducer.cpp
@@ -23,6 +23,8 @@
bool dstWillRequireMipMaps) {
SkASSERT(context);
+ GrPixelConfig config = GrMakePixelConfigUncompressed(inputProxy->config());
+
const SkRect dstRect = SkRect::MakeIWH(copyParams.fWidth, copyParams.fHeight);
GrMipMapped mipMapped = dstWillRequireMipMaps ? GrMipMapped::kYes : GrMipMapped::kNo;
@@ -52,7 +54,7 @@
sk_sp<GrRenderTargetContext> copyRTC =
context->contextPriv().makeDeferredRenderTargetContextWithFallback(
format, SkBackingFit::kExact, dstRect.width(), dstRect.height(),
- inputProxy->config(), nullptr, 1, mipMapped, inputProxy->origin());
+ config, nullptr, 1, mipMapped, inputProxy->origin());
if (!copyRTC) {
return nullptr;
}