Remove unused PlatformAtlas::clear
method
This commit is contained in:
parent
9240a1a707
commit
559461923f
3 changed files with 0 additions and 22 deletions
|
@ -282,8 +282,6 @@ pub(crate) trait PlatformAtlas: Send + Sync {
|
|||
key: &AtlasKey,
|
||||
build: &mut dyn FnMut() -> Result<(Size<DevicePixels>, Cow<'a, [u8]>)>,
|
||||
) -> Result<AtlasTile>;
|
||||
|
||||
fn clear(&self);
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
|
|
|
@ -74,20 +74,6 @@ impl PlatformAtlas for MetalAtlas {
|
|||
Ok(tile)
|
||||
}
|
||||
}
|
||||
|
||||
fn clear(&self) {
|
||||
let mut lock = self.0.lock();
|
||||
lock.tiles_by_key.clear();
|
||||
for texture in &mut lock.monochrome_textures {
|
||||
texture.clear();
|
||||
}
|
||||
for texture in &mut lock.polychrome_textures {
|
||||
texture.clear();
|
||||
}
|
||||
for texture in &mut lock.path_textures {
|
||||
texture.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl MetalAtlasState {
|
||||
|
|
|
@ -325,10 +325,4 @@ impl PlatformAtlas for TestAtlas {
|
|||
|
||||
Ok(state.tiles[key].clone())
|
||||
}
|
||||
|
||||
fn clear(&self) {
|
||||
let mut state = self.0.lock();
|
||||
state.tiles = HashMap::default();
|
||||
state.next_id = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue