Owns a PointerCoalescer plus the host-side policy around it: the frame-driver opt-in, the idle->pending dirty edge, and the counters.
More...
#include <host_drag_coalescer.hpp>
Owns a PointerCoalescer plus the host-side policy around it: the frame-driver opt-in, the idle->pending dirty edge, and the counters.
Timing still belongs to the caller. There is no clock here: the host calls submit per raw event and flush_frame once per PRESENTED frame.
◆ Deliver
Delivers one sample to the view tree.
Called synchronously, and the host may deliver to a target that has since been unmounted, so the callable is responsible for its own liveness re-check.
◆ discard()
| void pulp::view::HostDragCoalescer::discard |
( |
| ) |
|
Drop held motion WITHOUT delivering it, for a host tearing down mid-gesture where the target may already be freed.
◆ flush_frame()
| std::size_t pulp::view::HostDragCoalescer::flush_frame |
( |
const Deliver & | deliver | ) |
|
Release motion held since the last presented frame.
Call once per PRESENTED frame, BEFORE the frame's render decision — a frame that decides not to paint must still release input, or latency grows without bound while the UI is visually idle. Returns the number delivered.
◆ frame_driver_running()
| bool pulp::view::HostDragCoalescer::frame_driver_running |
( |
| ) |
const |
|
inline |
◆ has_pending()
| bool pulp::view::HostDragCoalescer::has_pending |
( |
| ) |
const |
|
inline |
◆ set_frame_driver_running()
| void pulp::view::HostDragCoalescer::set_frame_driver_running |
( |
bool | running, |
|
|
const Deliver & | deliver ) |
Opt in only from a host that has committed to calling flush_frame once per presented frame.
Default is OFF, and that default is load bearing: holding motion nothing will ever release is not a slow drag, it is no drag at all.
Turning it OFF flushes, so a sample submitted during teardown dispatches immediately rather than joining a batch nobody is left to release. Call discard first when the target may already be gone.
◆ stats()
| const Stats & pulp::view::HostDragCoalescer::stats |
( |
| ) |
const |
|
inline |
◆ submit()
Feed one raw pointer sample.
The documentation for this class was generated from the following file: