From patchwork Wed Jan 8 09:08:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Lieven X-Patchwork-Id: 308138 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BFBC52C0098 for ; Wed, 8 Jan 2014 20:58:23 +1100 (EST) Received: from localhost ([::1]:45878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0ptz-0001MC-Kd for incoming@patchwork.ozlabs.org; Wed, 08 Jan 2014 04:58:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0p7O-0005pJ-Bb for qemu-devel@nongnu.org; Wed, 08 Jan 2014 04:08:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0p7I-0006ny-Pj for qemu-devel@nongnu.org; Wed, 08 Jan 2014 04:08:06 -0500 Received: from mx.ipv6.kamp.de ([2a02:248:0:51::16]:34226 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0p7I-0006nm-GL for qemu-devel@nongnu.org; Wed, 08 Jan 2014 04:08:00 -0500 Received: (qmail 9099 invoked by uid 89); 8 Jan 2014 09:07:59 -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/18325. hbedv: 8.2.12.166/7.11.123.254. spamassassin: 3.3.1. Clear:RC:1(82.141.1.145):SA:0(-1.5/5.0):. Processed in 1.155301 secs); 08 Jan 2014 09:07:59 -0000 Received: from ns.kamp-intra.net (HELO dns.kamp-intra.net) ([82.141.1.145]) by mx01.kamp.de with SMTP; 8 Jan 2014 09:07:58 -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 AD49E206AE; Wed, 8 Jan 2014 10:06:56 +0100 (CET) Received: by lieven-pc.kamp-intra.net (Postfix, from userid 1000) id DB8EA610EF; Wed, 8 Jan 2014 10:08:38 +0100 (CET) From: Peter Lieven To: qemu-devel@nongnu.org Date: Wed, 8 Jan 2014 10:08:38 +0100 Message-Id: <1389172118-25402-7-git-send-email-pl@kamp.de> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1389172118-25402-1-git-send-email-pl@kamp.de> References: <1389172118-25402-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: sw@weilnetz.de, Peter Lieven , xiawenc@linux.vnet.ibm.com, aliguori@amazon.com Subject: [Qemu-devel] [PATCHv4 6/6] 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 da552fe..a742d32 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3170,7 +3170,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) { @@ -3187,6 +3189,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"))) {