summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2018-06-11 09:21:08 +0200
committerAdam Jackson <ajax@redhat.com>2018-06-21 10:54:10 -0400
commit92daeb31fa3235dc791e0444b072ec4bbc6e35ab (patch)
treee8c125aa6d33b89d3a45fc41e4b3a9fbcbf83f3b
parent792359057bd54548555674d2d309c0cfeebac12d (diff)
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>
-rw-r--r--hw/xwayland/xwayland-glamor.c8
-rw-r--r--hw/xwayland/xwayland.h6
2 files changed, 3 insertions, 11 deletions
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 61418e707..f17914344 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -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 *
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
index dc01c747c..d70ad54bf 100644
--- a/hw/xwayland/xwayland.h
+++ b/hw/xwayland/xwayland.h
@@ -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);