From 00605f7a109845a99f16621b267305a8b995dddc Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 10 Nov 2026 11:27:39 -0300 Subject: sketchbook: shapes antialiased up to 3840x2160; SDL's Vulkan backend no longer defragments (it lost a frame's first draws) Co-Authored-By: Claude Fable 5.2 --- src/host/gfx.zig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/host/gfx.zig b/src/host/gfx.zig index 3affa6e..0466f27 100644 --- a/src/host/gfx.zig +++ b/src/host/gfx.zig @@ -180,9 +180,10 @@ pub const Painter = struct { dirty: [4]u32 = .{ 0, 0, 0, 0 }, }; - /// 16 samples a pixel, unless that takes more than 16 Mi of them; 4, - /// then; else none. - const max_samples = 16 << 20; + /// 16 samples a pixel, unless that takes more than a 3840x2160 canvas + /// does at 4 (what 1920x1080 takes at 16: a 127 MiB layer); 4, then; + /// else none. + const max_samples = 3840 * 2160 * 4; fn factorFor(size: [2]u32) u32 { const pixels = @as(u64, size[0]) * size[1]; -- cgit v1.3