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/gl/GrGLTexture.cpp b/src/gpu/gl/GrGLTexture.cpp
index 06bf662..cbb6b5a 100644
--- a/src/gpu/gl/GrGLTexture.cpp
+++ b/src/gpu/gl/GrGLTexture.cpp
@@ -48,6 +48,9 @@
, INHERITED(gpu, desc, TextureTypeFromTarget(idDesc.fInfo.fTarget), mipMapsStatus) {
this->init(desc, idDesc);
this->registerWithCache(budgeted);
+ if (GrPixelConfigIsCompressed(desc.fConfig)) {
+ this->setReadOnly();
+ }
}
GrGLTexture::GrGLTexture(GrGLGpu* gpu, Wrapped, const GrSurfaceDesc& desc,