From 93d901ec5b80c36cb6c9d9027a8b39de5adafaca Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 24 Oct 2026 14:09:45 -0300 Subject: anim 1b: the probe measures input-to-present latency, where each frame's work goes (zones: body rows and colours, the GUI's build, shaping, rasterizing, a soft present's GPU wait, upload and flip) and the view presented; timedemos for throughput (stress), every file kind of a corpus (kinds) and every kind of pane (panes) --- src/pardes.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index 22b43a51..df6d347f 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -5968,13 +5968,14 @@ pub const Pardes = struct { // rendering and nothing else. // A shell with a clock draws what `advance` stepped; one without // steps its own `.tick`s and draws while anything animates. - if (!p.needs_frame and !p.continuous() and (v.now != null or !p.animationActive())) return; + if (!p.needs_frame and !p.continuous() and (v.now != null or !p.animationActive())) return p.frames.idle(); // No one to see it: the frame stays owed (needs_frame), not drawn. // A pty streaming into an unwatched session spent most of its time // drawing what nobody looked at. if (v.watched) |f| if (!f(h.ctx)) return; _ = p.frame_arena.reset(.{ .retain_with_limit = memory.limits.frame_kept }); p.frames.mark_update = FrameStats.nowNs(); + p.frames.view = if (p.panes[p.active]) |pane| pane.scroll() else 0; const surface = try p.render(p.frame_arena.allocator()); p.frames.mark_render = FrameStats.nowNs(); if (v.present) |f| f(h.ctx, surface); -- cgit v1.3