From d922b478156488a7bc03c6e791e05c040d702634 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 8 Apr 2024 15:04:35 +0200 Subject: Reintroduce support for custom primitives in `iced_wgpu` --- wgpu/src/triangle.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'wgpu/src/triangle.rs') diff --git a/wgpu/src/triangle.rs b/wgpu/src/triangle.rs index 98ba41b3..8470ea39 100644 --- a/wgpu/src/triangle.rs +++ b/wgpu/src/triangle.rs @@ -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, -- cgit