Keep playing with incremental rendering (still very slow)

This commit is contained in:
Héctor Ramón Jiménez 2023-04-04 20:47:53 +02:00
parent 0f7abffc0e
commit 6270c33ed9
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
2 changed files with 161 additions and 85 deletions

View file

@ -230,7 +230,11 @@ impl Primitive {
},
) => {
if bounds_a == bounds_b {
return content_a.damage(content_b);
return content_a
.damage(content_b)
.into_iter()
.filter_map(|r| r.intersection(bounds_a))
.collect();
} else {
return vec![*bounds_a, *bounds_b];
}
@ -246,7 +250,11 @@ impl Primitive {
},
) => {
if translation_a == translation_b {
return content_a.damage(content_b);
return content_a
.damage(content_b)
.into_iter()
.map(|r| r + *translation_a)
.collect();
}
}
(