]> xenbits.xensource.com Git - qemu-xen-3.3-testing.git/commitdiff
fix vnc screen corruption bugs and viewer exits master xen-3.3.2 xen-3.3.2-rc8 xen-3.3.2]
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 4 Aug 2009 14:53:20 +0000 (15:53 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 4 Aug 2009 14:53:20 +0000 (15:53 +0100)
I have been having problems with display corruption using raw
encoding.

I have also been having issues with the vncviewer client exiting with
"rect too big".

These problems appear when there are rapid changes to the framebuffer
contents. [I've been using "find /" in my tests to generate a lot of text
output.]

The root cause of both problems appears to be the changing of
the underlying framebuffer data during the creation of the update.
[Hextile makes multiple passes over the data and gets badly
confused if the data changes..]

The attached patch pulls the pixel data from the "stable" old_data
buffer rather than directly from the (changing) display surface.

Submitted-by: Andrew Thomas <andrew.thomas@oracle.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
(cherry picked from commit 99a5a9155284ab47eda2be738be0115aa97ce0ff)

cherry picked from commit 55fab1884cf0eae44f06ce97d15c20ca29b8fba2
Conflicts:
vnc.c
vnchextile.h

vnc.c
vnchextile.h

diff --git a/vnc.c b/vnc.c
index 01e22e544ad2669131abc13c216c0a3efbc3b54f..4a8f52664b8ade70866f13e8c8b3849db42abcef 100644 (file)
--- a/vnc.c
+++ b/vnc.c
@@ -525,7 +525,7 @@ static void send_framebuffer_update_raw(VncState *vs, int x, int y, int w, int h
 
     vnc_framebuffer_update(vs, x, y, w, h, 0);
 
 
     vnc_framebuffer_update(vs, x, y, w, h, 0);
 
-    row = vs->ds->data + y * vs->ds->linesize + x * vs->depth;
+    row = vs->old_data + y * vs->ds->linesize + x * vs->depth;
     for (i = 0; i < h; i++) {
        vs->write_pixels(vs, row, w * vs->depth);
        row += vs->ds->linesize;
     for (i = 0; i < h; i++) {
        vs->write_pixels(vs, row, w * vs->depth);
        row += vs->ds->linesize;
index 29b74840f565afd98654b091e7c2eb1a476defcb..b921ff60637c6542ed6bb6a538e80ad71c45a356 100644 (file)
@@ -13,7 +13,7 @@ static void CONCAT(send_hextile_tile_, NAME)(VncState *vs,
                                              void *last_fg_,
                                              int *has_bg, int *has_fg)
 {
                                              void *last_fg_,
                                              int *has_bg, int *has_fg)
 {
-    uint8_t *row = (vs->ds->data + y * vs->ds->linesize + x * vs->depth);
+    uint8_t *row = (vs->old_data + y * vs->ds->linesize + x * vs->depth);
     pixel_t *irow = (pixel_t *)row;
     int j, i;
     pixel_t *last_bg = (pixel_t *)last_bg_;
     pixel_t *irow = (pixel_t *)row;
     int j, i;
     pixel_t *last_bg = (pixel_t *)last_bg_;