[mutter] egl: Add helper for eglBindWaylandDisplayWL
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] egl: Add helper for eglBindWaylandDisplayWL
- Date: Tue, 18 May 2021 14:31:19 +0000 (UTC)
commit 5c77b640d4d4f3d05145cd75baf47c0608d3a5b9
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu May 6 12:11:36 2021 +0200
egl: Add helper for eglBindWaylandDisplayWL
Lets us untangle awkward Cogl setup dependencies.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1863>
src/backends/meta-egl.c | 20 ++++++++++++++++++++
src/backends/meta-egl.h | 5 +++++
2 files changed, 25 insertions(+)
---
diff --git a/src/backends/meta-egl.c b/src/backends/meta-egl.c
index 866bf2dc2b..17c3c5e49d 100644
--- a/src/backends/meta-egl.c
+++ b/src/backends/meta-egl.c
@@ -46,6 +46,7 @@ struct _MetaEgl
PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR;
PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR;
+ PFNEGLBINDWAYLANDDISPLAYWL eglBindWaylandDisplayWL;
PFNEGLQUERYWAYLANDBUFFERWL eglQueryWaylandBufferWL;
PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT;
@@ -699,6 +700,24 @@ meta_egl_swap_buffers (MetaEgl *egl,
return TRUE;
}
+gboolean
+meta_egl_bind_wayland_display (MetaEgl *egl,
+ EGLDisplay display,
+ struct wl_display *wayland_display,
+ GError **error)
+{
+ if (!is_egl_proc_valid (egl->eglBindWaylandDisplayWL, error))
+ return FALSE;
+
+ if (!egl->eglBindWaylandDisplayWL (display, wayland_display))
+ {
+ set_egl_error (error);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
gboolean
meta_egl_query_wayland_buffer (MetaEgl *egl,
EGLDisplay display,
@@ -1077,6 +1096,7 @@ meta_egl_constructed (GObject *object)
GET_EGL_PROC_ADDR (eglCreateImageKHR);
GET_EGL_PROC_ADDR (eglDestroyImageKHR);
+ GET_EGL_PROC_ADDR (eglBindWaylandDisplayWL);
GET_EGL_PROC_ADDR (eglQueryWaylandBufferWL);
GET_EGL_PROC_ADDR (eglQueryDevicesEXT);
diff --git a/src/backends/meta-egl.h b/src/backends/meta-egl.h
index 4591e7d853..fa7741a67c 100644
--- a/src/backends/meta-egl.h
+++ b/src/backends/meta-egl.h
@@ -154,6 +154,11 @@ gboolean meta_egl_swap_buffers (MetaEgl *egl,
EGLSurface surface,
GError **error);
+gboolean meta_egl_bind_wayland_display (MetaEgl *egl,
+ EGLDisplay display,
+ struct wl_display *wayland_display,
+ GError **error);
+
gboolean meta_egl_query_wayland_buffer (MetaEgl *egl,
EGLDisplay display,
struct wl_resource *buffer,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]