aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-25 00:14:34 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-05-25 00:14:34 +0000
commit8bba5c81b1febeb20cdd60f1c18eb0e695cad6d6 (patch)
tree058b3d5c276f6192e2d81689be49c303b72e57c5
parent788228c0d3ef975a995db7d97339b94ae41030e8 (diff)
downloadqemu-8bba5c81b1febeb20cdd60f1c18eb0e695cad6d6.zip
qemu-8bba5c81b1febeb20cdd60f1c18eb0e695cad6d6.tar.gz
qemu-8bba5c81b1febeb20cdd60f1c18eb0e695cad6d6.tar.bz2
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. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4569 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--vnc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/vnc.c b/vnc.c
index 4b57838..4235442 100644
--- a/vnc.c
+++ b/vnc.c
@@ -316,6 +316,9 @@ static void vnc_dpy_resize(DisplayState *ds, int w, int h)
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 @@ static void set_pixel_format(VncState *vs,
}
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 @@ void vnc_display_init(DisplayState *ds)
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);
}