summaryrefslogtreecommitdiffstats
path: root/wgpu/src/image/raster.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--wgpu/src/image/raster.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/wgpu/src/image/raster.rs b/wgpu/src/image/raster.rs
index 648df0ff..884dd65a 100644
--- a/wgpu/src/image/raster.rs
+++ b/wgpu/src/image/raster.rs
@@ -91,17 +91,9 @@ impl Cache {
memory
}
- pub fn trim(&mut self, texture_array: &mut TextureArray) {
+ pub fn trim(&mut self) {
let hits = &self.hits;
- for (id, mem) in &self.map {
- if let Memory::Device(allocation) = mem {
- if !hits.contains(&id) {
- texture_array.deallocate(allocation);
- }
- }
- }
-
self.map.retain(|k, _| hits.contains(k));
self.hits.clear();
}