rust-windowing / rust-windowing/winit
On MacOS frame-rate *may* be slightly unstable due to where `RedrawRequested` is issued.
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 1.3k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 9
Description
This is subtle and may be localized to my computer or version of MacOS, but I thought it was worth reporting.
I use my own library that is similar to winit and I noticed visual stutter. When diagnosing it I realized that moving where the RedrawRequested event was issued from the end of the event loop to be in response to drawRect made the frame-rate timings more stable.
I decided to check winit for comparison so I setup a test repository for glutin / winit that logs the time between frames. I noticed that winit's frame-times match the stuttering in my library (before the fix).
It's also possible that it is the timings alone that are off and that there's no actual visual issue with winit / glutin.
Here's my test repository for glutin where the issue is reproduced: https://github.com/kettle11/winit_framerate_test
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the linked glutin/winit frame-rate test on macOS and comparing its logged frame intervals. Inspect where winit issues RedrawRequested relative to drawRect and the end of the event loop; done would be documenting whether the timing difference is reproducible and identifying the relevant behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100