aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTina Zhang <tina.zhang@intel.com>2018-04-27 17:11:05 +0800
committerGerd Hoffmann <kraxel@redhat.com>2018-04-27 11:36:34 +0200
commit7cd0afe69f3330a104b1462c01156dd8525b9bdd (patch)
tree5ac5e5e6f12ad673a3e25d834f6c10da99d7f3d5
parent4867e47cb637c6f3549786f1be70793112f96713 (diff)
console: introduce dpy_gfx_update_full
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>
-rw-r--r--include/ui/console.h1
-rw-r--r--ui/console.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/include/ui/console.h b/include/ui/console.h
index 37a8d68d29..981b519dde 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -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);
diff --git a/ui/console.c b/ui/console.c
index 3fb2f4e09f..b02510cdca 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -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)
{