Decode on the fly in gallery example
Use `release` mode. Image decoding is terribly slow in `debug` mode!
This commit is contained in:
parent
1b51364154
commit
6fa54f7f6b
3 changed files with 44 additions and 43 deletions
|
|
@ -248,7 +248,7 @@ fn load_image<'a>(
|
|||
} else if let core::image::Handle::Rgba { .. } = handle {
|
||||
// Load RGBA handles synchronously, since it's very cheap
|
||||
cache.insert(handle, Memory::load(handle));
|
||||
} else {
|
||||
} else if !pending.contains(&handle.id()) {
|
||||
let _ = jobs.send(Job::Load(handle.clone()));
|
||||
let _ = pending.insert(handle.id());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue