summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2014-06-12 16:52:53 +0300
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2015-08-14 15:53:26 +0300
commit5ffb440c3fe19669de73e51b90ea337fa2d5ae78 (patch)
tree69bc3b0624041f4c507c7b938d988371f4be76d2
parenta3525802853e4f47840e6432970ebe17ad66886f (diff)
compositor-x11: init linux_dmabuf support
v2 changes: - only initialize linux_dmabuf if renderer supports it Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>
-rw-r--r--src/compositor-x11.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 73ba783f..1c53e3b5 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -56,6 +56,7 @@
#include "shared/helpers.h"
#include "shared/image-loader.h"
#include "presentation_timing-server-protocol.h"
+#include "linux-dmabuf.h"
#define DEFAULT_AXIS_STEP_DISTANCE wl_fixed_from_int(10)
@@ -1665,7 +1666,14 @@ x11_backend_create(struct weston_compositor *compositor,
x11_backend_handle_event, b);
wl_event_source_check(b->xcb_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_x11_input: