mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
MetaWaylandEglStream: Use EGL_WL_wayland_eglstream instead of fd hack
Use the proposed EGL_WL_wayland_eglstream EGL extension instead of the file descriptor hack that was used as a temporary solution. Note that this results in EGL clients will no longer work if they are running on a Nvidia driver with a version older than 370. https://bugzilla.gnome.org/show_bug.cgi?id=773629
This commit is contained in:
@ -66,8 +66,6 @@ struct _MetaEgl
|
||||
|
||||
PFNEGLSTREAMCONSUMERACQUIREKHRPROC eglStreamConsumerAcquireKHR;
|
||||
PFNEGLSTREAMCONSUMERACQUIREATTRIBNVPROC eglStreamConsumerAcquireAttribNV;
|
||||
|
||||
PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC eglCreateStreamFromFileDescriptorKHR;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (MetaEgl, meta_egl, G_TYPE_OBJECT)
|
||||
@ -699,27 +697,6 @@ meta_egl_stream_consumer_acquire (MetaEgl *egl,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
EGLStreamKHR
|
||||
meta_egl_create_stream_from_file_descriptor (MetaEgl *egl,
|
||||
EGLDisplay display,
|
||||
EGLNativeFileDescriptorKHR file_descriptor,
|
||||
GError **error)
|
||||
{
|
||||
EGLStreamKHR stream;
|
||||
|
||||
if (!is_egl_proc_valid (egl->eglCreateStreamFromFileDescriptorKHR, error))
|
||||
return EGL_NO_STREAM_KHR;
|
||||
|
||||
stream = egl->eglCreateStreamFromFileDescriptorKHR (display, file_descriptor);
|
||||
if (stream == EGL_NO_STREAM_KHR)
|
||||
{
|
||||
set_egl_error (error);
|
||||
return EGL_NO_STREAM_KHR;
|
||||
}
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
#define GET_EGL_PROC_ADDR(proc) \
|
||||
egl->proc = (void *) eglGetProcAddress (#proc);
|
||||
|
||||
@ -762,8 +739,6 @@ meta_egl_constructed (GObject *object)
|
||||
|
||||
GET_EGL_PROC_ADDR (eglStreamConsumerAcquireKHR);
|
||||
GET_EGL_PROC_ADDR (eglStreamConsumerAcquireAttribNV);
|
||||
|
||||
GET_EGL_PROC_ADDR (eglCreateStreamFromFileDescriptorKHR);
|
||||
}
|
||||
|
||||
#undef GET_EGL_PROC_ADDR
|
||||
|
@ -163,9 +163,4 @@ gboolean meta_egl_stream_consumer_gl_texture_external (MetaEgl *egl,
|
||||
EGLStreamKHR stream,
|
||||
GError **error);
|
||||
|
||||
EGLStreamKHR meta_egl_create_stream_from_file_descriptor (MetaEgl *egl,
|
||||
EGLDisplay display,
|
||||
EGLNativeFileDescriptorKHR file_descriptor,
|
||||
GError **error);
|
||||
|
||||
#endif /* META_EGL_H */
|
||||
|
Reference in New Issue
Block a user