mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
egl: Add EGL_WL_wayland_eglstream helpers
These are to replace the file descriptor hack currently in use. https://bugzilla.gnome.org/show_bug.cgi?id=773629
This commit is contained in:
parent
139bed73f8
commit
0a826da330
@ -93,4 +93,9 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC) (EGLDi
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEATTRIBNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list);
|
||||
#endif /* EGL_NV_stream_attrib */
|
||||
|
||||
#ifndef EGL_WL_wayland_eglstream
|
||||
#define EGL_WL_wayland_eglstream 1
|
||||
#define EGL_WAYLAND_EGLSTREAM_WL 0x334B
|
||||
#endif /* EGL_WL_wayland_eglstream */
|
||||
|
||||
#endif /* META_EGL_EXT_H */
|
||||
|
@ -56,6 +56,8 @@ struct _MetaEgl
|
||||
PFNEGLDESTROYSTREAMKHRPROC eglDestroyStreamKHR;
|
||||
PFNEGLQUERYSTREAMKHRPROC eglQueryStreamKHR;
|
||||
|
||||
PFNEGLCREATESTREAMATTRIBNVPROC eglCreateStreamAttribNV;
|
||||
|
||||
PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC eglCreateStreamProducerSurfaceKHR;
|
||||
|
||||
PFNEGLSTREAMCONSUMEROUTPUTEXTPROC eglStreamConsumerOutputEXT;
|
||||
@ -576,6 +578,27 @@ meta_egl_query_stream (MetaEgl *egl,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
EGLStreamKHR
|
||||
meta_egl_create_stream_attrib (MetaEgl *egl,
|
||||
EGLDisplay display,
|
||||
const EGLAttrib *attrib_list,
|
||||
GError **error)
|
||||
{
|
||||
EGLStreamKHR stream;
|
||||
|
||||
if (!is_egl_proc_valid (egl->eglCreateStreamAttribNV, error))
|
||||
return FALSE;
|
||||
|
||||
stream = egl->eglCreateStreamAttribNV (display, attrib_list);
|
||||
if (stream == EGL_NO_STREAM_KHR)
|
||||
{
|
||||
set_egl_error (error);
|
||||
return EGL_NO_STREAM_KHR;
|
||||
}
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
EGLSurface
|
||||
meta_egl_create_stream_producer_surface (MetaEgl *egl,
|
||||
EGLDisplay display,
|
||||
@ -729,6 +752,8 @@ meta_egl_constructed (GObject *object)
|
||||
GET_EGL_PROC_ADDR (eglDestroyStreamKHR);
|
||||
GET_EGL_PROC_ADDR (eglQueryStreamKHR);
|
||||
|
||||
GET_EGL_PROC_ADDR (eglCreateStreamAttribNV);
|
||||
|
||||
GET_EGL_PROC_ADDR (eglCreateStreamProducerSurfaceKHR);
|
||||
|
||||
GET_EGL_PROC_ADDR (eglStreamConsumerOutputEXT);
|
||||
|
@ -129,6 +129,11 @@ gboolean meta_egl_query_stream (MetaEgl *egl,
|
||||
EGLint *value,
|
||||
GError **error);
|
||||
|
||||
EGLStreamKHR meta_egl_create_stream_attrib (MetaEgl *egl,
|
||||
EGLDisplay display,
|
||||
const EGLAttrib *attrib_list,
|
||||
GError **error);
|
||||
|
||||
EGLSurface meta_egl_create_stream_producer_surface (MetaEgl *egl,
|
||||
EGLDisplay display,
|
||||
EGLConfig config,
|
||||
|
Loading…
Reference in New Issue
Block a user