cushy/src
Jonathan Johnson 577e97908d
Optimizing widgets at point
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.
2023-11-15 07:53:31 -08:00
..
animation LayoutContext 2023-11-05 11:50:59 -08:00
styles Checkbox, ButtonKind, linked/linked_string + more 2023-11-14 20:39:29 -08:00
widgets Stack with premeasured content now work 2023-11-15 07:47:23 -08:00
animation.rs Merge pull request #76 from ModProg/button-fun 2023-11-14 11:28:52 -08:00
context.rs Checkbox, ButtonKind, linked/linked_string + more 2023-11-14 20:39:29 -08:00
graphics.rs fill(), expand at root, Space::colored 2023-11-10 12:20:56 -08:00
lib.rs Checkbox, ButtonKind, linked/linked_string + more 2023-11-14 20:39:29 -08:00
names.rs Optimizations 2023-11-12 19:54:10 -08:00
styles.rs Checkbox, ButtonKind, linked/linked_string + more 2023-11-14 20:39:29 -08:00
tick.rs Layout caching, Lerp underflow fix, label fix 2023-11-14 07:38:39 -08:00
tree.rs Optimizing widgets at point 2023-11-15 07:53:31 -08:00
utils.rs Layout caching, Lerp underflow fix, label fix 2023-11-14 07:38:39 -08:00
value.rs Checkbox, ButtonKind, linked/linked_string + more 2023-11-14 20:39:29 -08:00
widget.rs Checkbox, ButtonKind, linked/linked_string + more 2023-11-14 20:39:29 -08:00
widgets.rs Checkbox, ButtonKind, linked/linked_string + more 2023-11-14 20:39:29 -08:00
window.rs Stack with premeasured content now work 2023-11-15 07:47:23 -08:00