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.
This commit is contained in:
FredApps committed 2026-10-29 14:40:31 +01:00
1 parent 53dbfe280c
commit f72b2ccab1
1 file changed
+8 -2
+8 -2
View File
@@ -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.