[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/14] spice: add scanout_dmabuf support
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 12/14] spice: add scanout_dmabuf support |
Date: |
Mon, 12 Mar 2018 10:14:03 +0100 |
Add support for scanout dmabufs. Just
pass them through to spice-server.
Signed-off-by: Gerd Hoffmann <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-id: address@hidden
---
ui/spice-display.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 79ea4df02c..4c33c92ae5 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -936,6 +936,20 @@ static void
qemu_spice_gl_scanout_texture(DisplayChangeListener *dcl,
ssd->have_scanout = true;
}
+static void qemu_spice_gl_scanout_dmabuf(DisplayChangeListener *dcl,
+ QemuDmaBuf *dmabuf)
+{
+ SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl);
+
+ /* note: spice server will close the fd, so hand over a dup */
+ spice_qxl_gl_scanout(&ssd->qxl, dup(dmabuf->fd),
+ dmabuf->width, dmabuf->height,
+ dmabuf->stride, dmabuf->fourcc, false);
+ qemu_spice_gl_monitor_config(ssd, 0, 0, dmabuf->width, dmabuf->height);
+ ssd->have_surface = false;
+ ssd->have_scanout = true;
+}
+
static void qemu_spice_gl_update(DisplayChangeListener *dcl,
uint32_t x, uint32_t y, uint32_t w, uint32_t
h)
{
@@ -969,6 +983,7 @@ static const DisplayChangeListenerOps
display_listener_gl_ops = {
.dpy_gl_scanout_disable = qemu_spice_gl_scanout_disable,
.dpy_gl_scanout_texture = qemu_spice_gl_scanout_texture,
+ .dpy_gl_scanout_dmabuf = qemu_spice_gl_scanout_dmabuf,
.dpy_gl_update = qemu_spice_gl_update,
};
--
2.9.3
- [Qemu-devel] [PULL 03/14] sdl: workaround bug in sdl 2.0.8 headers, (continued)
- [Qemu-devel] [PULL 03/14] sdl: workaround bug in sdl 2.0.8 headers, Gerd Hoffmann, 2018/03/12
- [Qemu-devel] [PULL 01/14] build: try improve handling of clang warnings, Gerd Hoffmann, 2018/03/12
- [Qemu-devel] [PULL 09/14] ui/gtk-egl: add cursor_dmabuf support, Gerd Hoffmann, 2018/03/12
- [Qemu-devel] [PULL 10/14] vnc: deal with surface NULL pointers, Gerd Hoffmann, 2018/03/12
- [Qemu-devel] [PULL 07/14] ui/gtk: use GtkGlArea on wayland only, Gerd Hoffmann, 2018/03/12
- [Qemu-devel] [PULL 05/14] ui/gtk: group gtk.mo declarations in Makefile, Gerd Hoffmann, 2018/03/12
- [Qemu-devel] [PULL 14/14] qapi: Add device ID and head parameters to screendump, Gerd Hoffmann, 2018/03/12
- [Qemu-devel] [PULL 06/14] ui/opengl: Makefile cleanup, Gerd Hoffmann, 2018/03/12
- [Qemu-devel] [PULL 08/14] ui/gtk-egl: add scanout_dmabuf support, Gerd Hoffmann, 2018/03/12
- [Qemu-devel] [PULL 11/14] spice: drop dprint() debug logging, Gerd Hoffmann, 2018/03/12
- [Qemu-devel] [PULL 12/14] spice: add scanout_dmabuf support,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 04/14] ui/gtk: make GtkGlArea usage a runtime option, Gerd Hoffmann, 2018/03/12
- [Qemu-devel] [PULL 13/14] spice: add cursor_dmabuf support, Gerd Hoffmann, 2018/03/12
- Re: [Qemu-devel] [PULL 00/14] Ui 20180312 patches, Peter Maydell, 2018/03/12