zed/crates/gpui2
Antonio Scandurra a40515dbb3 Rework frame rendering
This commit replaces the old `previous_frame` and `current_frame` with
a new pair of `rendered_frame` and `next_frame` that are swapped once
we are ready to draw a finished frame.

This makes it clearer when to use which: `rendered_frame` should be used
to query the existing state, whereas `next_frame` should be used and mutated when
redrawing a dirty window.

The change was prompted by a bug I encountered in `FocusHandle::contains`. The
implementation was reading `current_frame`, but that was the wrong field to
access if e.g. we were reading it inside of a `render` function or any other
time while drawing the window.
2023-12-07 12:10:49 +01:00
..
docs Document contexts 2023-11-14 19:52:51 -07:00
src Rework frame rendering 2023-12-07 12:10:49 +01:00
tests Re-implement actions as derive macros instead of blanket impls 2023-11-16 17:32:02 -08:00
build.rs Introduce surface rendering 2023-11-28 16:47:31 +01:00
Cargo.toml Update Taffy to latest main 2023-11-18 21:30:33 -07:00