frameclock_wayland: add present-time estimator - #44
Merged
no-materials merged 1 commit intoJul 2, 2026
Conversation
Replace the subduction_backend_wayland present-hint stub with a real estimator in frameclock_wayland. TickerState now retains the last observed refresh interval alongside the actual-present time and predicts the next vsync at or after the tick time, so emitted FrameTicks carry a real predicted_present/refresh_interval once wp_presentation feedback flows. New present_hints, present_hints_with_commit_lead, default_commit_lead, and display_timing free functions mirror the Apple and Web adapters; a predicted time is reported as Estimated, since it is a client-side vsync-grid extrapolation rather than a compositor-provided target, and falls back to pacing-only when no feedback exists. The backend feeds the observed refresh interval to the ticker at the wp_presentation_feedback.presented sites, the hints.rs stub is removed, and the wayland_layers and wayland_lotta_layers examples are repointed to the new helpers and paired with SchedulerConfig::estimated().
Contributor
|
This looks interesting, but I think the best way to see about it will be to get a few things landed so that you can try writing a |
waywardmonkeys
approved these changes
Jun 29, 2026
waywardmonkeys
left a comment
Contributor
There was a problem hiding this comment.
I don't really have a way to test / confirm this ... I'm inclined to land it and let people test it by having it be usable via Overstory (at least).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the
subduction_backend_waylandpresent-hint stub with a real present-time estimator inframeclock_wayland, matching the Apple/Web adapter shape.TickerStatenow retains the last observed refresh interval next to the actual-present time and predicts the next vsync at or after the tick time, so emittedFrameTicks carry a realpredicted_present/refresh_intervaloncewp_presentationfeedback flows. New free functionspresent_hints,present_hints_with_commit_lead,default_commit_lead, anddisplay_timingconsume that tick: a predicted time is reported asEstimated(a client-side vsync-grid extrapolation, not a compositor-provided target) and falls back to pacing-only when no feedback exists yet.The backend feeds the observed refresh interval to the ticker at the
wp_presentation_feedback.presentedsites and the oldhints.rsstub is removed; thewayland_layersandwayland_lotta_layersexamples are repointed to the new helpers and paired withSchedulerConfig::estimated().