diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2021-01-18 02:11:24 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2021-01-18 02:11:24 -0800 |
commit | 2a63c9a844b44f9dc0f5c74dc021e8dbc6dc2988 (patch) | |
tree | dfa97bda52c1b03bd53568902a7ab4453bb22322 /bootstrap | |
parent | 89638b03939218093805bbe4f20632efa4d6d755 (diff) |
modules/drizzle: low-hanging fruit optimizations
- switch puddle_sample() to 0..1 coordinates to avoid
some pointless extra arithmetic on every pixel
- avoid redundant ->w multiplies in puddle_sample()
- avoid multiplies in inner loops of drizzle_render_fragment()
by accumulating coordinates w/addition instead
I noticed full-screen 'compose' was struggling to keep a full
frame rate on my laptop when testing with the new 'plato' layer.
valgrind profiles showed drizzle as the big hog, mostly the
puddle_sample() function. These changes help but it's still not
great, getting much better will likely become invasive and
crufty. It would be nice to cache the vertical lerp results and
reuse them across puddle_sample() calls when valid, that might be
a useful TODO.
The runner-up is spiro, prolly some low-hanging fruit there as
well, I haven't looked yet.
Diffstat (limited to 'bootstrap')
0 files changed, 0 insertions, 0 deletions