Slightly improve readability of SkSwizzler_opts
This also aids older compilers, allegedly. I couldn't get the
problem to repro with godbolt, however.
Change-Id: Id092301fd491e1cbdfb6df964139f9d992cf5aa2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/925317
Auto-Submit: Kaylee Lubick <kjlubick@google.com>
Reviewed-by: Daniel Dilan <danieldilan@google.com>
Commit-Queue: Daniel Dilan <danieldilan@google.com>
diff --git a/src/opts/SkSwizzler_opts.inc b/src/opts/SkSwizzler_opts.inc
index 648d2ee..ff80497 100644
--- a/src/opts/SkSwizzler_opts.inc
+++ b/src/opts/SkSwizzler_opts.inc
@@ -159,7 +159,7 @@
SI uint32_t rgbA_to_CCCA(float c00, float c08, float c16, float a) {
if constexpr (kFastUnpremul) {
const float reciprocalA = reciprocal_alpha_times_255(a);
- auto unpremul = [reciprocalA](float c) {
+ auto unpremul = [reciprocalA](float c) -> uint32_t {
return unpremul_quick(reciprocalA, c);
};
return (uint32_t) a << 24
@@ -169,7 +169,7 @@
} else {
const float normalizedA = a * (1.0f / 255.0f);
const float reciprocalA = reciprocal_alpha(normalizedA);
- auto unpremul = [reciprocalA](float c) {
+ auto unpremul = [reciprocalA](float c) -> uint32_t {
return unpremul_simulating_RP(reciprocalA, c);
};
return (uint32_t) a << 24