add image cache
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user