qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] gtk: add gl-area support on win32


From: marcandre . lureau
Subject: [PATCH] gtk: add gl-area support on win32
Date: Mon, 15 May 2023 17:25:27 +0400

From: Marc-André Lureau <marcandre.lureau@redhat.com>

On Windows, we don't use the low-level GBM/EGL helpers (no dmabuf etc),
we can turn on GL area support for the rest of rendering.

(fwiw, GDK backend may be either WGL or EGL)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 ui/gtk.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ui/gtk.c b/ui/gtk.c
index f16e0f8dee..0a39b1935b 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -2445,6 +2445,12 @@ static void early_gtk_display_init(DisplayOptions *opts)
             gtk_use_gl_area = true;
             gtk_gl_area_init();
         } else
+#endif
+#if defined(GDK_WINDOWING_WIN32)
+        if (GDK_IS_WIN32_DISPLAY(gdk_display_get_default())) {
+            gtk_use_gl_area = true;
+            gtk_gl_area_init();
+        } else
 #endif
         {
 #ifdef CONFIG_X11
-- 
2.40.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]