Make the gl-gles debug flag always available
authorMatthias Clasen <mclasen@redhat.com>
Thu, 22 Sep 2022 01:12:22 +0000 (21:12 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 22 Sep 2022 01:12:22 +0000 (21:12 -0400)
No need to restrict this to debug builds.

gdk/gdk.c
gdk/gdkglcontext.c
gdk/win32/gdkdisplay-win32.c

index 637f76fb6a86c444fba2555b06f4e9812d8565f4..cc2a81f1d42738a449794c42465fcda927bf5d4f 100644 (file)
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -120,7 +120,7 @@ static const GdkDebugKey gdk_debug_keys[] = {
   { "portals",         GDK_DEBUG_PORTALS, "Force the use of portals", TRUE },
   { "gl-disable",      GDK_DEBUG_GL_DISABLE, "Disable OpenGL support", TRUE },
   { "gl-legacy",       GDK_DEBUG_GL_LEGACY, "Use a legacy OpenGL context", TRUE },
-  { "gl-gles",         GDK_DEBUG_GL_GLES, "Only allow OpenGL GLES API" },
+  { "gl-gles",         GDK_DEBUG_GL_GLES, "Only allow OpenGL GLES API", TRUE },
   { "gl-debug",        GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL" },
   { "gl-egl",          GDK_DEBUG_GL_EGL, "Use EGL on X11 or Windows" },
   { "gl-glx",          GDK_DEBUG_GL_GLX, "Use GLX on X11" },
index 001addb6222092c72da61d1f1f8690486e39266c..0452640244d29152833ba9fbadecc8d4f3a8b5db 100644 (file)
@@ -1265,7 +1265,7 @@ gdk_gl_context_is_api_allowed (GdkGLContext  *self,
 {
   GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (self);
 
-  if (GDK_DISPLAY_DEBUG_CHECK (gdk_gl_context_get_display (self), GL_GLES))
+  if (gdk_display_get_debug_flags (gdk_gl_context_get_display (self)) & GDK_DEBUG_GL_GLES)
     {
       if (!(api & GDK_GL_API_GLES))
         {
index fa4cfcd2d4b068eb34ed264ee97813314001cd81..5c53f247c264f4bce8d3c41e949b7e7ec5032e9d 100644 (file)
@@ -1197,7 +1197,7 @@ gdk_win32_display_init_gl (GdkDisplay  *display,
    * Disable defaulting to EGL as EGL is used more as a compatibility layer
    * on Windows rather than being a native citizen on Windows
    */
-  if (GDK_DEBUG_CHECK (GL_EGL) || GDK_DEBUG_CHECK (GL_GLES))
+  if (gdk_display_get_debug_flags (display) & (GDK_DEBUG_GL_EGL|GDK_DEBUG_GL_GLES))
     {
       if (gdk_display_init_egl (display,
                                 EGL_PLATFORM_ANGLE_ANGLE,