GPUI (both 1 and 2) currently performs rendering, layout, and painting
at the end of every effect cycle. This leads to poor performance when
the app receives events more frequently than the display refreshes. Such
rapid events can come from a terminal, an LSP, or a mouse with a high
polling rate.
This PR changes GPUI so that we don't render until the OS notifies us
that the content will be presented, via the `displayLayer:` callback.
Because render, layout, and paint have side effects that are sometimes
relied on in tests, we currently keep the old behavior (drawing after
every effects cycle) in tests.
This is similar to what @ForLoveOfCats explored in
https://github.com/zed-industries/zed/pull/3542, but slightly simpler,
in that we're not using the display link. As a follow-up, we could use
the display link to start rendering earlier, to possibly reduce latency
further.
This PR fixes the inactive tab style to properly show the label using
the muted text color.
I went about fixing this in the most direct way possible, but the
solution leaves a lot to be desired, IMO. I plan to explore some ideas
on how we can improve the state of styling the tab content without
having the same styles repeated all over the place and subsequently
out-of-sync.
Release Notes:
- N/A
- vim2 compiling (but mostly commented out)
- More code written, similar lack of workingness so far
Still todo:
[ ] Figure out the focus/blur stuff
[ ] Uncoment more code
[ ] Fix VimTestContext
[ ] Uncomment the tests
Release Notes:
- N/A
We used `width` instead of `height` in the "pixels-to-point" conversion
code, which would cause clicks to not work correctly when the width was
smaller than the `y` coordinate.
Release Notes:
- N/A
We used `width` instead of `height` in the "pixels-to-point" conversion
code, which would cause clicks to not work correctly when the width was
smaller than the `y` coordinate.