123 return !have_last_ || skipped_.load(std::memory_order_acquire);
127 std::uint64_t
resumes()
const {
return resumes_; }
136 bool have_last_ =
false;
139 std::uint64_t resumes_ = 0;
142 std::atomic<bool> skipped_{
false};
193 bool continuous,
bool has_idle_callback);
204 double now_seconds,
bool needs_repaint);
225 return damaged || tick.animating;
Definition frame_clock.hpp:14
Converts a host's monotonic presentation timestamps into per-frame deltas.
Definition host_frame_pump.hpp:79
float wake_threshold() const
Definition host_frame_pump.hpp:118
void set_nominal_dt(float dt)
Nominal frame interval used for the first frame and for resumes.
void suspend()
Tell the pump the host is about to stop pumping frames (idle at 0 fps, display link stopped,...
double last_timestamp() const
Timestamp of the last measured frame (undefined while suspended()).
Definition host_frame_pump.hpp:130
float measure(double now_seconds)
Measure the delta for the frame presented at now_seconds (monotonic, seconds).
bool suspended() const
True while the next measure() would be a resume (before the first frame, after suspend(),...
Definition host_frame_pump.hpp:122
std::uint64_t resumes() const
Number of resumes so far, first frame included. Observability + tests.
Definition host_frame_pump.hpp:127
void set_wake_threshold(float seconds)
Gap above which a frame is treated as a resume rather than a slow frame.
float nominal_dt() const
Definition host_frame_pump.hpp:114
static constexpr float kDefaultNominalDt
Definition host_frame_pump.hpp:81
void note_frame_skipped()
Tell the pump the host had a vsync it deliberately did NOT turn into a frame (nothing dirty,...
Definition host_frame_pump.hpp:108
static constexpr float kDefaultWakeThreshold
Definition host_frame_pump.hpp:82
Predicate that decides whether a view tree still needs per-vsync frames.
Single authoritative time source for the view system.
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
bool should_dispatch_host_frame(HostFramePump &pump, bool needs_repaint, bool continuous, bool has_idle_callback)
Step 0 of a host tick, on the VSYNC SOURCE'S OWN THREAD: does this vsync need to reach the UI thread ...
bool host_frame_composites(const HostFrameTick &tick, bool damaged) noexcept
Step 3 of a host tick, after advance_host_frame: does this frame composite?
Definition host_frame_pump.hpp:224
HostFrameTick begin_host_frame(View *root, FrameClock &clock, HostFramePump &pump, double now_seconds, bool needs_repaint)
Step 1 of a host tick: measure dt, pump the FrameClock's activity probes with it, then decide whether...
void advance_widget_animations(View *view, float dt)
Advance the built-in widget animations and the CSS animation timeline for view and every descendant.
void advance_host_frame(View *root, FrameClock &clock, float dt)
Step 2 of a host tick, run only when HostFrameTick::should_render: advance every dt-integrating consu...
Result of begin_host_frame.
Definition host_frame_pump.hpp:146
bool animating
True if the tree paints something new every frame WITHOUT requesting a repaint (needs_continuous_fram...
Definition host_frame_pump.hpp:167
bool resumed
True if this frame was a resume (first frame or wake-from-idle).
Definition host_frame_pump.hpp:169
bool continuous
True if the tree still wants continuous per-vsync frames (something is animating, or a render subscri...
Definition host_frame_pump.hpp:158
float dt
The measured dt for this frame.
Definition host_frame_pump.hpp:149
bool should_render
True if the host should advance this frame (advance_host_frame).
Definition host_frame_pump.hpp:152