The zero-copy VAAPI export previously rendered one frame per egui repaint on the UI thread, which pinned throughput to the 60Hz vsync of the present loop (measured exactly 16ms/frame) -- so the near-free hardware encode bought nothing. Because the export runs on its own VAAPI device (independent of eframe), it can run entirely off the UI thread. - run_zerocopy_video_export: a background thread owning the encoder + its own vello renderer/device, a Document snapshot (Document is Clone+Send; the UI keeps the live one), its own ImageCache, and a RasterStore clone. Renders + hardware-encodes every frame and reports through the same video_progress channel the software encoder thread uses. - start_video_with_audio_export takes the document/video_manager/raster_store/ container_path to seed the thread; video_state is None for this path. - Throttle export-time UI repaints (~6Hz) and the thread's progress sends so the render thread keeps the cores; the breakdown print stays. - cancel() tears down parallel_export (detaches threads, removes temp files) so the progress dialog dismisses; the call site closes the dialog. - Gate the progress poll loop on has_pending_progress() so it stops once the export ends instead of polling/logging every repaint forever; the single export path clears its channel on the terminal event. Vsync overhead is gone (0.1ms/frame); export is now render-bound (~11ms/frame Vello scene-build). ~1:50 -> ~56s (~2x) on the validation clip. |
||
|---|---|---|
| .. | ||
| beamdsp | ||
| egui_node_graph2 | ||
| gpu-video-encoder | ||
| lightningbeam-core | ||
| lightningbeam-editor | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| build-static.sh | ||
| build-windows.bat | ||