1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 14:49:06 -04:00

Make ImageLoader use background thread (#5394)

This is the same change as in #4069 but as this is stale I wanted to
reopen a non stale PR

Modifies ImageLoader's load function to use background threads for the
image decoding work. This avoids blocking the main thread that is
especially noticeable when loading many images at once.

This was modelled after the other loader implementations that also use
threads.

* Closes <https://github.com/emilk/egui/issues/5375>
* [x] I have followed the instructions in the PR template

---------

Co-authored-by: lucasmerlin <lucasmeurer96@gmail.com>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
Nicolas
2025-03-25 10:17:31 +01:00
committed by GitHub
parent 58b2ac88c0
commit 2024295f78
3 changed files with 75 additions and 25 deletions

View File

@@ -57,7 +57,7 @@ skip = [
{ name = "redox_syscall" }, # old version via winit
{ name = "thiserror" }, # ecosystem is in the process of migrating from 1.x to 2.x
{ name = "thiserror-impl" }, # same as above
{ name = "time" }, # old version pulled in by unmaintianed crate 'chrono'
{ name = "time" }, # old version pulled in by unmaintained crate 'chrono'
{ name = "windows-core" }, # Chrono pulls in 0.51, accesskit uses 0.58.0
{ name = "windows-sys" }, # glutin pulls in 0.52.0, accesskit pulls in 0.59.0, rfd pulls 0.48, webbrowser pulls 0.45.0 (via jni)
]