# Objective
On macOS, Low Power Mode reduces the CPU and GPU performance available
to applications. GPUI continued requesting animation frames at the
normal cadence, so work that no longer fit inside every refresh produced
irregular frame drops instead of a deliberate lower frame rate.
Frame throttling could also reject a display-link callback that arrived
a fraction of a millisecond before the mathematically exact target
interval. On a 120 Hz display, for example, a measured 16.666 ms
interval missed a 16.667 ms threshold and delayed the frame until
roughly 25 ms, intermittently turning a 60 fps cap into 40 fps.
## Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
---
Release Notes:
- [GPUI] Improved animation smoothness on macOS when Low Power Mode is
enabled.
---------
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Adds a cross-platform API for GPUI apps to switch between windowed and
headless modes.
Release Notes:
- N/A
- [GPUI]: N/A
---------
Co-authored-by: Antonio Scandurra <me@as-cii.com>
Improves `gpui_linux` error messages for missing feature flags.
Currently, you'd need to look at the source & Rust backtrace to diagnose
the error shown when the feature flags are missing.
Self-Review Checklist:
- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Improve `gpui_linux` error messages for missing feature flags
---------
Co-authored-by: Tom Houlé <tom@tomhoule.com>
Closes #ISSUE
Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
#2874 on steroids
Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [ ] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
Release Notes:
- N/A
---------
Co-authored-by: Eric Holk <eric@zed.dev>