[gtk/debug-envvars-cleanup: 10/16] Make the gl-legacy debug flag always available
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/debug-envvars-cleanup: 10/16] Make the gl-legacy debug flag always available
- Date: Thu, 22 Sep 2022 02:01:55 +0000 (UTC)
commit 8bd3ec2ba1c3d44d29c6c3a96871199756ba0ae9
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Sep 21 21:09:08 2022 -0400
Make the gl-legacy debug flag always available
No need to restrict this to debug builds.
gdk/gdk.c | 2 +-
gdk/gdkglcontext.c | 4 ++--
gdk/win32/gdkglcontext-win32-wgl.c | 6 +++---
gdk/x11/gdkglcontext-glx.c | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gdk/gdk.c b/gdk/gdk.c
index f35f1ea8cf..637f76fb6a 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -119,7 +119,7 @@ static const GdkDebugKey gdk_debug_keys[] = {
{ "nograbs", GDK_DEBUG_NOGRABS, "Disable pointer and keyboard grabs (X11)", TRUE },
{ "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" },
+ { "gl-legacy", GDK_DEBUG_GL_LEGACY, "Use a legacy OpenGL context", TRUE },
{ "gl-gles", GDK_DEBUG_GL_GLES, "Only allow OpenGL GLES API" },
{ "gl-debug", GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL" },
{ "gl-egl", GDK_DEBUG_GL_EGL, "Use EGL on X11 or Windows" },
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index 3f22c00065..001addb622 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -395,8 +395,8 @@ gdk_gl_context_realize_egl (GdkGLContext *context,
return 0;
}
- prefer_legacy = (GDK_DISPLAY_DEBUG_CHECK (display, GL_LEGACY) ||
- (share != NULL && gdk_gl_context_is_legacy (share)));
+ prefer_legacy = (gdk_display_get_debug_flags(display) & GDK_DEBUG_GL_LEGACY) ||
+ (share != NULL && gdk_gl_context_is_legacy (share));
if (preferred_api == GDK_GL_API_GL)
{
diff --git a/gdk/win32/gdkglcontext-win32-wgl.c b/gdk/win32/gdkglcontext-win32-wgl.c
index d7ff4367f2..4fe04828ff 100644
--- a/gdk/win32/gdkglcontext-win32-wgl.c
+++ b/gdk/win32/gdkglcontext-win32-wgl.c
@@ -564,9 +564,9 @@ gdk_win32_gl_context_wgl_realize (GdkGLContext *context,
* A legacy context cannot be shared with core profile ones, so this means we
* must stick to a legacy context if the shared context is a legacy context
*/
- legacy_bit = GDK_DISPLAY_DEBUG_CHECK (display, GL_LEGACY) ?
- TRUE :
- share != NULL && gdk_gl_context_is_legacy (share);
+ legacy_bit = (gdk_display_get_debug_flags (display) & GDK_DEBUG_GL_LEGACY)
+ ? TRUE
+ : share != NULL && gdk_gl_context_is_legacy (share);
if (!set_wgl_pixformat_for_hdc (hdc,
&pixel_format,
diff --git a/gdk/x11/gdkglcontext-glx.c b/gdk/x11/gdkglcontext-glx.c
index d9e60bd747..2033e42902 100644
--- a/gdk/x11/gdkglcontext-glx.c
+++ b/gdk/x11/gdkglcontext-glx.c
@@ -609,7 +609,7 @@ gdk_x11_gl_context_glx_realize (GdkGLContext *context,
/* If there is no glXCreateContextAttribsARB() then we default to legacy */
legacy = !GDK_X11_DISPLAY (display)->has_glx_create_context;
- if (GDK_DISPLAY_DEBUG_CHECK (display, GL_LEGACY))
+ if (gdk_display_get_debug_flags (display) & GDK_DEBUG_GL_LEGACY)
legacy = TRUE;
/* We cannot share legacy contexts with core profile ones, so the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]