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
-3
View File
@@ -870,7 +870,6 @@ x11_output_switch_mode(struct weston_output *base, struct weston_mode *mode)
ret = gl_renderer->output_window_create(&output->base,
(EGLNativeWindowType) output->window,
&xid,
gl_renderer->opaque_attribs,
x11_formats,
ARRAY_LENGTH(x11_formats));
if (ret < 0)
@@ -1046,7 +1045,6 @@ x11_output_enable(struct weston_output *base)
&output->base,
(EGLNativeWindowType) output->window,
&xid,
gl_renderer->opaque_attribs,
x11_formats,
ARRAY_LENGTH(x11_formats));
if (ret < 0)
@@ -1815,7 +1813,6 @@ init_gl_renderer(struct x11_backend *b)
ret = gl_renderer->display_create(b->compositor, EGL_PLATFORM_X11_KHR,
(void *) b->dpy,
gl_renderer->opaque_attribs,
x11_formats,
ARRAY_LENGTH(x11_formats));