From f8b9b309b0edbe3bd2e140598783ea2d618248e7 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 6 Oct 2021 00:48:33 +0200 Subject: egl: Move extension checks to GdkDisplay We check the same extensions anyway, so no need to duplicate the code. --- gdk/gdkdisplay.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gdk/gdkdisplay.c') diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c index 398e191a12..c3aed432a1 100644 --- a/gdk/gdkdisplay.c +++ b/gdk/gdkdisplay.c @@ -1694,6 +1694,11 @@ gdk_display_init_egl (GdkDisplay *self, return FALSE; } + self->have_egl_buffer_age = + epoxy_has_egl_extension (priv->egl_display, "EGL_EXT_buffer_age"); + self->have_egl_swap_buffers_with_damage = + epoxy_has_egl_extension (priv->egl_display, "EGL_EXT_swap_buffers_with_damage"); + GDK_DISPLAY_NOTE (self, OPENGL, { char *ext = describe_extensions (priv->egl_display); char *cfg = describe_egl_config (priv->egl_display, priv->egl_config); @@ -1713,7 +1718,6 @@ gdk_display_init_egl (GdkDisplay *self, g_free (ext); }); - gdk_profiler_end_mark (start_time, "init EGL", NULL); return TRUE; -- cgit v1.2.1