diff options
author | 2020-02-26 20:10:19 +0100 | |
---|---|---|
committer | 2020-02-26 20:10:19 +0100 | |
commit | d06d06e05096e0145be74fd02d67eada0a1665a1 (patch) | |
tree | 7e1d5e256d553a4d98c10b7751441d6fa541990f /wgpu/src/image.rs | |
parent | 48d70280eb4f5908f1c9339bebdfbab856d55ae1 (diff) | |
download | iced-d06d06e05096e0145be74fd02d67eada0a1665a1.tar.gz iced-d06d06e05096e0145be74fd02d67eada0a1665a1.tar.bz2 iced-d06d06e05096e0145be74fd02d67eada0a1665a1.zip |
Deallocate atlas entries and remove padding
Diffstat (limited to 'wgpu/src/image.rs')
-rw-r--r-- | wgpu/src/image.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wgpu/src/image.rs b/wgpu/src/image.rs index 1ffa50d2..7155b540 100644 --- a/wgpu/src/image.rs +++ b/wgpu/src/image.rs @@ -415,10 +415,10 @@ impl Pipeline { pub fn trim_cache(&mut self) { #[cfg(feature = "image")] - self.raster_cache.borrow_mut().trim(); + self.raster_cache.borrow_mut().trim(&mut self.texture_atlas); #[cfg(feature = "svg")] - self.vector_cache.borrow_mut().trim(); + self.vector_cache.borrow_mut().trim(&mut self.texture_atlas); } } @@ -531,8 +531,8 @@ fn add_instance( (y as f32 + 0.5) / atlas::SIZE as f32, ], _size_in_atlas: [ - (width as f32 - 0.5) / atlas::SIZE as f32, - (height as f32 - 0.5) / atlas::SIZE as f32, + (width as f32 - 1.0) / atlas::SIZE as f32, + (height as f32 - 1.0) / atlas::SIZE as f32, ], _layer: layer as u32, }; |