From nobody Tue Feb 10 03:45:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1615873139; cv=none; d=zohomail.com; s=zohoarc; b=E8dbqPcy5joQyNMKQoUNsc9v2VX+IKy2chLaGbqJ9pTdnb1+bjrXsR+Hi/a/UQ1XB7en00XD/TFmlUaYzIb+FGQrzREd/e20w8P6XCPjS+VKw6z96+AMyVujGaAfDN3XzQ15OVLXgdnB4UnklOGTJ2miujIN/lWt9oQiF4II1gI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615873139; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uxm2oYa9/b0DbvGOaOtp67nls0xtqR5IsXvhpJats2o=; b=XzDej+XxoW62ljpuU9i0bVvfTU4MoJcQS2u1F7wTrhPOqw6jr7vNJBy7z/MQ0lHTb+LLZHj1w0YiJsSpcSYzm+nkW3/L0DTL3VigZg5kLWFA8bOxsS12fGYoDUe1uiB6xJtytQJah3W7ad8ZLr7v4YOc6F639ucOxUknHqSzNiU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1615873139454251.69201485350186; Mon, 15 Mar 2021 22:38:59 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-68-k1LgxS-uMCSe750rsEofBQ-1; Tue, 16 Mar 2021 01:38:55 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EEB8018460E8; Tue, 16 Mar 2021 05:38:47 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C3A8E690F1; Tue, 16 Mar 2021 05:38:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 635071800FF2; Tue, 16 Mar 2021 05:38:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12G5cQDv017044 for ; Tue, 16 Mar 2021 01:38:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 501D56A039; Tue, 16 Mar 2021 05:38:26 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-141.ams2.redhat.com [10.36.112.141]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EB0C46F130; Tue, 16 Mar 2021 05:38:22 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 91BCC1800842; Tue, 16 Mar 2021 06:38:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615873138; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=uxm2oYa9/b0DbvGOaOtp67nls0xtqR5IsXvhpJats2o=; b=E48JjR/Yr+M3KlcG3T7sVbyjyEzXlu4H87oQvuYZLCaFHjrlwl51QIW1Y2I5PW/F4xM3XP hAbb37zTg+UR3AbgqDUSldfm0JHEPiSv4SSrX4UmA6X6N19Ethk+69Q35v5dh651QAQXx2 2vn41Ys5wit3sEJ4XggPbIRC3mSNLsw= X-MC-Unique: k1LgxS-uMCSe750rsEofBQ-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PULL 10/11] ui: fold qemu_alloc_display in only caller Date: Tue, 16 Mar 2021 06:38:12 +0100 Message-Id: <20210316053813.1719442-11-kraxel@redhat.com> In-Reply-To: <20210316053813.1719442-1-kraxel@redhat.com> References: <20210316053813.1719442-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, Peter Maydell , Gerd Hoffmann , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) From: Marc-Andr=C3=A9 Lureau A minor code simplification. Signed-off-by: Marc-Andr=C3=A9 Lureau Message-Id: <20210312100108.2706195-2-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann --- ui/console.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/ui/console.c b/ui/console.c index c2fdf975b6b3..2de5f4105b59 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1386,26 +1386,18 @@ static QemuConsole *new_console(DisplayState *ds, c= onsole_type_t console_type, return s; } =20 -static void qemu_alloc_display(DisplaySurface *surface, int width, int hei= ght) +DisplaySurface *qemu_create_displaysurface(int width, int height) { - qemu_pixman_image_unref(surface->image); - surface->image =3D NULL; + DisplaySurface *surface =3D g_new0(DisplaySurface, 1); =20 + trace_displaysurface_create(surface, width, height); surface->format =3D PIXMAN_x8r8g8b8; surface->image =3D pixman_image_create_bits(surface->format, width, height, NULL, width * 4); assert(surface->image !=3D NULL); - surface->flags =3D QEMU_ALLOCATED_FLAG; -} =20 -DisplaySurface *qemu_create_displaysurface(int width, int height) -{ - DisplaySurface *surface =3D g_new0(DisplaySurface, 1); - - trace_displaysurface_create(surface, width, height); - qemu_alloc_display(surface, width, height); return surface; } =20 --=20 2.29.2