xwayland: mandatory EGL backend API
The API init_wl_registry() and has_wl_interfaces() are marked as being optional, but both GBM And EGLStream backends implement them so there is point in keeping those optional. Suggested-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
parent
792359057b
commit
92daeb31fa
|
@ -72,14 +72,12 @@ xwl_glamor_init_wl_registry(struct xwl_screen *xwl_screen,
|
|||
uint32_t version)
|
||||
{
|
||||
if (xwl_screen->gbm_backend.is_available &&
|
||||
xwl_screen->gbm_backend.init_wl_registry &&
|
||||
xwl_screen->gbm_backend.init_wl_registry(xwl_screen,
|
||||
registry,
|
||||
id,
|
||||
interface,
|
||||
version)); /* no-op */
|
||||
else if (xwl_screen->eglstream_backend.is_available &&
|
||||
xwl_screen->eglstream_backend.init_wl_registry &&
|
||||
xwl_screen->eglstream_backend.init_wl_registry(xwl_screen,
|
||||
registry,
|
||||
id,
|
||||
|
@ -91,11 +89,7 @@ Bool
|
|||
xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen,
|
||||
struct xwl_egl_backend *xwl_egl_backend)
|
||||
{
|
||||
if (xwl_egl_backend->has_wl_interfaces)
|
||||
return xwl_egl_backend->has_wl_interfaces(xwl_screen);
|
||||
|
||||
/* If the backend has no requirement wrt WL interfaces, we're fine */
|
||||
return TRUE;
|
||||
return xwl_egl_backend->has_wl_interfaces(xwl_screen);
|
||||
}
|
||||
|
||||
struct wl_buffer *
|
||||
|
|
|
@ -64,16 +64,14 @@ struct xwl_egl_backend {
|
|||
Bool is_available;
|
||||
|
||||
/* Called once for each interface in the global registry. Backends
|
||||
* should use this to bind to any wayland interfaces they need. This
|
||||
* callback is optional.
|
||||
* should use this to bind to any wayland interfaces they need.
|
||||
*/
|
||||
Bool (*init_wl_registry)(struct xwl_screen *xwl_screen,
|
||||
struct wl_registry *wl_registry,
|
||||
uint32_t id, const char *name,
|
||||
uint32_t version);
|
||||
|
||||
/* Check that the required Wayland interfaces are available. This
|
||||
* callback is optional.
|
||||
/* Check that the required Wayland interfaces are available.
|
||||
*/
|
||||
Bool (*has_wl_interfaces)(struct xwl_screen *xwl_screen);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user