gl-renderer: Move EGL client extension handling earlier

EGL client extensions are not tied to the EGLDisplay we create, and have
an effect on how we create the EGLDisplay. Since we're using this to
look for EGL_EXT_platform_base, it makes more sense for this to be near
the start of the GL renderer initialization.

Signed-off-by: Scott Anderson <scott.anderson@collabora.com>
dev
Scott Anderson 5 years ago
parent 598d3a15b7
commit dddb592cfb
  1. 6
      libweston/renderer-gl/egl-glue.c
  2. 3
      libweston/renderer-gl/gl-renderer-internal.h
  3. 2
      libweston/renderer-gl/gl-renderer.c

@ -455,8 +455,8 @@ gl_renderer_get_egl_config(struct gl_renderer *gr,
return egl_config;
}
static void
renderer_setup_egl_client_extensions(struct gl_renderer *gr)
void
gl_renderer_setup_egl_client_extensions(struct gl_renderer *gr)
{
const char *extensions;
@ -593,7 +593,5 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
"to missing EGL_KHR_wait_sync extension\n");
}
renderer_setup_egl_client_extensions(gr);
return 0;
}

@ -135,6 +135,9 @@ gl_renderer_get_egl_config(struct gl_renderer *gr,
const uint32_t *drm_formats,
unsigned drm_formats_count);
void
gl_renderer_setup_egl_client_extensions(struct gl_renderer *gr);
int
gl_renderer_setup_egl_extensions(struct weston_compositor *ec);

@ -3480,6 +3480,8 @@ gl_renderer_display_create(struct weston_compositor *ec,
if (gr == NULL)
return -1;
gl_renderer_setup_egl_client_extensions(gr);
gr->base.read_pixels = gl_renderer_read_pixels;
gr->base.repaint_output = gl_renderer_repaint_output;
gr->base.flush_damage = gl_renderer_flush_damage;

Loading…
Cancel
Save