From patchwork Mon Nov 18 08:17:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Lieven X-Patchwork-Id: 291970 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BA84F2C007E for ; Mon, 18 Nov 2013 19:18:05 +1100 (EST) Received: from localhost ([::1]:41827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViK1y-0003YX-Mn for incoming@patchwork.ozlabs.org; Mon, 18 Nov 2013 03:18:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViK1d-0003YF-VA for qemu-devel@nongnu.org; Mon, 18 Nov 2013 03:17:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ViK1Y-0006UC-9r for qemu-devel@nongnu.org; Mon, 18 Nov 2013 03:17:41 -0500 Received: from mx.ipv6.kamp.de ([2a02:248:0:51::16]:58645 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViK1X-0006Tq-VT for qemu-devel@nongnu.org; Mon, 18 Nov 2013 03:17:36 -0500 Received: (qmail 24605 invoked by uid 89); 18 Nov 2013 08:17:33 -0000 Received: from [82.141.1.145] by client-16-kamp (envelope-from , uid 89) with qmail-scanner-2010/03/19-MF (clamdscan: 0.98/18125. hbedv: 8.2.12.144/7.11.114.48. spamassassin: 3.3.1. Clear:RC:1(82.141.1.145):SA:0(-1.2/5.0):. Processed in 1.168266 secs); 18 Nov 2013 08:17:33 -0000 Received: from ns.kamp-intra.net (HELO dns.kamp-intra.net) ([82.141.1.145]) by mx01.kamp.de with SMTP; 18 Nov 2013 08:17:31 -0000 X-GL_Whitelist: yes Received: from lieven-pc.kamp-intra.net (lieven-pc.kamp-intra.net [172.21.12.60]) by dns.kamp-intra.net (Postfix) with ESMTP id B2CE0206AA; Mon, 18 Nov 2013 09:17:11 +0100 (CET) Received: by lieven-pc.kamp-intra.net (Postfix, from userid 1000) id 497F46127C; Mon, 18 Nov 2013 09:17:22 +0100 (CET) From: Peter Lieven To: qemu-devel@nongnu.org Date: Mon, 18 Nov 2013 09:17:21 +0100 Message-Id: <1384762641-18297-4-git-send-email-pl@kamp.de> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1384762641-18297-1-git-send-email-pl@kamp.de> References: <1384762641-18297-1-git-send-email-pl@kamp.de> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a02:248:0:51::16 Cc: corentincj@iksaif.net, aliguori@us.ibm.com, Peter Lieven Subject: [Qemu-devel] [PATCH 3/3] ui/vnc: disable adaptive update calculations if not needed X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Peter Lieven --- ui/vnc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/vnc.c b/ui/vnc.c index edf33be..6683ae9 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3194,7 +3194,9 @@ void vnc_display_open(DisplayState *ds, const char *display, Error **errp) acl = 1; #endif } else if (strncmp(options, "lossy", 5) == 0) { +#ifdef CONFIG_VNC_JPEG vs->lossy = true; +#endif } else if (strncmp(options, "non-adaptive", 12) == 0) { vs->non_adaptive = true; } else if (strncmp(options, "share=", 6) == 0) { @@ -3211,6 +3213,13 @@ void vnc_display_open(DisplayState *ds, const char *display, Error **errp) } } + /* adaptive updates are only used with tight encoding and + * if lossy updates are enabled so we can disable all the + * calculations otherwise */ + if (!vs->lossy) { + vs->non_adaptive = true; + } + #ifdef CONFIG_VNC_TLS if (acl && x509 && vs->tls.x509verify) { if (!(vs->tls.acl = qemu_acl_init("vnc.x509dname"))) {