iris: keep redraw comments current

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