From nobody Fri May 17 06:07:28 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1547639203209172.60563916592014; Wed, 16 Jan 2019 03:46:43 -0800 (PST) Received: from localhost ([127.0.0.1]:58099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjjec-0004oT-1u for importer@patchew.org; Wed, 16 Jan 2019 06:46:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjjX2-0007DL-Bg for qemu-devel@nongnu.org; Wed, 16 Jan 2019 06:38:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjjWz-0007rR-4T for qemu-devel@nongnu.org; Wed, 16 Jan 2019 06:38:50 -0500 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]:37285) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gjjWp-0006pZ-Bs for qemu-devel@nongnu.org; Wed, 16 Jan 2019 06:38:41 -0500 Received: by mail-lj1-x243.google.com with SMTP id t18-v6so5165203ljd.4 for ; Wed, 16 Jan 2019 03:38:00 -0800 (PST) Received: from alexander-box.luxoft.com ([62.96.135.139]) by smtp.gmail.com with ESMTPSA id g17sm1137970lfg.78.2019.01.16.03.37.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 03:37:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ax3kxEWA5/fIcKbNWJHsaSJpNwc4/MiwZDZ9+a/r/kE=; b=NMn5UluI8eISsCoY9qRQE7nP1IcbzY9azAlpI2XEFhNCs1ppXPFQya7KS/D1LBOmU0 dBBMygmqqYOSJd5JCaKHuApIEodR1RAvKr0/pyq2Chf4KZFFBsV+ZNtqldjPEaHU+vyj UvjJZ7J3kM00JVxdn3Hczgu+aHo2fx/Vok8oOwJVCJAfhvNrpSEJV0AZ5vDq4X/9c1Ur /1gbzkHEdhL3vyf+DNO91dQ3y0gDdXCI5oFJV8V3rB1lt3AxFS4VtgedtAgwu8AKn5Jj EKcr0J/A4SEPl/Y7rM8rcAnZtoI1ZWfVmpfKSsoRpXvKCS75wbbvy3oMjTxyVX5Pkn9R rm8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ax3kxEWA5/fIcKbNWJHsaSJpNwc4/MiwZDZ9+a/r/kE=; b=cSk0dhkubCzS2dXEMDpuvcpouXPTdGpoEoBn/CkrTTETBcUno+5s6QKmo92vVf6bSQ dtKEmDzbsP5lYNuuzM6VzCySkLpn2DtKms/tNdhXwQ8oGjyM6J8/OlCX6jXl2Qs5SJaJ rZyBC7fXVqW0XsFFyeO7bG27QtmvDJRUA7Tp1ayYsyW7K65xcYjGJq25CkvWeuBAXVF9 nXnwyiFEB4/F3e2AQym05e3dyGMGukO9K0nBlHHTTSini/b/jxuy6nwXn9cvoTU7Mrq9 Yj6bi5FCpheev63vq0AOiSxNb7gFE/lKjea2/WsT8YYzCPlWRmVCQ1BKJ/dDM5xBKdKN 0Rkw== X-Gm-Message-State: AJcUukfPgglBA/QexMQ1P/UE5I3LtTDN4Uq9OwFKJZelJ7dpZGmXi6fa iVYyr5Qmsr3nR0A10HPud8x4G9/HgM4= X-Google-Smtp-Source: ALg8bN6/vShVfNM1Tol9BJwA+IHoldAEPjieYW6QLJv9gwUzSZbRwkD27aWqwLD5tpQPzG8yI57YhA== X-Received: by 2002:a2e:449b:: with SMTP id b27-v6mr6105880ljf.47.1547638678746; Wed, 16 Jan 2019 03:37:58 -0800 (PST) From: Alexander Kanavin To: qemu-devel@nongnu.org Date: Wed, 16 Jan 2019 12:37:51 +0100 Message-Id: <20190116113751.17177-1-alex.kanavin@gmail.com> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::243 Subject: [Qemu-devel] [PATCH] egl-helpers.h: do not depend on X11 Window type, use EGLNativeWindowType X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Kanavin Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It was assumed that mesa provides the necessary X11 includes, but it is not always the case, as it can be configured without x11 support. Signed-off-by: Alexander Kanavin Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/ui/egl-helpers.h | 2 +- ui/egl-helpers.c | 4 ++-- ui/gtk-egl.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h index 9db7293bdb..3fc656a7ba 100644 --- a/include/ui/egl-helpers.h +++ b/include/ui/egl-helpers.h @@ -43,7 +43,7 @@ void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf); =20 #endif =20 -EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win); +EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType = win); =20 int qemu_egl_init_dpy_x11(EGLNativeDisplayType dpy, DisplayGLMode mode); int qemu_egl_init_dpy_mesa(EGLNativeDisplayType dpy, DisplayGLMode mode); diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index 4f475142fc..5e115b3fb4 100644 --- a/ui/egl-helpers.c +++ b/ui/egl-helpers.c @@ -273,14 +273,14 @@ void egl_dmabuf_release_texture(QemuDmaBuf *dmabuf) =20 /* ---------------------------------------------------------------------- = */ =20 -EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win) +EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, EGLNativeWindowType = win) { EGLSurface esurface; EGLBoolean b; =20 esurface =3D eglCreateWindowSurface(qemu_egl_display, qemu_egl_config, - (EGLNativeWindowType)win, NULL); + win, NULL); if (esurface =3D=3D EGL_NO_SURFACE) { error_report("egl: eglCreateWindowSurface failed"); return NULL; diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 5420c2362b..1f9411626a 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -54,7 +54,7 @@ void gd_egl_init(VirtualConsole *vc) } =20 vc->gfx.ectx =3D qemu_egl_init_ctx(); - vc->gfx.esurface =3D qemu_egl_init_surface_x11(vc->gfx.ectx, x11_windo= w); + vc->gfx.esurface =3D qemu_egl_init_surface_x11(vc->gfx.ectx, (EGLNativ= eWindowType)x11_window); =20 assert(vc->gfx.esurface); } --=20 2.17.1