From 493c36ac712ef04523065b94988a88cc4db16b1a Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 24 Apr 2024 21:29:30 +0200 Subject: Make image `Cache` eviction strategy less aggressive in `iced_wgpu` Instead of trimming unconditionally at the end of a frame, we now trim the cache only when there is a cache miss. This way, images that are not visible but still a part of the layout will stay cached. Eviction will only happen when the images are not a part of the UI for two consectuive frames. --- wgpu/src/image/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wgpu/src/image/mod.rs') diff --git a/wgpu/src/image/mod.rs b/wgpu/src/image/mod.rs index 86731cbf..8b831a3c 100644 --- a/wgpu/src/image/mod.rs +++ b/wgpu/src/image/mod.rs @@ -277,7 +277,7 @@ impl Pipeline { let texture_version = cache.layer_count(); if self.texture_version != texture_version { - log::info!("Atlas has grown. Recreating bind group..."); + log::debug!("Atlas has grown. Recreating bind group..."); self.texture = cache.create_bind_group(device, &self.texture_layout); -- cgit