mirror of
https://github.com/brl/mutter.git
synced 2025-05-07 15:44:55 +00:00
egl: Add helper for eglBindWaylandDisplayWL
Lets us untangle awkward Cogl setup dependencies. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1863>
This commit is contained in:
parent
ebfeb106bc
commit
5c77b640d4
@ -46,6 +46,7 @@ struct _MetaEgl
|
|||||||
PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR;
|
PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR;
|
||||||
PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR;
|
PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR;
|
||||||
|
|
||||||
|
PFNEGLBINDWAYLANDDISPLAYWL eglBindWaylandDisplayWL;
|
||||||
PFNEGLQUERYWAYLANDBUFFERWL eglQueryWaylandBufferWL;
|
PFNEGLQUERYWAYLANDBUFFERWL eglQueryWaylandBufferWL;
|
||||||
|
|
||||||
PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT;
|
PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT;
|
||||||
@ -699,6 +700,24 @@ meta_egl_swap_buffers (MetaEgl *egl,
|
|||||||
return TRUE;
|
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
|
gboolean
|
||||||
meta_egl_query_wayland_buffer (MetaEgl *egl,
|
meta_egl_query_wayland_buffer (MetaEgl *egl,
|
||||||
EGLDisplay display,
|
EGLDisplay display,
|
||||||
@ -1077,6 +1096,7 @@ meta_egl_constructed (GObject *object)
|
|||||||
GET_EGL_PROC_ADDR (eglCreateImageKHR);
|
GET_EGL_PROC_ADDR (eglCreateImageKHR);
|
||||||
GET_EGL_PROC_ADDR (eglDestroyImageKHR);
|
GET_EGL_PROC_ADDR (eglDestroyImageKHR);
|
||||||
|
|
||||||
|
GET_EGL_PROC_ADDR (eglBindWaylandDisplayWL);
|
||||||
GET_EGL_PROC_ADDR (eglQueryWaylandBufferWL);
|
GET_EGL_PROC_ADDR (eglQueryWaylandBufferWL);
|
||||||
|
|
||||||
GET_EGL_PROC_ADDR (eglQueryDevicesEXT);
|
GET_EGL_PROC_ADDR (eglQueryDevicesEXT);
|
||||||
|
@ -154,6 +154,11 @@ gboolean meta_egl_swap_buffers (MetaEgl *egl,
|
|||||||
EGLSurface surface,
|
EGLSurface surface,
|
||||||
GError **error);
|
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,
|
gboolean meta_egl_query_wayland_buffer (MetaEgl *egl,
|
||||||
EGLDisplay display,
|
EGLDisplay display,
|
||||||
struct wl_resource *buffer,
|
struct wl_resource *buffer,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user