summaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2/egl_dri2.h
diff options
context:
space:
mode:
authorDaniel Stone <[email protected]>2017-05-05 14:49:09 +0100
committerDaniel Stone <[email protected]>2017-05-19 09:36:15 +0100
commit03dd9a88b0be17ff0ce91e92f6902a9a85ba584a (patch)
tree978da64dd573c4a85bc43002dc525ade89482abd /src/egl/drivers/dri2/egl_dri2.h
parent8118bc269f39ea0b965752ea89b886b28094db42 (diff)
egl/wayland: Use per-surface event queues
During display initialisation, we need a separate event queue to handle the registry events, which is correctly handled. But we also need separate per-surface event queues to handle swapchain-related events, such as surface frame events and buffer release events. This avoids two surfaces from the same EGLDisplay, both current on separate threads, dispatching each other's events. Create separate per-surface event queues, create wl_surface and wl_drm proxy wrapper objects per surface, so we eliminate the race around sending events to the wrong queue. swrast buffers do not need a dedicated proxy wrapper, as the wl_shm_pool used to create the wl_buffers, being transient, can itself be assigned to a queue. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Fixes: 36b9976e1f99 ("egl/wayland: Avoid race conditions when on non-main thread") Cc: [email protected]
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.h')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index b1e224248cc..b3d48488494 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -256,6 +256,10 @@ struct dri2_egl_surface
struct wl_egl_window *wl_win;
int dx;
int dy;
+ struct wl_event_queue *wl_queue;
+ struct wl_surface *wl_surface_wrapper;
+ struct wl_display *wl_dpy_wrapper;
+ struct wl_drm *wl_drm_wrapper;
struct wl_callback *throttle_callback;
int format;
#endif