Received: from eggs.gnu.org ([2001:4830:134:3::10]:56783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btWot-0002x9-9Z for qemu-devel@nongnu.org; Mon, 10 Oct 2016 05:24:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btWor-0003pa-1c for qemu-devel@nongnu.org; Mon, 10 Oct 2016 05:24:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btWoq-0003pN-Rv for qemu-devel@nongnu.org; Mon, 10 Oct 2016 05:24:24 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6C5F58DFFE for ; Mon, 10 Oct 2016 09:24:24 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 10 Oct 2016 13:22:59 +0400 Message-Id: <20161010092301.14974-23-marcandre.lureau@redhat.com> In-Reply-To: <20161010092301.14974-1-marcandre.lureau@redhat.com> References: <20161010092301.14974-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 22/24] console: add graphic_hw_update_done() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: eblake@redhat.com, berrange@redhat.com, armbru@redhat.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Add a function to be called when an async graphic update is done. Signed-off-by: Marc-Andr=C3=A9 Lureau --- hw/display/qxl-render.c | 9 +++++++-- ui/console.c | 4 ++++ include/ui/console.h | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index 50a0191..8341f58 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -106,7 +106,7 @@ static void qxl_render_update_area_unlocked(PCIQXLDev= ice *qxl) qxl->guest_primary.surfa= ce.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 =3D 1; @@ -134,7 +134,7 @@ static void qxl_render_update_area_unlocked(PCIQXLDev= ice *qxl) } =20 if (!qxl->guest_primary.data) { - return; + goto end; } for (i =3D 0; i < qxl->num_dirty_rects; i++) { if (qemu_spice_rect_is_empty(qxl->dirty+i)) { @@ -155,6 +155,11 @@ static void qxl_render_update_area_unlocked(PCIQXLDe= vice *qxl) qxl->dirty[i].bottom - qxl->dirty[i].top); } qxl->num_dirty_rects =3D 0; + +end: + if (qxl->render_update_cookie_num =3D=3D 0) { + graphic_hw_update_done(qxl->ssd.dcl.con); + } } =20 /* diff --git a/ui/console.c b/ui/console.c index 392d7c7..7ca5d19 100644 --- a/ui/console.c +++ b/ui/console.c @@ -253,6 +253,10 @@ static void gui_setup_refresh(DisplayState *ds) ds->have_text =3D have_text; } =20 +void graphic_hw_update_done(QemuConsole *con) +{ +} + bool graphic_hw_update(QemuConsole *con) { if (!con) { diff --git a/include/ui/console.h b/include/ui/console.h index 772b9db..fd9f648 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -377,6 +377,7 @@ void graphic_console_set_hwops(QemuConsole *con, void *opaque); =20 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); void graphic_hw_gl_block(QemuConsole *con, bool block); --=20 2.10.0