Assert dimensions of quads are normal in iced_tiny_skia

This commit is contained in:
Josh Megnauth 2023-09-14 01:25:40 -04:00 committed by Héctor Ramón Jiménez
parent 66c8a804c6
commit cdc42d6464
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -155,6 +155,15 @@ impl Backend {
border,
shadow,
} => {
debug_assert!(
bounds.width.is_normal(),
"Quad with non-normal width!"
);
debug_assert!(
bounds.height.is_normal(),
"Quad with non-normal height!"
);
let physical_bounds = (*bounds + translation) * scale_factor;
if !clip_bounds.intersects(&physical_bounds) {