DescriptionImplement four more xfermodes with Sk4px.
HardLight, Overlay, Darken, and Lighten are all
~2x faster with SSE, ~25% faster with NEON.
This covers all previously-implemented NEON xfermodes.
3 previous SSE xfermodes remain. Those need division
and sqrt, so I'm planning on using SkPMFloat for them.
It'll help the readability and NEON speed if I move that
into [0,1] space first.
The main new concept here is c.thenElse(t,e), which behaves like
(c ? t : e) except, of course, both t and e are evaluated. This allows
us to emulate conditionals with vectors.
This also removes the concept of SkNb. Instead of a standalone bool
vector, each SkNi or SkNf will just return their own types for
comparisons. Turns out to be a lot more manageable this way.
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/b9d4163bebab0f5639f9c5928bb5fc15f472dddc
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-Arm64-Debug-Android-Trybot
Committed: https://skia.googlesource.com/skia/+/b5e861185a69b3e47d1c1bf622fd3f83e5f13898
Patch Set 1 #Patch Set 2 : NEON support #Patch Set 3 : fix operator< #Patch Set 4 : better precision #Patch Set 5 : todo #Patch Set 6 : rebase #Patch Set 7 : Darken, Lighten #Patch Set 8 : add define #Patch Set 9 : partial work on Dodge and Burn. Really wants 1-based SkPMFloat first. #Patch Set 10 : revert back on only Sk4px modes #Patch Set 11 : tweaks #Patch Set 12 : portable code, removing SkNb #Patch Set 13 : fix anyTrue #Patch Set 14 : win build fix #Patch Set 15 : try again? #Patch Set 16 : update to SK_SUPPORT_LEGACY_XFERMODES #Patch Set 17 : manually cast for missing 64-bit vreinterprets #
Messages
Total messages: 27 (12 generated)
|