[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 35/36] console: add graphic_hw_update_done()
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH 35/36] console: add graphic_hw_update_done() |
Date: |
Fri, 25 Sep 2015 16:04:03 +0200 |
From: Marc-André Lureau <address@hidden>
Add a function to be called when an async graphic update is done.
Signed-off-by: Marc-André Lureau <address@hidden>
---
hw/display/qxl-render.c | 9 +++++++--
include/ui/console.h | 1 +
ui/console.c | 4 ++++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c
index 54bbf01..a5c9abc 100644
--- a/hw/display/qxl-render.c
+++ b/hw/display/qxl-render.c
@@ -105,7 +105,7 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice
*qxl)
qxl->guest_primary.surface.mem,
MEMSLOT_GROUP_GUEST);
if (!qxl->guest_primary.data) {
- return;
+ goto end;
}
qxl_set_rect_to_surface(qxl, &qxl->dirty[0]);
qxl->num_dirty_rects = 1;
@@ -133,7 +133,7 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice
*qxl)
}
if (!qxl->guest_primary.data) {
- return;
+ goto end;
}
for (i = 0; i < qxl->num_dirty_rects; i++) {
if (qemu_spice_rect_is_empty(qxl->dirty+i)) {
@@ -154,6 +154,11 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice
*qxl)
qxl->dirty[i].bottom - qxl->dirty[i].top);
}
qxl->num_dirty_rects = 0;
+
+end:
+ if (qxl->render_update_cookie_num == 0) {
+ graphic_hw_update_done(qxl->ssd.dcl.con);
+ }
}
/*
diff --git a/include/ui/console.h b/include/ui/console.h
index a14a619..cb41d22 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -311,6 +311,7 @@ void graphic_console_set_hwops(QemuConsole *con,
void *opaque);
bool graphic_hw_update(QemuConsole *con);
+void graphic_hw_update_done(QemuConsole *con);
void graphic_hw_invalidate(QemuConsole *con);
void graphic_hw_text_update(QemuConsole *con, console_ch_t *chardata);
diff --git a/ui/console.c b/ui/console.c
index 47352ef..1f800ef 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -250,6 +250,10 @@ static void gui_setup_refresh(DisplayState *ds)
ds->have_text = have_text;
}
+void graphic_hw_update_done(QemuConsole *con)
+{
+}
+
bool graphic_hw_update(QemuConsole *con)
{
if (!con) {
--
2.4.3
- [Qemu-devel] [PATCH 24/36] qmp: add QmpClient, (continued)
- [Qemu-devel] [PATCH 24/36] qmp: add QmpClient, marcandre . lureau, 2015/09/25
- [Qemu-devel] [PATCH 26/36] qmp: check that async command have an 'id', marcandre . lureau, 2015/09/25
- [Qemu-devel] [PATCH 27/36] scripts: learn 'async' qapi commands, marcandre . lureau, 2015/09/25
- [Qemu-devel] [PATCH 25/36] qmp: introduce async command type, marcandre . lureau, 2015/09/25
- [Qemu-devel] [PATCH 28/36] scripts: ensure -async commands are declared async, marcandre . lureau, 2015/09/25
- [Qemu-devel] [PATCH 30/36] tests: change /0.15/* tests to /qmp/*, marcandre . lureau, 2015/09/25
- [Qemu-devel] [PATCH 31/36] tests: add /qmp/dispatch_cmd_async test, marcandre . lureau, 2015/09/25
- [Qemu-devel] [PATCH 29/36] qapi: take 'id' from request, marcandre . lureau, 2015/09/25
- [Qemu-devel] [PATCH 34/36] console: graphic_hw_update return true if async, marcandre . lureau, 2015/09/25
- [Qemu-devel] [PATCH 35/36] console: add graphic_hw_update_done(),
marcandre . lureau <=
- [Qemu-devel] [PATCH 33/36] monitor: add 'async' capability, marcandre . lureau, 2015/09/25
- [Qemu-devel] [PATCH 32/36] qmp: update qmp-spec about async capability, marcandre . lureau, 2015/09/25
- [Qemu-devel] [PATCH 36/36] console: add screendump-async, marcandre . lureau, 2015/09/25
- Re: [Qemu-devel] [PATCH 00/36] post-Eric's fixes, QAPI improvements, Markus Armbruster, 2015/09/25
- Re: [Qemu-devel] [PATCH 00/36] post-Eric's fixes, QAPI improvements, Eric Blake, 2015/09/25