From 89b464db0cbcae3634af6d60a59bbef7f5406351 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Sun, 27 Sep 2026 15:35:02 -0400 Subject: [PATCH] Accept a tile halo that the frame's edge cuts short The test demanded a full halo on every side except the frame's own edge, but a tile one step in from it is grown to the edge and no further, exactly where the untiled render stops too. --- core/dr-pipeline/src/tiles.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/core/dr-pipeline/src/tiles.rs b/core/dr-pipeline/src/tiles.rs index 391cac8..15ec0f1 100644 --- a/core/dr-pipeline/src/tiles.rs +++ b/core/dr-pipeline/src/tiles.rs @@ -139,11 +139,12 @@ mod tests { assert!(gw <= max && gh <= max, "{t:?} does not fit"); assert_eq!(gx % TILE_ALIGN, 0, "{t:?} starts off the grid"); assert_eq!(gy % TILE_ALIGN, 0, "{t:?} starts off the grid"); - // The halo is there on every side the frame does not end. - assert!(kx == 0 || kx - gx >= halo); - assert!(ky == 0 || ky - gy >= halo); - assert!(kx + kw == frame.0 || gx + gw - (kx + kw) >= halo); - assert!(ky + kh == frame.1 || gy + gh - (ky + kh) >= halo); + // The halo is there on every side, or the frame ends first — in + // which case the untiled render stops at the same edge. + assert!(gx == 0 || kx - gx >= halo); + assert!(gy == 0 || ky - gy >= halo); + assert!(gx + gw == frame.0 || gx + gw - (kx + kw) >= halo); + assert!(gy + gh == frame.1 || gy + gh - (ky + kh) >= halo); } }