Files
figcraft/crates/render/src
Dylan M. TaylorandBrandon Thomas 8717728a87 perf(color): sort gradient stops once per diamond texture (#1894)
Gradient::sample cloned, sanitised and sorted every stop on each call,
and the diamond texture sampled it for each of its 65 536 pixels, so a
file's gradient with many stops cost that sort 65 536 times.

sample_sorted samples stops already sorted, finding the segment by binary
search; sample delegates to it and the diamond texture sorts once.

Co-authored-by: Brandon Thomas <echelon@gmail.com>
2026-11-03 00:12:58 -05:00
..
…
…