mirror of
https://github.com/danbulant/cushy
synced 2026-05-24 12:28:23 +00:00
Given the goal of this function, I'm not sure it can get more optimal than this even with specialized data structures like KD-trees. The problem is that we want all widgets that are hovered, not just some, and that makes nearest neighbor useless. The main optimizations here are simple: - Group up all the render data we need in a single vec to help cache. - Precompute the rect's extents to make the contains check at most 4 comparisons. This had a noticable effect on the "wiggle the mouse frantically" performance, where Gooey isn't actually repainting but is routing mouse events. |
||
|---|---|---|
| .. | ||
| animation | ||
| styles | ||
| widgets | ||
| animation.rs | ||
| context.rs | ||
| graphics.rs | ||
| lib.rs | ||
| names.rs | ||
| styles.rs | ||
| tick.rs | ||
| tree.rs | ||
| utils.rs | ||
| value.rs | ||
| widget.rs | ||
| widgets.rs | ||
| window.rs | ||