console: introduce dpy_gfx_update_full
authorTina Zhang <tina.zhang@intel.com>
Fri, 27 Apr 2018 09:11:05 +0000 (17:11 +0800)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 27 Apr 2018 09:36:34 +0000 (11:36 +0200)
dpy_gfx_update_full is used to do the whole display surface update.

This function is proposed by Gerd Hoffmann.

Signed-off-by: Tina Zhang <tina.zhang@intel.com>
Message-id: 1524820266-27079-2-git-send-email-tina.zhang@intel.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
include/ui/console.h
ui/console.c

index 37a8d68d29c6ed0c08213ec6699b147f244085a4..981b519ddec456596d9d9a5fcb3d4de4dd0a87a3 100644 (file)
@@ -291,6 +291,7 @@ bool dpy_ui_info_supported(QemuConsole *con);
 int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info);
 
 void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h);
+void dpy_gfx_update_full(QemuConsole *con);
 void dpy_gfx_replace_surface(QemuConsole *con,
                              DisplaySurface *surface);
 void dpy_text_cursor(QemuConsole *con, int x, int y);
index 3fb2f4e09f1ba3b2461911c617a597db11899299..b02510cdca843555ce090012838c9db1af43faf8 100644 (file)
@@ -1574,6 +1574,16 @@ void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h)
     }
 }
 
+void dpy_gfx_update_full(QemuConsole *con)
+{
+    if (!con->surface) {
+        return;
+    }
+    dpy_gfx_update(con, 0, 0,
+                   surface_width(con->surface),
+                   surface_height(con->surface));
+}
+
 void dpy_gfx_replace_surface(QemuConsole *con,
                              DisplaySurface *surface)
 {