From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LU1CJ-0000pg-1p for qemu-devel@nongnu.org; Mon, 02 Feb 2009 10:58:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LU1CH-0000oa-Bx for qemu-devel@nongnu.org; Mon, 02 Feb 2009 10:58:53 -0500 Received: from [199.232.76.173] (port=51778 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LU1CG-0000oO-Lr for qemu-devel@nongnu.org; Mon, 02 Feb 2009 10:58:52 -0500 Received: from savannah.gnu.org ([199.232.41.3]:41961 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 1LU1CG-00004s-4g for qemu-devel@nongnu.org; Mon, 02 Feb 2009 10:58:52 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LU1CF-0007J4-Jd for qemu-devel@nongnu.org; Mon, 02 Feb 2009 15:58:51 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LU1CF-0007Is-AI for qemu-devel@nongnu.org; Mon, 02 Feb 2009 15:58:51 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Mon, 02 Feb 2009 15:58:51 +0000 Subject: [Qemu-devel] [6498] Move the framebuffer update package out (Alexander Graf) 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: 6498 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6498 Author: aliguori Date: 2009-02-02 15:58:51 +0000 (Mon, 02 Feb 2009) Log Message: ----------- Move the framebuffer update package out (Alexander Graf) Currently the send_framebuffer_update_raw and send_framebuffer_update_hextile respectively send a send_framebuffer_update packet themselves. We need to reuse send_framebuffer_update_raw for zlib encoding though, so let's move it out. Signed-off-by: Alexander Graf Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/vnc.c Modified: trunk/vnc.c =================================================================== --- trunk/vnc.c 2009-02-02 15:58:47 UTC (rev 6497) +++ trunk/vnc.c 2009-02-02 15:58:51 UTC (rev 6498) @@ -417,8 +417,6 @@ int i; uint8_t *row; - vnc_framebuffer_update(vs, x, y, w, h, VNC_ENCODING_RAW); - row = ds_get_data(vs->ds) + y * ds_get_linesize(vs->ds) + x * ds_get_bytes_per_pixel(vs->ds); for (i = 0; i < h; i++) { vs->write_pixels(vs, row, w * ds_get_bytes_per_pixel(vs->ds)); @@ -468,8 +466,6 @@ int has_fg, has_bg; uint8_t *last_fg, *last_bg; - vnc_framebuffer_update(vs, x, y, w, h, VNC_ENCODING_HEXTILE); - last_fg = (uint8_t *) malloc(vs->serverds.pf.bytes_per_pixel); last_bg = (uint8_t *) malloc(vs->serverds.pf.bytes_per_pixel); has_fg = has_bg = 0; @@ -489,9 +485,11 @@ { switch(vs->vnc_encoding) { case VNC_ENCODING_HEXTILE: + vnc_framebuffer_update(vs, x, y, w, h, VNC_ENCODING_HEXTILE); send_framebuffer_update_hextile(vs, x, y, w, h); break; default: + vnc_framebuffer_update(vs, x, y, w, h, VNC_ENCODING_RAW); send_framebuffer_update_raw(vs, x, y, w, h); break; }