diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-06-06 15:56:48 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-06-27 17:08:56 +0200 |
commit | 48dddba1763b2134e81ae6765b19184fd907f142 (patch) | |
tree | b5f36f8731fba249420918394f3bca54e5c1bfc0 /ui/dbus-display1.xml | |
parent | 9462ff4695aa0d086fd63f7f2efafe5a05f2a243 (diff) | |
download | qemu-48dddba1763b2134e81ae6765b19184fd907f142.zip qemu-48dddba1763b2134e81ae6765b19184fd907f142.tar.gz qemu-48dddba1763b2134e81ae6765b19184fd907f142.tar.bz2 |
ui/dbus: use shared memory when possible on win32
When the display surface has an associated HANDLE, we can duplicate it
to the client process and let it map the memory to avoid expensive copies.
Introduce two new win32-specific methods ScanoutMap and UpdateMap. The
first is used to inform the listener about the a shared map
availability, and the second for display updates.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230606115658.677673-12-marcandre.lureau@redhat.com>
Diffstat (limited to 'ui/dbus-display1.xml')
-rw-r--r-- | ui/dbus-display1.xml | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/ui/dbus-display1.xml b/ui/dbus-display1.xml index 06e8779..7233286 100644 --- a/ui/dbus-display1.xml +++ b/ui/dbus-display1.xml @@ -370,9 +370,7 @@ </arg> </method> - <?if $(env.TARGETOS) == windows?> - <!-- Add shared memory/texture support --> - <?else?> + <?if $(env.TARGETOS) != windows?> <!-- ScanoutDMABUF: @dmabuf: the DMABUF file descriptor. @@ -472,6 +470,50 @@ </interface> <!-- + org.qemu.Display1.Listener.Win32.Map: + + This client-side interface can complement org.qemu.Display1.Listener on + ``/org/qemu/Display1/Listener`` for Windows specific methods. + --> + <interface name="org.qemu.Display1.Listener.Win32.Map"> + <!-- + ScanoutMap: + @handle: the shared map handle value. + @offset: mapping offset. + @width: display width, in pixels. + @height: display height, in pixels. + @stride: stride, in bytes. + @pixman_format: image format (ex: ``PIXMAN_X8R8G8B8``). + + Resize and update the display content with a shared map. + --> + <method name="ScanoutMap"> + <arg type="t" name="handle" direction="in"/> + <arg type="u" name="offset" direction="in"/> + <arg type="u" name="width" direction="in"/> + <arg type="u" name="height" direction="in"/> + <arg type="u" name="stride" direction="in"/> + <arg type="u" name="pixman_format" direction="in"/> + </method> + + <!-- + UpdateMap: + @x: the X update position, in pixels. + @y: the Y update position, in pixels. + @width: the update width, in pixels. + @height: the update height, in pixels. + + Update the display content with the current shared map and the given region. + --> + <method name="UpdateMap"> + <arg type="i" name="x" direction="in"/> + <arg type="i" name="y" direction="in"/> + <arg type="i" name="width" direction="in"/> + <arg type="i" name="height" direction="in"/> + </method> + </interface> + + <!-- org.qemu.Display1.Clipboard: This interface must be implemented by both the client and the server on |