Load images in the background
This commit is contained in:
parent
e3157f7212
commit
92b0184036
2 changed files with 37 additions and 40 deletions
|
@ -104,7 +104,7 @@ impl Element for Img {
|
|||
cx.with_z_index(1, |cx| {
|
||||
match source {
|
||||
ImageSource::Uri(uri) => {
|
||||
let image_future = cx.image_cache.get(uri.clone());
|
||||
let image_future = cx.image_cache.get(uri.clone(), cx);
|
||||
if let Some(data) = image_future
|
||||
.clone()
|
||||
.now_or_never()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue