gl-renderer: remove EGLConfig attributes from API

Now that all backends pass in a list of acceptable DRM formats, that is used to
determine if the EGLConfig has an alpha channel or not. Therefore the
opaque_attribs and alpha_attribs are now useless, and we can remove the whole
config_attribs argument from the API.

gl_renderer_get_egl_config() uses an internal attrib list that matches at least
the union of the opaque_attribs and alpha_attribs matches.

Overall, behaviour should remain unchanged.

The new attribute array becomes variable in the future, so it is left
non-const.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen
2019-09-30 15:43:07 +03:00
parent 9ddb3bc315
commit 7cb7a6781f
7 changed files with 10 additions and 44 deletions
-2
View File
@@ -779,7 +779,6 @@ wayland_output_init_gl_renderer(struct wayland_output *output)
if (gl_renderer->output_window_create(&output->base,
output->gl.egl_window,
output->gl.egl_window,
gl_renderer->alpha_attribs,
wayland_formats,
ARRAY_LENGTH(wayland_formats)) < 0)
goto cleanup_window;
@@ -2774,7 +2773,6 @@ wayland_backend_create(struct weston_compositor *compositor,
if (gl_renderer->display_create(compositor,
EGL_PLATFORM_WAYLAND_KHR,
b->parent.wl_display,
gl_renderer->alpha_attribs,
wayland_formats,
ARRAY_LENGTH(wayland_formats)) < 0) {
weston_log("Failed to initialize the GL renderer; "