Skip to content

frameclock: let drivers own frame indices - #48

Merged
waywardmonkeys merged 1 commit into
forest-rs:mainfrom
waywardmonkeys:frameclock/driver-owned-frame-index
Jul 3, 2026
Merged

frameclock: let drivers own frame indices#48
waywardmonkeys merged 1 commit into
forest-rs:mainfrom
waywardmonkeys:frameclock/driver-owned-frame-index

Conversation

@waywardmonkeys

Copy link
Copy Markdown
Contributor

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
waywardmonkeys force-pushed the frameclock/driver-owned-frame-index branch from f6a9845 to e814e0b Compare July 3, 2026 10:59
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
waywardmonkeys force-pushed the frameclock/driver-owned-frame-index branch from e814e0b to 18eae6d Compare July 3, 2026 12:12
@waywardmonkeys
waywardmonkeys merged commit 4aad14a into forest-rs:main Jul 3, 2026
15 checks passed
@waywardmonkeys
waywardmonkeys deleted the frameclock/driver-owned-frame-index branch July 3, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant