aboutsummaryrefslogtreecommitdiff
path: root/vnc-encoding-zlib.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-encoding-zlib.c
parenta885211eed4e853c64d1419a0113c12048ecd5a1 (diff)
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-encoding-zlib.c')
-rw-r--r--vnc-encoding-zlib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/vnc-encoding-zlib.c b/vnc-encoding-zlib.c
index 88ac863a53..a99bc387dc 100644
--- a/vnc-encoding-zlib.c
+++ b/vnc-encoding-zlib.c
@@ -28,7 +28,7 @@
#define ZALLOC_ALIGNMENT 16
-static void *zalloc(void *x, unsigned items, unsigned size)
+void *vnc_zlib_zalloc(void *x, unsigned items, unsigned size)
{
void *p;
@@ -40,7 +40,7 @@ static void *zalloc(void *x, unsigned items, unsigned size)
return (p);
}
-static void zfree(void *x, void *addr)
+void vnc_zlib_zfree(void *x, void *addr)
{
qemu_free(addr);
}
@@ -72,8 +72,8 @@ static int vnc_zlib_stop(VncState *vs)
VNC_DEBUG("VNC: initializing zlib stream\n");
VNC_DEBUG("VNC: opaque = %p | vs = %p\n", zstream->opaque, vs);
- zstream->zalloc = zalloc;
- zstream->zfree = zfree;
+ zstream->zalloc = vnc_zlib_zalloc;
+ zstream->zfree = vnc_zlib_zfree;
err = deflateInit2(zstream, vs->tight_compression, Z_DEFLATED, MAX_WBITS,
MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY);