From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTuRh-0003Ss-Rq for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:04:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTuRb-0005qj-Ts for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:04:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTuRb-0005q4-Lm for qemu-devel@nongnu.org; Thu, 01 Nov 2012 09:04:23 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qA1D4NSw006066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 1 Nov 2012 09:04:23 -0400 From: Gerd Hoffmann Date: Thu, 1 Nov 2012 14:04:12 +0100 Message-Id: <1351775057-3938-18-git-send-email-kraxel@redhat.com> In-Reply-To: <1351775057-3938-1-git-send-email-kraxel@redhat.com> References: <1351775057-3938-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 17/22] vga: stop direct access to DisplaySurface fields. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/vga.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index f31dbdd..1188463 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -1709,8 +1709,13 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) s->last_depth = depth; full_update = 1; } else if (is_buffer_shared(s->ds->surface) && - (full_update || s->ds->surface->data != s->vram_ptr + (s->start_addr * 4))) { - s->ds->surface->data = s->vram_ptr + (s->start_addr * 4); + (full_update || ds_get_data(s->ds) != s->vram_ptr + + (s->start_addr * 4))) { + qemu_free_displaysurface(s->ds); + s->ds->surface = qemu_create_displaysurface_from(disp_width, + height, depth, + s->line_offset, + s->vram_ptr + (s->start_addr * 4)); dpy_gfx_setdata(s->ds); } -- 1.7.1