The canvas renders large views in parallel horizontal bands, and each band crops a layer to its
own rows. Three effects went wrong at those crops:
- Inner shadow (the reported bug): the padded shadow buffer treated everything beyond the cropped
layer as outside the shape, so every band edge cast shadow inwards, drawing dark bands across
the layer (any shape and fill; also at the view's edge when a layer was partly off screen). The
shape itself is now rasterised over the padded buffer at the shadow's offset (sub-pixel
accurate), so only its real edges cast shadow.
- Layers starting above or left of the pixmap (inside the blur margin) were sized from the
clamped origin and came out short by the margin: a drop-shadowed or background-blurred layer
crossing a band edge lost a strip at its far side.
- Background blur read a backdrop that stopped at the band's edge (streaks at band edges). Bands
now overlap by what background blurs read (3 sigma + box rounding) and keep only their own
rows; a blur wider than a band renders the view in one piece.
Regression tests (crates/render/src/band_tests.rs): an image-filled ellipse and a rotated solid
rectangle with inner shadows (spread, offsets) under a background-blurred panel, at 1x and 2x,
rendered in 2, 3 and 7 bands, must match the one-piece render row by row; the ellipse's interior
far from its edge must equal the render without the shadow on every row; a huge backdrop blur
falls back to one piece.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>