skia /
skcms /
33ca7b4f733461df1f1d17a93ee42748d98c323e move clamp outside of clut
This is a tiny code size win and, unexpectedly, a tiny perf win.
I really just wanted to focus the code while I try to refactor it.
It's safe to do this because the CLUT R,G,B inputs will be overwritten,
and A will either be overwritten to 1 or pass through. It's harmless to
clamp a pass-through alpha to [0,1].
I almost did the same to table lookups, but that's a bad idea. Tables
are sometimes used in mixed situations where we clamp some channels as
inputs to tables but leave others as unclamped inputs to parametrics.
Kind of rare, I guess, but possible.
Change-Id: Ifa777cb0af4dfa1991238468db38dc846a650251
Reviewed-on: https://skia-review.googlesource.com/c/162202
Auto-Submit: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2 files changed