WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] ioemu: Allow VNC buffer sharing when line

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] ioemu: Allow VNC buffer sharing when linesize != width * depth
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2008 05:41:20 -0700
Delivery-date: Thu, 20 Mar 2008 05:46:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1206010101 0
# Node ID 683d7a6294ddf703d17ac187f69a596c539edb9e
# Parent  5c940fbeb82ca3dbee1e6d497363d557dbfa1a01
ioemu: Allow VNC buffer sharing when linesize != width * depth

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 tools/ioemu/hw/vga.c |    4 ++--
 tools/ioemu/vnc.c    |   12 +++++-------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff -r 5c940fbeb82c -r 683d7a6294dd tools/ioemu/hw/vga.c
--- a/tools/ioemu/hw/vga.c      Thu Mar 20 10:47:17 2008 +0000
+++ b/tools/ioemu/hw/vga.c      Thu Mar 20 10:48:21 2008 +0000
@@ -1148,7 +1148,7 @@ static void vga_draw_text(VGAState *s, i
         cw != s->last_cw || cheight != s->last_ch) {
         s->last_scr_width = width * cw;
         s->last_scr_height = height * cheight;
-        dpy_resize(s->ds, s->last_scr_width, s->last_scr_height, 
s->last_scr_width * (depth / 8));
+        dpy_resize(s->ds, s->last_scr_width, s->last_scr_height, 
s->last_scr_width * (s->ds->depth / 8));
         s->last_width = width;
         s->last_height = height;
         s->last_ch = cheight;
@@ -1571,7 +1571,7 @@ static void vga_draw_graphic(VGAState *s
     vga_draw_line = vga_draw_line_table[v * NB_DEPTHS + 
get_depth_index(s->ds)];
     if (disp_width != s->last_width ||
         height != s->last_height) {
-        dpy_resize(s->ds, disp_width, height, disp_width * (depth / 8));
+        dpy_resize(s->ds, disp_width, height, s->line_offset);
         s->last_scr_width = disp_width;
         s->last_scr_height = height;
         s->last_width = disp_width;
diff -r 5c940fbeb82c -r 683d7a6294dd tools/ioemu/vnc.c
--- a/tools/ioemu/vnc.c Thu Mar 20 10:47:17 2008 +0000
+++ b/tools/ioemu/vnc.c Thu Mar 20 10:48:21 2008 +0000
@@ -369,20 +369,17 @@ static void vnc_dpy_resize(DisplayState 
     VncState *vs = ds->opaque;
     int o;
 
-    if (linesize != w * vs->depth)
-        ds->shared_buf = 0;
-
     if (!ds->shared_buf) {
         if (allocated)
-            ds->data = realloc(ds->data, w * h * vs->depth);
+            ds->data = realloc(ds->data,  h * linesize);
         else
-            ds->data = malloc(w * h * vs->depth);
+            ds->data = malloc(h * linesize);
         allocated = 1;
     } else if (allocated) {
         free(ds->data);
         allocated = 0;
     }
-    vs->old_data = realloc(vs->old_data, w * h * vs->depth);
+    vs->old_data = realloc(vs->old_data, h * linesize);
     vs->dirty_row = realloc(vs->dirty_row, h * sizeof(vs->dirty_row[0]));
     vs->update_row = realloc(vs->update_row, h * sizeof(vs->dirty_row[0]));
 
@@ -399,7 +396,7 @@ static void vnc_dpy_resize(DisplayState 
     size_changed = ds->width != w || ds->height != h;
     ds->width = w;
     ds->height = h;
-    ds->linesize = w * vs->depth;
+    ds->linesize = linesize;
     if (vs->csock != -1 && vs->has_resize && size_changed) {
         vs->width = ds->width;
         vs->height = ds->height;
@@ -2494,6 +2491,7 @@ void vnc_display_init(DisplayState *ds)
 
     vs->ds->width = 640;
     vs->ds->height = 400;
+    vs->ds->linesize = 640 * 4;
     vnc_dpy_colourdepth(vs->ds, 24);
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] ioemu: Allow VNC buffer sharing when linesize != width * depth, Xen patchbot-unstable <=