<div dir="ltr"><div>I am porting a multi-threaded UI toolkit to Weston (layered on top of toytoolkit), and running into an issue.  This UI toolkit expects to be able to draw from multiple threads, to be specific, from a different thread than the one that called display_run() -- i.e. not from a widget_redraw_handler_t function or the like.</div><div><br></div><div>Just a single call to widget_cairo_create() from another thread, even if nothing is done with the returned context, is enough to trigger a crash.  The crash always manifests the same way: leaf->cairo_surface is NULL in shm_surface_swap(), resulting in cairo_image_surface_get_width() triggering a segfault.</div><div><br></div><div>The call stack looks like this:</div><div>cairo_image_surface_get_width</div><div>shm_surface_swap</div><div>surface_flush</div><div>window_flush</div><div>run_deferred_tasks</div><div><display loop function></div><div><br></div><div>Any help would be appreciated!<br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Thanks,<br>
Bill Hayden<br></div></div>