gtk: add gl-area support on win32

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>
Tested-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230515132527.1026064-1-marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2023-05-15 17:25:27 +04:00
parent 529969b8d0
commit 57430aa4af
1 changed files with 6 additions and 0 deletions

View File

@ -2443,6 +2443,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