summary refs log tree commit diff stats
path: root/ui/dbus-console.c
diff options
context:
space:
mode:
authorDongwon Kim <dongwon.kim@intel.com>2024-05-08 10:54:00 -0700
committerMarc-André Lureau <marcandre.lureau@redhat.com>2024-05-14 17:14:12 +0400
commit6779a3076f295fafe52d43049fa954426c1d594a (patch)
treef597be01a3c687237e25be02461684cfbb7092eb /ui/dbus-console.c
parent6e6ae491dad9a7ba813c7f1e70ce972c35c2d4ab (diff)
downloadfocaccia-qemu-6779a3076f295fafe52d43049fa954426c1d594a.tar.gz
focaccia-qemu-6779a3076f295fafe52d43049fa954426c1d594a.zip
ui/console: Use qemu_dmabuf_get_..() helpers instead
This commit updates all instances where fields within the QemuDmaBuf
struct are directly accessed, replacing them with calls to these new
helper functions.

v6: fix typos in helper names in ui/spice-display.c

v7: removed prefix, "dpy_gl_" from all helpers

v8: Introduction of helpers was removed as those were already added
    by the previous commit

v11: -- Use new qemu_dmabuf_close() instead of close(qemu_dmabuf_get_fd()).
        (Daniel P. Berrangé <berrange@redhat.com>)
     -- Use new qemu_dmabuf_dup_fd() instead of dup(qemu_dmabuf_get_fd()).
        (Daniel P. Berrangé <berrange@redhat.com>)

Suggested-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20240508175403.3399895-4-dongwon.kim@intel.com>
Diffstat (limited to 'ui/dbus-console.c')
-rw-r--r--ui/dbus-console.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ui/dbus-console.c b/ui/dbus-console.c
index 49da9ccc83..578b67f62b 100644
--- a/ui/dbus-console.c
+++ b/ui/dbus-console.c
@@ -110,11 +110,14 @@ static void
 dbus_gl_scanout_dmabuf(DisplayChangeListener *dcl,
                        QemuDmaBuf *dmabuf)
 {
+    uint32_t width, height;
+
     DBusDisplayConsole *ddc = container_of(dcl, DBusDisplayConsole, dcl);
 
-    dbus_display_console_set_size(ddc,
-                                  dmabuf->width,
-                                  dmabuf->height);
+    width = qemu_dmabuf_get_width(dmabuf);
+    height = qemu_dmabuf_get_height(dmabuf);
+
+    dbus_display_console_set_size(ddc, width, height);
 }
 
 static void