aboutsummaryrefslogtreecommitdiff
path: root/vnc.c
diff options
context:
space:
mode:
authorCorentin Chary <corentincj@iksaif.net>2010-05-19 09:24:10 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-01 12:53:09 -0500
commit380282b07dcc262f011aa665972dacba5d2178bc (patch)
tree9735e408a8e296ecfed96e7bad3340fd4aef3344 /vnc.c
parenta885211eed4e853c64d1419a0113c12048ecd5a1 (diff)
downloadqemu-380282b07dcc262f011aa665972dacba5d2178bc.zip
qemu-380282b07dcc262f011aa665972dacba5d2178bc.tar.gz
qemu-380282b07dcc262f011aa665972dacba5d2178bc.tar.bz2
vnc: add basic tight support
Add support for tight encoding [1]. This patch only add support for "basic" tight compression without any filter. [1] http://tigervnc.org/cgi-bin/rfbproto#tight-encoding. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vnc.c')
-rw-r--r--vnc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vnc.c b/vnc.c
index 626f173..046bd38 100644
--- a/vnc.c
+++ b/vnc.c
@@ -678,6 +678,9 @@ static int send_framebuffer_update(VncState *vs, int x, int y, int w, int h)
vnc_framebuffer_update(vs, x, y, w, h, VNC_ENCODING_HEXTILE);
n = vnc_hextile_send_framebuffer_update(vs, x, y, w, h);
break;
+ case VNC_ENCODING_TIGHT:
+ n = vnc_tight_send_framebuffer_update(vs, x, y, w, h);
+ break;
default:
vnc_framebuffer_update(vs, x, y, w, h, VNC_ENCODING_RAW);
n = vnc_raw_send_framebuffer_update(vs, x, y, w, h);
@@ -982,6 +985,7 @@ static void vnc_disconnect_finish(VncState *vs)
qobject_decref(vs->info);
vnc_zlib_clear(vs);
+ vnc_tight_clear(vs);
#ifdef CONFIG_VNC_TLS
vnc_tls_client_cleanup(vs);
@@ -1677,6 +1681,10 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
vs->features |= VNC_FEATURE_HEXTILE_MASK;
vs->vnc_encoding = enc;
break;
+ case VNC_ENCODING_TIGHT:
+ vs->features |= VNC_FEATURE_TIGHT_MASK;
+ vs->vnc_encoding = enc;
+ break;
case VNC_ENCODING_ZLIB:
vs->features |= VNC_FEATURE_ZLIB_MASK;
vs->vnc_encoding = enc;