summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-07 02:05:11 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2019-11-07 02:05:11 +0100
commit904818ccb0597e50b8a51bcbcbbf914c692b3d1a (patch)
treed63162b4b7cfe5197a87d437569c1400b49e7da5 /wgpu
parent8074bca8a083c5ecfed941b112ec60dca6ae2deb (diff)
downloadiced-904818ccb0597e50b8a51bcbcbbf914c692b3d1a.tar.gz
iced-904818ccb0597e50b8a51bcbcbbf914c692b3d1a.tar.bz2
iced-904818ccb0597e50b8a51bcbcbbf914c692b3d1a.zip
Floor layer coords to avoid excessive clipping
Diffstat (limited to 'wgpu')
-rw-r--r--wgpu/src/renderer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/wgpu/src/renderer.rs b/wgpu/src/renderer.rs
index 1d40c215..c8e1e10d 100644
--- a/wgpu/src/renderer.rs
+++ b/wgpu/src/renderer.rs
@@ -265,8 +265,8 @@ impl Renderer {
if width > 0.0 && height > 0.0 {
let clip_layer = Layer::new(
Rectangle {
- x: x.max(0.0).ceil() as u32,
- y: y.max(0.0).ceil() as u32,
+ x: x.max(0.0).floor() as u32,
+ y: y.max(0.0).floor() as u32,
width: width.ceil() as u32,
height: height.ceil() as u32,
},