[gtk/matthiasc/for-master: 13/13] gdk: Tweak our GL debug message callback




commit 8688778ab67000be1bf17cfd8ad5311356baecf3
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Oct 6 09:25:47 2020 -0400

    gdk: Tweak our GL debug message callback
    
    Go back to installing our debug message callback
    unconditionally if G_ENABLE_CONSISTENCY_CHECKS is
    defined, and allow opting into it using GDK_DEBUG=gl-debug
    otherwise.

 gdk/gdkglcontext.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
index 01c67688f2..c6942c709e 100644
--- a/gdk/gdkglcontext.c
+++ b/gdk/gdkglcontext.c
@@ -1011,15 +1011,19 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
 #ifdef G_ENABLE_DEBUG
   display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
   gl_debug = GDK_DISPLAY_DEBUG_CHECK (display, GL_DEBUG);
+#endif
 
-  if (priv->has_debug_output && gl_debug)
+  if (priv->has_debug_output
+#ifndef G_ENABLE_CONSISTENCY_CHECKS
+      && gl_debug
+#endif
+      )
     {
       gdk_gl_context_make_current (context);
       glEnable (GL_DEBUG_OUTPUT);
       glEnable (GL_DEBUG_OUTPUT_SYNCHRONOUS);
       glDebugMessageCallback (gl_debug_message_callback, NULL);
     }
-#endif
 
   if (priv->use_es)
     {


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