summaryrefslogtreecommitdiffstats
path: root/wgpu/src/triangle.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-08 15:04:35 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-04-08 15:04:35 +0200
commitd922b478156488a7bc03c6e791e05c040d702634 (patch)
tree767e9b9fa2c6527a0b3e3b3dd1c21b29cd533ee8 /wgpu/src/triangle.rs
parent6ea763c2a79292e5b10be2240b4b57b920223616 (diff)
downloadiced-d922b478156488a7bc03c6e791e05c040d702634.tar.gz
iced-d922b478156488a7bc03c6e791e05c040d702634.tar.bz2
iced-d922b478156488a7bc03c6e791e05c040d702634.zip
Reintroduce support for custom primitives in `iced_wgpu`
Diffstat (limited to 'wgpu/src/triangle.rs')
-rw-r--r--wgpu/src/triangle.rs7
1 files changed, 3 insertions, 4 deletions
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,