pub fn frame_step<W: WindowBackend>(
window: &mut W,
tree: &mut UiTree,
host: &mut dyn Host,
events: &[RawEvent],
dt: Duration,
) -> Result<FrameStats, String>Expand description
消化一批“已到手“的事件并推进一帧:不阻塞、不计时。
覆盖:事件消化 → 命令/idle → 动画推进 → 重排 → 主题 → after_frame →
render → after_present。
dt:上一帧到本帧的时间步,由调用方提供(桌面用Instant,wasm 用 rAF 时间戳)。close_requested:以前RawEvent::Close会直接return,现在改成标记,由调用方决定是否停止。- 首帧日志与 profile 统计不进来,它们属于调用方的职责。