Move read swizzle from GL ConfigInfo to FormatInfo.
With this change I also removed GrPixelConfig as param to supportedReadPixelsColorType().
This meant some updates had to be made to Vulkan and Metal to make sure they return the
right GrColorType.
Bug: skia:6718
Change-Id: I71b6360489cf499692c7b777e5915090fad05c56
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228349
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrCaps.cpp b/src/gpu/GrCaps.cpp
index b324429..e8f51e9 100644
--- a/src/gpu/GrCaps.cpp
+++ b/src/gpu/GrCaps.cpp
@@ -372,10 +372,9 @@
}
GrCaps::SupportedRead GrCaps::supportedReadPixelsColorType(GrColorType srcColorType,
- GrPixelConfig config,
const GrBackendFormat&,
GrColorType dstColorType) const {
- return SupportedRead{GrSwizzle::RGBA(), GrPixelConfigToColorType(config)};
+ return SupportedRead{GrSwizzle::RGBA(), srcColorType};
}
#ifdef SK_DEBUG