diff options
author | 2022-11-05 03:39:59 +0100 | |
---|---|---|
committer | 2022-11-05 03:39:59 +0100 | |
commit | 7a24b4ba69e19459646648634c96d6426eaed462 (patch) | |
tree | f11c231cd4f67b047a35411315cdab626c9439cd /graphics/src/image/vector.rs | |
parent | 0a23f518c70d27f2e44af38e5d3be2a0ab1a9bc1 (diff) | |
download | iced-7a24b4ba69e19459646648634c96d6426eaed462.tar.gz iced-7a24b4ba69e19459646648634c96d6426eaed462.tar.bz2 iced-7a24b4ba69e19459646648634c96d6426eaed462.zip |
Replace `texture_store` and `store` with `storage`
Diffstat (limited to 'graphics/src/image/vector.rs')
-rw-r--r-- | graphics/src/image/vector.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/graphics/src/image/vector.rs b/graphics/src/image/vector.rs index 818fdd20..dc271c9e 100644 --- a/graphics/src/image/vector.rs +++ b/graphics/src/image/vector.rs @@ -79,7 +79,7 @@ impl<T: Storage> Cache<T> { [width, height]: [f32; 2], scale: f32, state: &mut T::State<'_>, - texture_store: &mut T, + storage: &mut T, ) -> Option<&T::Entry> { let id = handle.id(); @@ -124,7 +124,7 @@ impl<T: Storage> Cache<T> { let mut rgba = img.take(); rgba.chunks_exact_mut(4).for_each(|rgba| rgba.swap(0, 2)); - let allocation = texture_store.upload( + let allocation = storage.upload( width, height, bytemuck::cast_slice(rgba.as_slice()), @@ -143,7 +143,7 @@ impl<T: Storage> Cache<T> { } /// Load svg and upload raster data - pub fn trim(&mut self, texture_store: &mut T, state: &mut T::State<'_>) { + pub fn trim(&mut self, storage: &mut T, state: &mut T::State<'_>) { let svg_hits = &self.svg_hits; let rasterized_hits = &self.rasterized_hits; @@ -152,7 +152,7 @@ impl<T: Storage> Cache<T> { let retain = rasterized_hits.contains(k); if !retain { - texture_store.remove(entry, state); + storage.remove(entry, state); } retain |