Stop creating image pipeline when unnecessary
This commit is contained in:
parent
fc55e3a3df
commit
4e7159c22c
11 changed files with 114 additions and 86 deletions
17
wgpu/src/image/atlas/layer.rs
Normal file
17
wgpu/src/image/atlas/layer.rs
Normal file
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue