diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 00:22:27 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 01:00:59 -0300 |
| commit | 1b12f7aadaf0e0a4570a5985900f61d0fb897f79 (patch) | |
| tree | 2563f00aa47d3ef39ef1647482ba5d19bc1373a1 /test/pdf_scroll_bench.zig | |
| parent | b283824eed0703ae9b89f2af520354046146b855 (diff) | |
| download | pardes-1b12f7aadaf0e0a4570a5985900f61d0fb897f79.tar.gz pardes-1b12f7aadaf0e0a4570a5985900f61d0fb897f79.zip | |
surface: a frame's images are a std.ArrayList(ImagePlace), where they were a slice of optionals grown by hand (appendImagePlace's doubling realloc, nimages beside it) whose slots were never null: every reader's `orelse continue` and `.?` go (gui, tui, terminal, TerminalImages, ninep/screen, test/pdf.zig, kitty and the two PDF benches); macos.zig's loop the same, passing ast-check but not built here
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'test/pdf_scroll_bench.zig')
| -rw-r--r-- | test/pdf_scroll_bench.zig | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/test/pdf_scroll_bench.zig b/test/pdf_scroll_bench.zig index f3d47b1e..391a98e6 100644 --- a/test/pdf_scroll_bench.zig +++ b/test/pdf_scroll_bench.zig @@ -460,14 +460,10 @@ const Recorder = struct { /// which pixels arrive. fn observe(self: *Recorder, frame: usize, surface: *const pardes.Surface) void { self.frames += 1; - self.visual = mix(self.visual, surface.nimages); - self.transport = mix(self.transport, surface.nimages); + self.visual = mix(self.visual, surface.images.items.len); + self.transport = mix(self.transport, surface.images.items.len); const full = frame % full_rgba_stride == 0; - for (surface.images[0..surface.nimages]) |maybe| { - const place = maybe orelse { - self.visual = mix(self.visual, std.math.maxInt(u64)); - continue; - }; + for (surface.images.items) |place| { self.images += 1; self.visual = mix(self.visual, place.pane); self.visual = mix(self.visual, place.x); |
