summaryrefslogtreecommitdiffstats
path: root/wgpu/src/texture/atlas/layer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-26 12:34:34 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-02-26 12:34:34 +0100
commit59d45a5440aaa46c7dc8f3dc70c8518167c10418 (patch)
tree2b5ad3d2c577e9ebb7fcac7452a74680174f8108 /wgpu/src/texture/atlas/layer.rs
parent82f0a49062d10f3cbf202a5379c061a2509ec97b (diff)
downloadiced-59d45a5440aaa46c7dc8f3dc70c8518167c10418.tar.gz
iced-59d45a5440aaa46c7dc8f3dc70c8518167c10418.tar.bz2
iced-59d45a5440aaa46c7dc8f3dc70c8518167c10418.zip
Refactor texture atlas
- Split into multiple modules - Rename some concepts - Change API details
Diffstat (limited to 'wgpu/src/texture/atlas/layer.rs')
-rw-r--r--wgpu/src/texture/atlas/layer.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/wgpu/src/texture/atlas/layer.rs b/wgpu/src/texture/atlas/layer.rs
new file mode 100644
index 00000000..b025d8a1
--- /dev/null
+++ b/wgpu/src/texture/atlas/layer.rs
@@ -0,0 +1,17 @@
+use crate::texture::atlas::Allocator;
+
+#[derive(Debug)]
+pub enum Layer {
+ Empty,
+ Busy(Allocator),
+ Full,
+}
+
+impl Layer {
+ pub fn is_empty(&self) -> bool {
+ match self {
+ Layer::Empty => true,
+ _ => false,
+ }
+ }
+}