iris: keep redraw comments current

This commit is contained in:
iris committed 2026-09-12 22:06:13 -04:00
1 parent 77b39a97e3
commit 45cdfed293
1 file changed
+5 -9
+5 -9
View File
@@ -40,10 +40,8 @@ pub struct UiRenderState {
old_root: Option<WidgetId>,
resized: bool,
/// Widgets whose `draw` call is on the stack now. A reentrant draw would
/// create two retained primitive sets with one owner, so it is rejected;
/// completed draws are removed immediately and are instead tracked by
/// consuming their outstanding dirty mark.
/// Widgets whose `draw` call is currently on the stack. Reentrant draws
/// are invalid because each widget owns exactly one retained primitive set.
draw_started: HashSet<WidgetId>,
/// Widgets which asked from inside `draw` to be drawn on the following
/// frame. Kept separate from `Widgets::needs_redraw` until `update_at`
@@ -266,11 +264,9 @@ impl UiRenderState {
"a previous frame left {} widget(s) marked as mid-draw",
self.draw_started.len(),
);
// Timed unconditionally -- an `Instant::now()` pair is cheap enough
// not to move the `--phone` bench's frame time (checked when this
// was added), and gating it behind the trace toggle would leave
// `iris::frame` with nothing to report the one frame somebody just
// turned tracing on to look at.
// Keep timing independent of the trace toggle so the first traced
// frame has a duration to report. The clock reads do not measurably
// affect the `--phone` benchmark.
let layout_start = Instant::now();
let kind = if self.needs_redraw_all(root) {
self.redraw_all(root, rsc);