[PATCH] compositor-wayland: Expose zlinux_dmabuf when it is available in the parent compositor

Emmanuel Gil Peyrot emmanuel.peyrot at collabora.com
Fri Sep 25 01:14:19 PDT 2015


This mirrors what 5ffb440c3fe19669de73e51b90ea337fa2d5ae78 did for
compositor-x11, and allows testing without having to restart the
compositor-drm everytime.
---
 src/compositor-wayland.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index f6c84d4..900c331 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -48,6 +48,7 @@
 #include "shared/cairo-util.h"
 #include "fullscreen-shell-client-protocol.h"
 #include "presentation_timing-server-protocol.h"
+#include "linux-dmabuf.h"
 
 #define WINDOW_TITLE "Weston Compositor"
 
@@ -2022,6 +2023,12 @@ wayland_backend_create(struct weston_compositor *compositor, int use_pixman,
 
 	wl_event_source_check(b->parent.wl_source);
 
+	if (compositor->renderer->import_dmabuf) {
+		if (linux_dmabuf_setup(compositor) < 0)
+			weston_log("Error: initializing dmabuf "
+			           "support failed.\n");
+	}
+
 	compositor->backend = &b->base;
 	return b;
 err_display:
-- 
2.4.2



More information about the wayland-devel mailing list