From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K03sl-0000NO-P5 for qemu-devel@nongnu.org; Sat, 24 May 2008 20:14:39 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K03sk-0000NC-De for qemu-devel@nongnu.org; Sat, 24 May 2008 20:14:38 -0400 Received: from [199.232.76.173] (port=59560 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K03sk-0000N9-7y for qemu-devel@nongnu.org; Sat, 24 May 2008 20:14:38 -0400 Received: from savannah.gnu.org ([199.232.41.3]:57203 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1K03sk-0005MR-7a for qemu-devel@nongnu.org; Sat, 24 May 2008 20:14:38 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1K03si-0001Jz-PS for qemu-devel@nongnu.org; Sun, 25 May 2008 00:14:37 +0000 Received: from balrog by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1K03si-0001Jt-4K for qemu-devel@nongnu.org; Sun, 25 May 2008 00:14:36 +0000 MIME-Version: 1.0 Errors-To: balrog Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Andrzej Zaborowski Message-Id: Date: Sun, 25 May 2008 00:14:36 +0000 Subject: [Qemu-devel] [4569] Invalidate VNC framebuffer on every resize. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 4569 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4569 Author: balrog Date: 2008-05-25 00:14:34 +0000 (Sun, 25 May 2008) Log Message: ----------- Invalidate VNC framebuffer on every resize. On a resize, vncviewer keeps the image in the upper-left part of the screen unmodified and fills the right end of the lines with black colour. vnc.c keeps the first n bytes of the framebuffer unmodified instead - meaning that the client's image doesn't match the image in framebuffer and checking for dirty rows gives wrong results. We can either invalidate the whole buffer or implement the same transformation as the client. Modified Paths: -------------- trunk/vnc.c Modified: trunk/vnc.c =================================================================== --- trunk/vnc.c 2008-05-24 23:15:46 UTC (rev 4568) +++ trunk/vnc.c 2008-05-25 00:14:34 UTC (rev 4569) @@ -316,6 +316,9 @@ vs->width = ds->width; vs->height = ds->height; } + + memset(vs->dirty_row, 0xFF, sizeof(vs->dirty_row)); + memset(vs->old_data, 42, vs->ds->linesize * vs->ds->height); } /* fastest code */ @@ -1182,8 +1185,6 @@ } vnc_dpy_resize(vs->ds, vs->ds->width, vs->ds->height); - memset(vs->dirty_row, 0xFF, sizeof(vs->dirty_row)); - memset(vs->old_data, 42, vs->ds->linesize * vs->ds->height); vga_hw_invalidate(); vga_hw_update(); @@ -1982,8 +1983,6 @@ vs->ds->dpy_resize = vnc_dpy_resize; vs->ds->dpy_refresh = NULL; - memset(vs->dirty_row, 0xFF, sizeof(vs->dirty_row)); - vnc_dpy_resize(vs->ds, 640, 400); }