diff options
author | Corentin Chary <corentincj@iksaif.net> | 2010-07-07 20:57:51 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-07-26 17:23:53 -0500 |
commit | 6f9c78c1499bd2fb3c31bf87d9b7c1b10c188dfb (patch) | |
tree | d08a73581753bfaaedc66f3ab3253d7955ee33de /vnc-encoding-tight.c | |
parent | 2f24e2ed1160b252225bfa6169d552ef955eaaef (diff) |
vnc: add lossy option
The lossy option can be used to enable lossy compression
methods like gradient or jpeg. This patch disable them by
default.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vnc-encoding-tight.c')
-rw-r--r-- | vnc-encoding-tight.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vnc-encoding-tight.c b/vnc-encoding-tight.c index 5b69ff0b52..c1a292bdd2 100644 --- a/vnc-encoding-tight.c +++ b/vnc-encoding-tight.c @@ -228,6 +228,10 @@ tight_detect_smooth_image(VncState *vs, int w, int h) int compression = vs->tight_compression; int quality = vs->tight_quality; + if (!vs->vd->lossy) { + return 0; + } + if (ds_get_bytes_per_pixel(vs->ds) == 1 || vs->clientds.pf.bytes_per_pixel == 1 || w < VNC_TIGHT_DETECT_MIN_WIDTH || h < VNC_TIGHT_DETECT_MIN_HEIGHT) { |