1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 14:49:06 -04:00
Files
egui/crates
lucasmerlin b25139074e Speed up egui-wgpu screenshot readback
The map_async callback fires on the render thread inside Queue::submit,
so its CPU work (pixel swizzle + buffer copy) blocks the next frame's
GPU dispatch. Move the swizzle/send to a dedicated worker thread so
submit returns immediately. On wasm (no real threads, !Send Buffer) keep
the work inline.

While there, replace the per-byte runtime-indexed swizzle loop with
chunks_exact and constant indices so LLVM can autovectorize, and add a
fast path for Rgba8Unorm that just bytemuck::cast_slice's each row
straight into the Vec<Color32>.
2026-05-22 11:37:53 +02:00
..
2026-05-18 18:25:26 +02:00