frameclock: let drivers own frame indices - #48
Merged
waywardmonkeys merged 1 commit intoJul 3, 2026
Merged
Conversation
waywardmonkeys
force-pushed
the
frameclock/driver-owned-frame-index
branch
from
July 3, 2026 10:59
f6a9845 to
e814e0b
Compare
Remove `frame_index` from `FrameTick` so backend ticks describe platform wake facts only: `now`, predicted present, refresh interval, output, and previous actual-present feedback. Make low-level lifecycle identity explicit by changing `Scheduler::plan` to take a `frame_index` argument and replacing `FrameTickEvent::from` with `FrameTickEvent::new(frame_index, &tick)`. Direct scheduler integrations keep their own content-frame id and pass the same value into planning and diagnostics. Move retained identity ownership into `FrameDriver`. The driver now stamps `FramePlan::frame_index` when pending demand is consumed into a plan, retains that id through queued plans, submissions, deferred feedback, drops, and summaries, and removes backend wake counters from Apple, Web, Wayland, and Windows tick helpers. Update examples and docs so `FrameTick` stays backend-neutral while `FrameDriver` and low-level hosts own content-frame lifecycle identity.
waywardmonkeys
force-pushed
the
frameclock/driver-owned-frame-index
branch
from
July 3, 2026 12:12
e814e0b to
18eae6d
Compare
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.
Remove
frame_indexfromFrameTickso backend ticks describe platform wake facts only:now, predicted present, refresh interval, output, and previous actual-present feedback.Make low-level lifecycle identity explicit by changing
Scheduler::planto take aframe_indexargument and replacingFrameTickEvent::fromwithFrameTickEvent::new(frame_index, &tick). Direct scheduler integrations keep their own content-frame id and pass the same value into planning and diagnostics.Move retained identity ownership into
FrameDriver. The driver now stampsFramePlan::frame_indexwhen pending demand is consumed into a plan, retains that id through queued plans, submissions, deferred feedback, drops, and summaries, and removes backend wake counters from Apple, Web, Wayland, and Windows tick helpers.Update examples and docs so
FrameTickstays backend-neutral whileFrameDriverand low-level hosts own content-frame lifecycle identity.