|
| float | measure (double now_seconds) |
| | Measure the delta for the frame presented at now_seconds (monotonic, seconds).
|
| void | suspend () |
| | Tell the pump the host is about to stop pumping frames (idle at 0 fps, display link stopped, view detached).
|
| void | note_frame_skipped () |
| | Tell the pump the host had a vsync it deliberately did NOT turn into a frame (nothing dirty, nothing animating, no idle callback — see should_dispatch_host_frame).
|
| void | set_nominal_dt (float dt) |
| | Nominal frame interval used for the first frame and for resumes.
|
| float | nominal_dt () const |
| void | set_wake_threshold (float seconds) |
| | Gap above which a frame is treated as a resume rather than a slow frame.
|
| float | wake_threshold () const |
| bool | suspended () const |
| | True while the next measure() would be a resume (before the first frame, after suspend(), or with a note_frame_skipped() still pending).
|
| std::uint64_t | resumes () const |
| | Number of resumes so far, first frame included. Observability + tests.
|
| double | last_timestamp () const |
| | Timestamp of the last measured frame (undefined while suspended()).
|
| void | reset () |
Converts a host's monotonic presentation timestamps into per-frame deltas.
Owned by the host, ticked on the UI thread. Prefer the vsync source's OWN timestamp (CVTimeStamp::hostTime, CADisplayLink.targetTimestamp) over a fresh wall-clock read: it is the time the frame will actually be presented, and it stays correct even when the callback is delivered late.
| void pulp::view::HostFramePump::note_frame_skipped |
( |
| ) |
|
|
inline |
Tell the pump the host had a vsync it deliberately did NOT turn into a frame (nothing dirty, nothing animating, no idle callback — see should_dispatch_host_frame).
The pump did not measure that vsync, so the wall-clock gap it opens is idle time, not animation time: the next measure() is a resume regardless of how short the gap was.
Callable from the vsync source's own thread (touches one atomic); cleared by the next measure() on the UI thread.