summaryrefslogtreecommitdiffstats
path: root/wgpu/src/image/atlas/layer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-02-28 15:17:16 +0100
committerLibravatar GitHub <noreply@github.com>2020-02-28 15:17:16 +0100
commitbab7dbcaef5d637e6452ef814b78595d9004971c (patch)
treedb82ee28634d499749816f69eaac4f303d088c14 /wgpu/src/image/atlas/layer.rs
parent69c81aa50dc30bc7a05df4393e45bc3d478db8b5 (diff)
parent88d4cd097044077127e1b3aa8fcb04afed185491 (diff)
downloadiced-bab7dbcaef5d637e6452ef814b78595d9004971c.tar.gz
iced-bab7dbcaef5d637e6452ef814b78595d9004971c.tar.bz2
iced-bab7dbcaef5d637e6452ef814b78595d9004971c.zip
Merge pull request #154 from Maldela/atlas
Texture atlas
Diffstat (limited to 'wgpu/src/image/atlas/layer.rs')
-rw-r--r--wgpu/src/image/atlas/layer.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/wgpu/src/image/atlas/layer.rs b/wgpu/src/image/atlas/layer.rs
new file mode 100644
index 00000000..b1084ed9
--- /dev/null
+++ b/wgpu/src/image/atlas/layer.rs
@@ -0,0 +1,17 @@
+use crate::image::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,
+ }
+ }
+}