Add sRGB 8888 colortype
A color type that linearizes just after loading, and re-encodes to sRGB
just before storing, mimicking the GPU formats that work the same way.
Notes:
- No mipmap support
- No SkPngEncoder support (HashAndEncode's .pngs are ok, though?)
- Needs better testing
This is a re-creation of reviews.skia.org/392990
Change-Id: I4739c2280211e7176aae98ba0a8476a7fe5efa72
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/438219
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrDirectContext.cpp b/src/gpu/GrDirectContext.cpp
index cb9edf0..4ada100 100644
--- a/src/gpu/GrDirectContext.cpp
+++ b/src/gpu/GrDirectContext.cpp
@@ -683,7 +683,7 @@
}
GrBackendFormat format = backendTexture.getBackendFormat();
- GrColorType grColorType = SkColorTypeAndFormatToGrColorType(this->caps(), skColorType, format);
+ GrColorType grColorType = SkColorTypeToGrColorType(skColorType);
if (!this->caps()->areColorTypeAndFormatCompatible(grColorType, format)) {
return false;