From f72b2ccab172e24240d6274f509de8ac79cd0663 Mon Sep 17 00:00:00 2001 From: FredApps <153173854+FredApps@users.noreply.github.com> Date: Thu, 29 Oct 2026 14:40:31 +0100 Subject: [PATCH] Reconcile stroke touches with packed coverage tile keys Preserve both sparse and bounded-rectangle overlap paths after integrating #9852 with current main. Existing touches_covers_every_pixel_with_coverage covers negative coordinates, edges and huge rectangles. Combined CI will validate; no local build claimed. --- crates/paint/src/render.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/paint/src/render.rs b/crates/paint/src/render.rs index 5914421dd5e..4b882b8d4c9 100644 --- a/crates/paint/src/render.rs +++ b/crates/paint/src/render.rs @@ -1089,9 +1089,15 @@ impl StrokeRenderer { let (t1x, t1y) = ((r.x1 - 1).div_euclid(COV_TILE), (r.y1 - 1).div_euclid(COV_TILE)); let span = (i64::from(t1x) - i64::from(t0x) + 1).saturating_mul(i64::from(t1y) - i64::from(t0y) + 1); if span > self.cov.tiles.len() as i64 { - return self.cov.tiles.keys().any(|&(tx, ty)| (t0x..=t1x).contains(&tx) && (t0y..=t1y).contains(&ty)); + return self + .cov + .tiles + .keys() + .copied() + .map(tile_coords) + .any(|(tx, ty)| (t0x..=t1x).contains(&tx) && (t0y..=t1y).contains(&ty)); } - (t0y..=t1y).any(|ty| (t0x..=t1x).any(|tx| self.cov.tiles.contains_key(&(tx, ty)))) + (t0y..=t1y).any(|ty| (t0x..=t1x).any(|tx| self.cov.tiles.contains_key(&tile_key((tx, ty))))) } /// Dense final coverage over the stroke bounds.