summaryrefslogtreecommitdiffstats
path: root/wgpu
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2021-07-21 17:43:37 +0700
committerLibravatar GitHub <noreply@github.com>2021-07-21 17:43:37 +0700
commit14c1e70f66e4d561712ec124ebb0961ef0cf0d00 (patch)
treec38b32cb1b68e4369782c3e5ec2d3a61771c6826 /wgpu
parent8e29709b69ec0eae211887c8c6d91558175997b5 (diff)
parent665422e256b5eb8fed23f1a13900838e0e3bcb44 (diff)
downloadiced-14c1e70f66e4d561712ec124ebb0961ef0cf0d00.tar.gz
iced-14c1e70f66e4d561712ec124ebb0961ef0cf0d00.tar.bz2
iced-14c1e70f66e4d561712ec124ebb0961ef0cf0d00.zip
Merge pull request #952 from aentity/fix_svg_memory
Use ceil on svg dimensions, fix svg memory usage ref #841
Diffstat (limited to 'wgpu')
-rw-r--r--wgpu/src/image/vector.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/wgpu/src/image/vector.rs b/wgpu/src/image/vector.rs
index 8c7de617..cd511a45 100644
--- a/wgpu/src/image/vector.rs
+++ b/wgpu/src/image/vector.rs
@@ -75,8 +75,8 @@ impl Cache {
let id = handle.id();
let (width, height) = (
- (scale * width).round() as u32,
- (scale * height).round() as u32,
+ (scale * width).ceil() as u32,
+ (scale * height).ceil() as u32,
);
// TODO: Optimize!
@@ -122,6 +122,7 @@ impl Cache {
device,
encoder,
)?;
+ log::debug!("allocating {} {}x{}", id, width, height);
let _ = self.svg_hits.insert(id);
let _ = self.rasterized_hits.insert((id, width, height));