From patchwork Tue Mar 29 13:42:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kshitij Suri X-Patchwork-Id: 12794854 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78184C433EF for ; Tue, 29 Mar 2022 13:46:54 +0000 (UTC) Received: from localhost ([::1]:49216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZCBR-0007Xz-F0 for qemu-devel@archiver.kernel.org; Tue, 29 Mar 2022 09:46:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57964) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZC82-0003cu-Qt for qemu-devel@nongnu.org; Tue, 29 Mar 2022 09:43:22 -0400 Received: from mx0b-002c1b01.pphosted.com ([148.163.155.12]:64930) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZC7z-0006eY-Uo for qemu-devel@nongnu.org; Tue, 29 Mar 2022 09:43:22 -0400 Received: from pps.filterd (m0127841.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 22TC0LiL028548; Tue, 29 Mar 2022 06:42:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=proofpoint20171006; bh=aWpq8ynHbMCTC5tG3JF67oR8pzzbwd8Jq4ZPLYpS9lI=; b=w49Do/Agqwhig7mGJ4Q6oYRgaYbLVV0G8hD0M+oQ8N6YYu0wrhl/5Dm1h2U86vhrl25L 6SU9oT4yJnAV69KsnHDhye++QXGYpuTDS6OhgEdpnpeUSVt50jKO/J0RsgQ3JmpxYXa6 R7jVz9Q/0SjI07CML5nKOO1SteHTReLFxyRKuUUQqEvj3HhOabLVqZeT1F6a7xxBnK9j VAbqT484s0pkz9Hf2lu5ft4g9BoiFYMWuoJowY8DYeK14/1c9DpOdgXI9VonN8ICfkYP rpkveozUYrHXvFnCe8MDbcdU4U0GUKG61orzyvD3NHg6xyE1bJFu+Vc4xRidvvj3rID+ EQ== Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2168.outbound.protection.outlook.com [104.47.55.168]) by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 3f20c9e5nw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Mar 2022 06:42:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MPTiK101LeDrq2HkAFkFHumkzz1gpv34QEZJMFbVeRbUHwGsDAipgAFtNE2aFntBcG3KcSLWha96PbEz8QSQOJwPeoTlWOkV2xGon5xq3FK/nkmNKOUxa+WNF5KXwdjcmXxOUJxPchbkjM2ThmhDjDY9+BqM7LnowFuG3IEtMbDSp3ij7yAoABLuyO+iF4DQNhgQVkPaklX3KhwCFuSe8LCb3pHrL4CmOKXNn+BXGQtE8YJ2v5ULcVOx7Sj9e4qFhQzV+KBXFgRKRIFCjsSVFLChEDBNd3E8l2frifBqy5x239D39wt3Dvhb2rB1w8bZOpGTHMeRVux047AXWNxJYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aWpq8ynHbMCTC5tG3JF67oR8pzzbwd8Jq4ZPLYpS9lI=; b=P7p0+JzRw+/dQKCK7/ru4liGWWg6ds7B8BY9UHL1jjTk2dHxRi0dOOYAQASSx3eyw20bNJWMEh9IbpuCjQSunVrWt58US9A7kDvP0kCA+qKIuLAOg1Vo0bDWlzmun9JovPdF93n2SqySh6gygjxEo5rvMjgbr5bgnqT5/rvEnglfS8E5k1eyXcnIY35Ix2kwM7lpA7zGGbb6jqsT/Tyvi577AqS5Q7UWulbJZ6xyoF8IjeEuB+r4qK4vpS6ld0h3aIjKwSqr/nscj2EXE/JeZixcblb96hyXFtnKWZg5wgy1IwE6x1+NWVWmpqCYTEjk5LVufOunloKWrHfXWsYuMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none Received: from SN6PR02MB4048.namprd02.prod.outlook.com (2603:10b6:805:2c::26) by BY5PR02MB6193.namprd02.prod.outlook.com (2603:10b6:a03:1fd::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5102.16; Tue, 29 Mar 2022 13:42:52 +0000 Received: from SN6PR02MB4048.namprd02.prod.outlook.com ([fe80::f5cf:57d:ddf6:945]) by SN6PR02MB4048.namprd02.prod.outlook.com ([fe80::f5cf:57d:ddf6:945%3]) with mapi id 15.20.5102.023; Tue, 29 Mar 2022 13:42:51 +0000 From: Kshitij Suri To: qemu-devel@nongnu.org Subject: [PATCH v3 1/2] Replacing CONFIG_VNC_PNG with CONFIG_PNG Date: Tue, 29 Mar 2022 13:42:34 +0000 Message-Id: <20220329134235.44298-2-kshitij.suri@nutanix.com> X-Mailer: git-send-email 2.22.3 In-Reply-To: <20220329134235.44298-1-kshitij.suri@nutanix.com> References: <20220329134235.44298-1-kshitij.suri@nutanix.com> X-ClientProxiedBy: SJ0PR05CA0208.namprd05.prod.outlook.com (2603:10b6:a03:330::33) To SN6PR02MB4048.namprd02.prod.outlook.com (2603:10b6:805:2c::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5198c118-91b0-4c70-40c5-08da118a0539 X-MS-TrafficTypeDiagnostic: BY5PR02MB6193:EE_ X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oxNbaUOThCt4AcmouJW6mdqenzIr9GjO5WKnwnQSgCrdZzlxXZK4a8UxiKrOnXTXNihzdcBE3VSNBZs8mG0NXH/adxxguim2lzmm/Vb9Q0pj9aZnK6Ng9U7m1clORkq+OZz02krXm9xDMK0gdFopO641v659JJoQvUKzA9eB70sxXjPgKLfmwCHngFwaB2VixcLuAxBK96uQoRi3xGZjy3lS0rGMbJXGdmvpmaDwJegkUgnY0QxQahJQ4z+xB+3aSj3hXOYlR4nTIFUT+L4OGMcIhMwHsRLliINet/XJ7LUQ2OAttYKWptHpxHJGIG3NUJnhaqpVQFJ4fHyR3T0UuDf9LhF49phmXBo68c/WB4h38ap1sEKny2eUaohiM/jRJIS40Orom4Vqs335wKWFqqMrPXd1wZFKC5twpQ8zBC8KzlyN75f8pdxoDACMxfNsm3vhE6hDQubX7+0DDHIl/4kGjByyyMNi+PQtxP/8GjsZLXQXOBD2CnURlaglTJJ1jSxsDjhpvwixkn230iWbFprwt+g6027uv94uVpRS5NqYeiY8YlZiNMWZA2BNLjc0kYomvZAhsOwUyhos0/GH+Vxn3sHcEYsu+cal+4pPQn6NYEEcxTTSpLyZDBD/pNl6SAna6LobCa3NVx/vP7Ax0klF5m1fCxmO80zqTio82Jeb/EohSApXI38Th8FBkx2pBBXJi25UU/DqxzoZYreK2A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR02MB4048.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6512007)(6506007)(508600001)(6666004)(52116002)(8936002)(66476007)(316002)(4326008)(44832011)(66946007)(5660300002)(36756003)(86362001)(6486002)(6916009)(8676002)(66556008)(83380400001)(38100700002)(38350700002)(2906002)(186003)(26005)(107886003)(2616005)(1076003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/Me3KeTw/9ZKiZNFeD1hm40Mdq5b?= =?utf-8?q?X6aWspi8sFVh+lgFUBeAP21XQoh3hhfGtbdGRKdX4CT+UPJjnXCl9Hnsvvid6KP0n?= =?utf-8?q?xnYPgoQyDUiGIdnlgb2Gxaae7lliWurwA2/e1QwfAFqhvlVHLWW+YwOGfZhYEgkZs?= =?utf-8?q?JUbqqcE9ax67qoyl4vx4U+/Twix28oo1Eu0bv5bHwBu2Wv7Ga3Vw0uXAP0e1Ec3Cb?= =?utf-8?q?JqawAEsZzw27oyCJamNEFUONs1iwFJZDxEQB+Sr02cS+BVPJcKWsxAIHJwoQ2EeCq?= =?utf-8?q?0AEycG8MiSS4IImPNNyI4dYCS/W4G+EApskRoeR6BufkgNMKjlWzCYal1mlB5m1rY?= =?utf-8?q?iZpZgm2HqzHtb0y6uGtQ3LzCtxitLii/nWuBY65XPaNgLqov6qgTS2c71URC7DHBP?= =?utf-8?q?wTU/wOjWj3909/rKvYqi+K0iPY0C6Wl8uTliW/kxFjqbVILa1+lzvvf9GYLni9H1X?= =?utf-8?q?ywwsNnq4kJ9WPHO2ZoP7gdANl5SC02vFGWI/4Kd+yrDbpJMwjIgENp006uTQL4kBY?= =?utf-8?q?9ATkj/LFBt72LlQFyH02JTrQYRgt4wSdSd1nIB1aQspv/+R3Fv+yBqqV2Gv7GTWCM?= =?utf-8?q?ztjtkhXSNrntE42vO7y7K5tqkX8nIpLg5JdsHJ3FPytEjP1v7/1/yNbOlINAg5/4F?= =?utf-8?q?r3lGA+MWd+Zr3nsiFULj/g1bq4wtMdLS2kmqOERVrqF5CPgdVJRMlJ1ejFbZyji9E?= =?utf-8?q?l6t1Ry5aIlZMJq/A0Z3Ox/r2wLVObJUxIznldO8Eh37UC6kdL4vYCvWLKch0CjM37?= =?utf-8?q?Osgfz/A8CJyhK1X+eB3fayEXoEwh+gI33S+c7DSfujuRcdalwr6XArgcoiACb9aTa?= =?utf-8?q?LYJJT9piboBYdQmfSpyB4NcEtaLerTayP2KbY18AJomUKe4jD2DEaB3YtDq+P5xNN?= =?utf-8?q?4tEfEkuhtfBYx5kMAky6Nf1FveSXjaKLUEgr0pR3OOe3nr3r5FZLbpsf1GjjvDN5m?= =?utf-8?q?SwKquK8Z9Djx3oxnopGOG1VYm77CyHEoXU7wZBAx4m6tdOzblEPQf+PBzRcGrV0/D?= =?utf-8?q?dEtUqMbfgJ4/c+V5kw0W4l5HNUqz/mmQ7/1B8+u3BR1RGQMlqsM7UD6vZYKy6j7te?= =?utf-8?q?aaFp3X0CUpZk7casYUFhc7/z8c/RvcQY49asWJGekG9lfGRUH6mIfznvHmjFe8lJ/?= =?utf-8?q?iEDsr3Hj2bFLtal0z4yjEbOe/+1agw0/jrZQa5b6NmyY3XpbhJshS5fgQ4DxiD68K?= =?utf-8?q?RJQUud9P9qZw8e2UygIViR9ZCLXW5B6OAzPaEl4B1JrYdiCGcVDoo+Z4UBeJgIs8F?= =?utf-8?q?IZ1CcueNlIx2t8BY1m71/2VjLTxxM77UMEP/WE30S2kgS3htXI+SlDIrpg7XTMSaM?= =?utf-8?q?wX+u7Wch599YstqdU1TlZAPbq76nv3bW/tx4vzB+VTSz1mZz+7v4n/kisIne096Sd?= =?utf-8?q?zGJapb9D0SGbsT2+EkdtdPVoiXb5v6y+peJQyp9oo9nCONX/gLnscM9sGQrhN0Td3?= =?utf-8?q?+I6rsDjwgfxYCD0ms+tmcdZW4qelpISMbEIbCBhDZ+OZVpOIurCWvSFlQOeH1ypqJ?= =?utf-8?q?IwK1GcJxGwKQNDaQ8noK58LP416UI0X2DHFzZ/iejrgXu6nGaFW81u1UDLJ3RVCfI?= =?utf-8?q?Pe/B1dJ8j+jS0X2YfgDKBGU3cxW7qOwiWp4C1g6BsAXch9wLiU6GJ1qGp7VyQTazH?= =?utf-8?q?ha//x5/AI13US5Vokf6qIGbCMgIyOTXY/a26YcJIQ5mc6fGQ3ldlA=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5198c118-91b0-4c70-40c5-08da118a0539 X-MS-Exchange-CrossTenant-AuthSource: SN6PR02MB4048.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Mar 2022 13:42:51.8393 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: j7Pk8l7yJiFpzFgLSlqzFL4jssgdMk0vnpt6dwHomDcdSs+pmkrHQYuG5fdd8ktWlkh1wK1kESwOFC9M7H4HRx3m4vFPm6BkEd69ziEdx+U= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6193 X-Proofpoint-GUID: mCduTPfgjY4_rwRFWch80q8sazZNGBsN X-Proofpoint-ORIG-GUID: mCduTPfgjY4_rwRFWch80q8sazZNGBsN X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.850,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-29_05,2022-03-29_01,2022-02-23_01 X-Proofpoint-Spam-Reason: safe Received-SPF: pass client-ip=148.163.155.12; envelope-from=kshitij.suri@nutanix.com; helo=mx0b-002c1b01.pphosted.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: soham.ghosh@nutanix.com, peter.maydell@linaro.org, thuth@redhat.com, berrange@redhat.com, prerna.saxena@nutanix.com, dgilbert@redhat.com, armbru@redhat.com, Kshitij Suri , philippe.mathieu.daude@gmail.com, kraxel@redhat.com, prachatos.mitra@nutanix.com, eblake@redhat.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Libpng is only detected if VNC is enabled currently. This patch adds a generalised png option in the meson build which is aimed to replace use of CONFIG_VNC_PNG with CONFIG_PNG. Signed-off-by: Kshitij Suri Reviewed-by: Daniel P. Berrangé --- meson.build | 9 ++++----- meson_options.txt | 4 ++-- ui/vnc-enc-tight.c | 18 +++++++++--------- ui/vnc.c | 4 ++-- ui/vnc.h | 2 +- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/meson.build b/meson.build index 282e7c4650..ccb6840a49 100644 --- a/meson.build +++ b/meson.build @@ -1115,14 +1115,13 @@ if gtkx11.found() x11 = dependency('x11', method: 'pkg-config', required: gtkx11.found(), kwargs: static_kwargs) endif +png = dependency('libpng', required: get_option('png'), + method: 'pkg-config', kwargs: static_kwargs) vnc = not_found -png = not_found jpeg = not_found sasl = not_found if get_option('vnc').allowed() and have_system vnc = declare_dependency() # dummy dependency - png = dependency('libpng', required: get_option('vnc_png'), - method: 'pkg-config', kwargs: static_kwargs) jpeg = dependency('libjpeg', required: get_option('vnc_jpeg'), method: 'pkg-config', kwargs: static_kwargs) sasl = cc.find_library('sasl2', has_headers: ['sasl/sasl.h'], @@ -1554,9 +1553,9 @@ config_host_data.set('CONFIG_TPM', have_tpm) config_host_data.set('CONFIG_USB_LIBUSB', libusb.found()) config_host_data.set('CONFIG_VDE', vde.found()) config_host_data.set('CONFIG_VHOST_USER_BLK_SERVER', have_vhost_user_blk_server) +config_host_data.set('CONFIG_PNG', png.found()) config_host_data.set('CONFIG_VNC', vnc.found()) config_host_data.set('CONFIG_VNC_JPEG', jpeg.found()) -config_host_data.set('CONFIG_VNC_PNG', png.found()) config_host_data.set('CONFIG_VNC_SASL', sasl.found()) config_host_data.set('CONFIG_VIRTFS', have_virtfs) config_host_data.set('CONFIG_VTE', vte.found()) @@ -3638,11 +3637,11 @@ summary_info += {'curses support': curses} summary_info += {'virgl support': virgl} summary_info += {'curl support': curl} summary_info += {'Multipath support': mpathpersist} +summary_info += {'PNG support': png} summary_info += {'VNC support': vnc} if vnc.found() summary_info += {'VNC SASL support': sasl} summary_info += {'VNC JPEG support': jpeg} - summary_info += {'VNC PNG support': png} endif if targetos not in ['darwin', 'haiku', 'windows'] summary_info += {'OSS support': oss} diff --git a/meson_options.txt b/meson_options.txt index 52b11cead4..d85734f8e6 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -177,12 +177,12 @@ option('vde', type : 'feature', value : 'auto', description: 'vde network backend support') option('virglrenderer', type : 'feature', value : 'auto', description: 'virgl rendering support') +option('png', type : 'feature', value : 'auto', + description: 'PNG support with libpng') option('vnc', type : 'feature', value : 'auto', description: 'VNC server') option('vnc_jpeg', type : 'feature', value : 'auto', description: 'JPEG lossy compression for VNC server') -option('vnc_png', type : 'feature', value : 'auto', - description: 'PNG compression for VNC server') option('vnc_sasl', type : 'feature', value : 'auto', description: 'SASL authentication for VNC server') option('vte', type : 'feature', value : 'auto', diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c index 7b86a4713d..e879cca7f5 100644 --- a/ui/vnc-enc-tight.c +++ b/ui/vnc-enc-tight.c @@ -32,7 +32,7 @@ INT32 definitions between jmorecfg.h (included by jpeglib.h) and Win32 basetsd.h (included by windows.h). */ -#ifdef CONFIG_VNC_PNG +#ifdef CONFIG_PNG /* The following define is needed by pngconf.h. Otherwise it won't compile, because setjmp.h was already included by qemu-common.h. */ #define PNG_SKIP_SETJMP_CHECK @@ -95,7 +95,7 @@ static const struct { }; #endif -#ifdef CONFIG_VNC_PNG +#ifdef CONFIG_PNG static const struct { int png_zlib_level, png_filters; } tight_png_conf[] = { @@ -919,7 +919,7 @@ static int send_full_color_rect(VncState *vs, int x, int y, int w, int h) int stream = 0; ssize_t bytes; -#ifdef CONFIG_VNC_PNG +#ifdef CONFIG_PNG if (tight_can_send_png_rect(vs, w, h)) { return send_png_rect(vs, x, y, w, h, NULL); } @@ -966,7 +966,7 @@ static int send_mono_rect(VncState *vs, int x, int y, int stream = 1; int level = tight_conf[vs->tight->compression].mono_zlib_level; -#ifdef CONFIG_VNC_PNG +#ifdef CONFIG_PNG if (tight_can_send_png_rect(vs, w, h)) { int ret; int bpp = vs->client_pf.bytes_per_pixel * 8; @@ -1020,7 +1020,7 @@ static int send_mono_rect(VncState *vs, int x, int y, struct palette_cb_priv { VncState *vs; uint8_t *header; -#ifdef CONFIG_VNC_PNG +#ifdef CONFIG_PNG png_colorp png_palette; #endif }; @@ -1082,7 +1082,7 @@ static int send_palette_rect(VncState *vs, int x, int y, int colors; ssize_t bytes; -#ifdef CONFIG_VNC_PNG +#ifdef CONFIG_PNG if (tight_can_send_png_rect(vs, w, h)) { return send_png_rect(vs, x, y, w, h, palette); } @@ -1233,7 +1233,7 @@ static int send_jpeg_rect(VncState *vs, int x, int y, int w, int h, int quality) /* * PNG compression stuff. */ -#ifdef CONFIG_VNC_PNG +#ifdef CONFIG_PNG static void write_png_palette(int idx, uint32_t pix, void *opaque) { struct palette_cb_priv *priv = opaque; @@ -1379,7 +1379,7 @@ static int send_png_rect(VncState *vs, int x, int y, int w, int h, buffer_reset(&vs->tight->png); return 1; } -#endif /* CONFIG_VNC_PNG */ +#endif /* CONFIG_PNG */ static void vnc_tight_start(VncState *vs) { @@ -1706,7 +1706,7 @@ void vnc_tight_clear(VncState *vs) #ifdef CONFIG_VNC_JPEG buffer_free(&vs->tight->jpeg); #endif -#ifdef CONFIG_VNC_PNG +#ifdef CONFIG_PNG buffer_free(&vs->tight->png); #endif } diff --git a/ui/vnc.c b/ui/vnc.c index 310a873c21..8376291b47 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -2165,7 +2165,7 @@ static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings) vs->features |= VNC_FEATURE_TIGHT_MASK; vs->vnc_encoding = enc; break; -#ifdef CONFIG_VNC_PNG +#ifdef CONFIG_PNG case VNC_ENCODING_TIGHT_PNG: vs->features |= VNC_FEATURE_TIGHT_PNG_MASK; vs->vnc_encoding = enc; @@ -3256,7 +3256,7 @@ static void vnc_connect(VncDisplay *vd, QIOChannelSocket *sioc, #ifdef CONFIG_VNC_JPEG buffer_init(&vs->tight->jpeg, "vnc-tight-jpeg/%p", sioc); #endif -#ifdef CONFIG_VNC_PNG +#ifdef CONFIG_PNG buffer_init(&vs->tight->png, "vnc-tight-png/%p", sioc); #endif buffer_init(&vs->zlib.zlib, "vnc-zlib/%p", sioc); diff --git a/ui/vnc.h b/ui/vnc.h index a7149831f9..a60fb13115 100644 --- a/ui/vnc.h +++ b/ui/vnc.h @@ -201,7 +201,7 @@ typedef struct VncTight { #ifdef CONFIG_VNC_JPEG Buffer jpeg; #endif -#ifdef CONFIG_VNC_PNG +#ifdef CONFIG_PNG Buffer png; #endif int levels[4];