DescriptionAdd clamp to sk_linear_to_srgb, reorder instructions
Improves performance for xforms toSRGB and to2Dot2. Seems
more optimal to save clamping until the end. That way we
don't stall the mul pipeline with a min/max.
toSRGB: 371us -> 346us
to2Dot2: 404us -> 387us
FWIW, it probably makes sense to clamp inside
sk_linear_to_srgb anyway. If not, we should potentially
provide two versions (one that clamps and one that
doesn't).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2173803002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Committed: https://skia.googlesource.com/skia/+/a5ba329c81dd6e21f8d610b56416d9f45259fa42
Patch Set 1 #Patch Set 2 : Don't bother with zero shifts, compiler does it for us #Patch Set 3 : Add a very important set of parentheses #
Depends on Patchset: Messages
Total messages: 16 (12 generated)
|