Reintroduce support for custom primitives in iced_wgpu

This commit is contained in:
Héctor Ramón Jiménez 2024-04-08 15:04:35 +02:00
parent 6ea763c2a7
commit d922b47815
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
11 changed files with 220 additions and 173 deletions

View file

@ -501,14 +501,13 @@ impl Layer {
let mut last_is_solid = None;
for (index, mesh) in meshes.iter().enumerate() {
let Some(clip_bounds) =
bounds.intersection(&(mesh.clip_bounds() * transformation))
let Some(clip_bounds) = bounds
.intersection(&(mesh.clip_bounds() * transformation))
.and_then(Rectangle::snap)
else {
continue;
};
let clip_bounds = clip_bounds.snap();
render_pass.set_scissor_rect(
clip_bounds.x,
clip_bounds.y,