Merge pull request #2386 from querielo/kirill/multithread

Use multiple drawing workers for image_with_options rendering
This commit is contained in:
Matthias Köfferlein 2026-07-12 00:16:24 +02:00 committed by GitHub
commit 7f600cc24c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -855,7 +855,9 @@ LayoutCanvas::image_with_options (unsigned int width, unsigned int height, int l
lay::RedrawThread redraw_thread (&rd_canvas, mp_view);
// render the layout
redraw_thread.start (0 /*synchronous*/, m_layers, vp, resolution, font_resolution, true);
int workers = mp_view->synchronous () ? 0 : mp_view->drawing_workers ();
redraw_thread.start (workers, m_layers, vp, resolution, font_resolution, true);
redraw_thread.wait ();
redraw_thread.stop (); // safety
// paint the background objects. It uses "img" to paint on.