summaryrefslogtreecommitdiffstats
path: root/wgpu/src/image/atlas/allocation.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-11-05 04:37:59 +0100
committerLibravatar GitHub <noreply@github.com>2022-11-05 04:37:59 +0100
commit370fa14efb8d41bcf81e4a0ead6a9ab7ab750bee (patch)
tree6a434e6bc8c3a95065faafa533cf1d5e2318cc06 /wgpu/src/image/atlas/allocation.rs
parent7b129917281baaa6688158c303922f94341ab69f (diff)
parent078cadfed0e67560d9047d84435e87b8671c5992 (diff)
downloadiced-370fa14efb8d41bcf81e4a0ead6a9ab7ab750bee.tar.gz
iced-370fa14efb8d41bcf81e4a0ead6a9ab7ab750bee.tar.bz2
iced-370fa14efb8d41bcf81e4a0ead6a9ab7ab750bee.zip
Merge pull request #1485 from ids1024/glow-image
Glow image rendering support; move image/svg code to iced_graphics
Diffstat (limited to 'wgpu/src/image/atlas/allocation.rs')
-rw-r--r--wgpu/src/image/atlas/allocation.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/wgpu/src/image/atlas/allocation.rs b/wgpu/src/image/atlas/allocation.rs
index 59b7239f..43aba875 100644
--- a/wgpu/src/image/atlas/allocation.rs
+++ b/wgpu/src/image/atlas/allocation.rs
@@ -1,5 +1,7 @@
use crate::image::atlas::{self, allocator};
+use iced_graphics::Size;
+
#[derive(Debug)]
pub enum Allocation {
Partial {
@@ -19,10 +21,10 @@ impl Allocation {
}
}
- pub fn size(&self) -> (u32, u32) {
+ pub fn size(&self) -> Size<u32> {
match self {
Allocation::Partial { region, .. } => region.size(),
- Allocation::Full { .. } => (atlas::SIZE, atlas::SIZE),
+ Allocation::Full { .. } => Size::new(atlas::SIZE, atlas::SIZE),
}
}