Remove unused PlatformAtlas::clear method

This commit is contained in:
Antonio Scandurra 2024-01-18 10:40:15 +01:00
parent 9240a1a707
commit 559461923f
3 changed files with 0 additions and 22 deletions

View file

@ -282,8 +282,6 @@ pub(crate) trait PlatformAtlas: Send + Sync {
key: &AtlasKey, key: &AtlasKey,
build: &mut dyn FnMut() -> Result<(Size<DevicePixels>, Cow<'a, [u8]>)>, build: &mut dyn FnMut() -> Result<(Size<DevicePixels>, Cow<'a, [u8]>)>,
) -> Result<AtlasTile>; ) -> Result<AtlasTile>;
fn clear(&self);
} }
#[derive(Clone, Debug, PartialEq, Eq)] #[derive(Clone, Debug, PartialEq, Eq)]

View file

@ -74,20 +74,6 @@ impl PlatformAtlas for MetalAtlas {
Ok(tile) 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 { impl MetalAtlasState {

View file

@ -325,10 +325,4 @@ impl PlatformAtlas for TestAtlas {
Ok(state.tiles[key].clone()) Ok(state.tiles[key].clone())
} }
fn clear(&self) {
let mut state = self.0.lock();
state.tiles = HashMap::default();
state.next_id = 0;
}
} }