From nobody Mon Feb 9 23:39:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1654852895; cv=none; d=zohomail.com; s=zohoarc; b=cn8gkQQv6oYIe4EMoBlHIdKQGsn0Ef3+tGDT0M06B6z3J2v1mGQGEkM2RJ3qNR7Z85g4l5aZ6ZriYcwKmAk98h0DdJcwAY56xsrmSSK+ZG8VWY5aVxq2oVKobu/7p6C17ZhR6/ZTJdHZNHk4XjmayUcqfza0M+fb5JYiuY/m/Y4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654852895; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=h/Rq0T4qHdj5P4fsrjuVBaKf49W5WppINvxKA/pkbYI=; b=MuaLZPo3GgyhVDUbi/+494FNgbn0A3piycocrn0qmnmzurvPfx2q6oB+5dgBdTnNq3aRKAzGK3nmPBIGOTpIzqmIOynQnoaHBPsyDnFYkhdU233XBvilKe/Vf0GNobCxU4GzN1+WN34LPm+YUYC5ZMrv7TnlULv0H10hVfyY9sA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1654852895494643.0013926797335; Fri, 10 Jun 2022 02:21:35 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.346076.571798 (Exim 4.92) (envelope-from ) id 1nzapL-00050W-88; Fri, 10 Jun 2022 09:21:11 +0000 Received: by outflank-mailman (output) from mailman id 346076.571798; Fri, 10 Jun 2022 09:21:11 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nzapL-00050P-4m; Fri, 10 Jun 2022 09:21:11 +0000 Received: by outflank-mailman (input) for mailman id 346076; Fri, 10 Jun 2022 09:21:10 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nzapK-00050F-J2 for xen-devel@lists.xenproject.org; Fri, 10 Jun 2022 09:21:10 +0000 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id a8200d9a-e89e-11ec-8179-c7c2a468b362; Fri, 10 Jun 2022 11:21:07 +0200 (CEST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-617-nzXNfmnLMbOoxz3AGOvaGg-1; Fri, 10 Jun 2022 05:21:03 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 42C611C05AB3; Fri, 10 Jun 2022 09:21:02 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D13B42026D64; Fri, 10 Jun 2022 09:21:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CC0541800395; Fri, 10 Jun 2022 11:20:43 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a8200d9a-e89e-11ec-8179-c7c2a468b362 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654852866; h=from:from: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; bh=h/Rq0T4qHdj5P4fsrjuVBaKf49W5WppINvxKA/pkbYI=; b=QvyYpERN/p0ov2jUXygGbS2X6GGDJaIh6HnnOVP2DnkcqqzU3kSyjASboULlUq/rZ6/szm Z8095fEqgAJ1NYI5MEvksbTZitOHFeu3zU3df7BbLkrs1xyGcUIosFdBnvdPImdE1X1BdO 57ev0atq/XWWtjaZoPleX/ahy5nCKVo= X-MC-Unique: nzXNfmnLMbOoxz3AGOvaGg-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Cc: "Canokeys.org" , "Michael S. Tsirkin" , Stefano Stabellini , Anthony Perard , Paul Durrant , Akihiko Odaki , Peter Maydell , "Hongren (Zenithal) Zheng" , xen-devel@lists.xenproject.org, Alex Williamson , Gerd Hoffmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Volker=20R=C3=BCmelin?= Subject: [PULL 01/17] ui/gtk-gl-area: implement GL context destruction Date: Fri, 10 Jun 2022 11:20:27 +0200 Message-Id: <20220610092043.1874654-2-kraxel@redhat.com> In-Reply-To: <20220610092043.1874654-1-kraxel@redhat.com> References: <20220610092043.1874654-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654852897137100001 From: Volker R=C3=BCmelin The counterpart function for gd_gl_area_create_context() is currently empty. Implement the gd_gl_area_destroy_context() function to avoid GL context leaks. Signed-off-by: Volker R=C3=BCmelin Message-Id: <20220605085131.7711-1-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann --- ui/gtk-gl-area.c | 8 +++++++- ui/trace-events | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c index fc5a082eb846..0e20ea031d34 100644 --- a/ui/gtk-gl-area.c +++ b/ui/gtk-gl-area.c @@ -201,7 +201,13 @@ QEMUGLContext gd_gl_area_create_context(DisplayGLCtx *= dgc, =20 void gd_gl_area_destroy_context(DisplayGLCtx *dgc, QEMUGLContext ctx) { - /* FIXME */ + GdkGLContext *current_ctx =3D gdk_gl_context_get_current(); + + trace_gd_gl_area_destroy_context(ctx, current_ctx); + if (ctx =3D=3D current_ctx) { + gdk_gl_context_clear_current(); + } + g_clear_object(&ctx); } =20 void gd_gl_area_scanout_texture(DisplayChangeListener *dcl, diff --git a/ui/trace-events b/ui/trace-events index f78b5e66061f..1040ba0f88c7 100644 --- a/ui/trace-events +++ b/ui/trace-events @@ -26,6 +26,7 @@ gd_key_event(const char *tab, int gdk_keycode, int qkeyco= de, const char *action) gd_grab(const char *tab, const char *device, const char *reason) "tab=3D%s= , dev=3D%s, reason=3D%s" gd_ungrab(const char *tab, const char *device) "tab=3D%s, dev=3D%s" gd_keymap_windowing(const char *name) "backend=3D%s" +gd_gl_area_destroy_context(void *ctx, void *current_ctx) "ctx=3D%p, curren= t_ctx=3D%p" =20 # vnc-auth-sasl.c # vnc-auth-vencrypt.c --=20 2.36.1