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.
This commit is contained in:
@@ -139,11 +139,12 @@ mod tests {
|
|||||||
assert!(gw <= max && gh <= max, "{t:?} does not fit");
|
assert!(gw <= max && gh <= max, "{t:?} does not fit");
|
||||||
assert_eq!(gx % TILE_ALIGN, 0, "{t:?} starts off the grid");
|
assert_eq!(gx % TILE_ALIGN, 0, "{t:?} starts off the grid");
|
||||||
assert_eq!(gy % 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.
|
// The halo is there on every side, or the frame ends first — in
|
||||||
assert!(kx == 0 || kx - gx >= halo);
|
// which case the untiled render stops at the same edge.
|
||||||
assert!(ky == 0 || ky - gy >= halo);
|
assert!(gx == 0 || kx - gx >= halo);
|
||||||
assert!(kx + kw == frame.0 || gx + gw - (kx + kw) >= halo);
|
assert!(gy == 0 || ky - gy >= halo);
|
||||||
assert!(ky + kh == frame.1 || gy + gh - (ky + kh) >= halo);
|
assert!(gx + gw == frame.0 || gx + gw - (kx + kw) >= halo);
|
||||||
|
assert!(gy + gh == frame.1 || gy + gh - (ky + kh) >= halo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user