[gtk/wip/otte/gl-hdr] xxx display




commit a7852cabbe00c40d998b07dde254ce4768b4d731
Author: Benjamin Otte <otte redhat com>
Date:   Tue Oct 5 04:16:16 2021 +0200

    xxx display

 gdk/gdkdisplay.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 98cfc2e0c0..398e191a12 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -36,7 +36,9 @@
 #include "gdkglcontextprivate.h"
 #include "gdkmonitorprivate.h"
 
+#ifdef HAVE_EGL
 #include <epoxy/egl.h>
+#endif
 #include <math.h>
 
 /**
@@ -88,8 +90,10 @@ struct _GdkDisplayPrivate {
   GdkGLContext *gl_context;
   GError *gl_error;
 
+#ifdef HAVE_EGL
   EGLDisplay egl_display;
   EGLConfig egl_config;
+#endif
 
   guint rgba : 1;
   guint composited : 1;
@@ -156,6 +160,7 @@ gdk_display_default_rate_egl_config (GdkDisplay *display,
                                      gpointer    config)
 {
   guint distance = 0;
+#ifdef HAVE_EGL
   int tmp;
 
   if (!eglGetConfigAttrib (egl_display, config, EGL_SAMPLE_BUFFERS, &tmp) || tmp != 0)
@@ -164,6 +169,7 @@ gdk_display_default_rate_egl_config (GdkDisplay *display,
   if (!eglGetConfigAttrib (egl_display, config, EGL_DEPTH_SIZE, &tmp) || tmp != 0 ||
       !eglGetConfigAttrib (egl_display, config, EGL_STENCIL_SIZE, &tmp) || tmp != 0)
     distance += 0x10000;
+#endif
 
   return distance;
 }
@@ -375,7 +381,9 @@ gdk_display_dispose (GObject *object)
   g_queue_clear (&display->queued_events);
 
   g_clear_object (&priv->gl_context);
+#ifdef HAVE_EGL
   g_clear_pointer (&priv->egl_display, eglTerminate);
+#endif
   g_clear_error (&priv->gl_error);
 
   G_OBJECT_CLASS (gdk_display_parent_class)->dispose (object);
@@ -1336,6 +1344,7 @@ gdk_display_get_gl_context (GdkDisplay *self)
   return priv->gl_context;
 }
 
+#ifdef HAVE_EGL
 #ifdef G_ENABLE_DEBUG
 static int
 strvcmp (gconstpointer p1,
@@ -1709,6 +1718,7 @@ gdk_display_init_egl (GdkDisplay  *self,
 
   return TRUE;
 }
+#endif
 
 GdkDebugFlags
 gdk_display_get_debug_flags (GdkDisplay *display)


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