diff options
author | 2020-06-02 04:38:55 +0200 | |
---|---|---|
committer | 2020-06-02 04:38:55 +0200 | |
commit | 94af34884667e78e231fb1904ae3e9fa785c9a7a (patch) | |
tree | 71114ed1cc30f6de74b2a1e16b0f7f42adb5b80d /wgpu | |
parent | b96d87ff6917e7dc75178e4c623d20d577ef583f (diff) | |
download | iced-94af34884667e78e231fb1904ae3e9fa785c9a7a.tar.gz iced-94af34884667e78e231fb1904ae3e9fa785c9a7a.tar.bz2 iced-94af34884667e78e231fb1904ae3e9fa785c9a7a.zip |
Rename `Rectangle::round` to `snap`
Also use `ceil` instead of `round`.
Closes #380.
Diffstat (limited to 'wgpu')
-rw-r--r-- | wgpu/src/backend.rs | 2 | ||||
-rw-r--r-- | wgpu/src/triangle.rs | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs index dfcf3a32..9ed4438b 100644 --- a/wgpu/src/backend.rs +++ b/wgpu/src/backend.rs @@ -105,7 +105,7 @@ impl Backend { target_width: u32, target_height: u32, ) { - let bounds = (layer.bounds * scale_factor).round(); + let bounds = (layer.bounds * scale_factor).snap(); if !layer.quads.is_empty() { self.quad_pipeline.draw( diff --git a/wgpu/src/triangle.rs b/wgpu/src/triangle.rs index 22a27143..fe2388a3 100644 --- a/wgpu/src/triangle.rs +++ b/wgpu/src/triangle.rs @@ -326,8 +326,7 @@ impl Pipeline { for (i, (vertex_offset, index_offset, indices)) in offsets.into_iter().enumerate() { - let clip_bounds = - (meshes[i].clip_bounds * scale_factor).round(); + let clip_bounds = (meshes[i].clip_bounds * scale_factor).snap(); render_pass.set_scissor_rect( clip_bounds.x, |