add image cache

This commit is contained in:
2026-08-17 20:27:31 +07:00
parent 1159252dda
commit 37d6c3ccd6
8 changed files with 232 additions and 13 deletions
+5
View File
@@ -112,6 +112,11 @@ impl Render for Workspace {
let notification_layer = Root::render_notification_layer(window, cx);
div()
// All `img` elements below (avatars, …) load through the shared
// bounded LRU cache instead of the window-global asset cache,
// so images can be freed when views close or when the cache is
// full.
.image_cache(crate::image_cache::global(cx))
.id("workspace")
.v_flex()
.size_full()