summary refs log tree commit diff stats
path: root/ui/console.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-02-04 14:52:24 +0400
committerGerd Hoffmann <kraxel@redhat.com>2021-02-04 15:58:54 +0100
commitd0e137bc9ac9447e669879db4f59eb7f9f961383 (patch)
tree171f6489a12c6ff6554b8aa02d1a312c5047607d /ui/console.c
parenta7dfbe289ede8adb253d735daef88a39709053dc (diff)
downloadfocaccia-qemu-d0e137bc9ac9447e669879db4f59eb7f9f961383.tar.gz
focaccia-qemu-d0e137bc9ac9447e669879db4f59eb7f9f961383.zip
ui: add a DCLOps callback to check dmabuf support
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210204105232.834642-13-marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/console.c')
-rw-r--r--ui/console.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/console.c b/ui/console.c
index b5bc3f7699..a645418ada 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1463,6 +1463,19 @@ bool console_has_gl(QemuConsole *con)
     return con->gl != NULL;
 }
 
+static bool displaychangelistener_has_dmabuf(DisplayChangeListener *dcl)
+{
+    if (dcl->ops->dpy_has_dmabuf) {
+        return dcl->ops->dpy_has_dmabuf(dcl);
+    }
+
+    if (dcl->ops->dpy_gl_scanout_dmabuf) {
+        return true;
+    }
+
+    return false;
+}
+
 void register_displaychangelistener(DisplayChangeListener *dcl)
 {
     static const char nodev[] =