Hi all,

I have a Wayland client where the main loop runs on a thread and
rendering is done in a separate thread. The main loop simply uses
wl_display_dispatch:

while (wl_display_dispatch(globals.display) != -1) {
    [...process user input...]
}

This is the only place where events are processed.

Rendering however is done on a separate thread, which eventually ends
up calling:

wl_surface_attach(surface, buffer, 0, 0);
wl_surface_damage(surface, x, y, width, height);
wl_surface_commit(surface);
wl_display_flush(display);

Is this safe or do I need to do any additional locking / synchronization?

Thank you,

Guillermo Rodriguez Garcia
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to