gl-renderer: use gl_renderer_get_egl_config() for display_create

Replace a direct call to egl_choose_config() with a higher level function
gl_renderer_get_egl_config(). This will make follow-up work easier when
attribute lists will be generated inside gl_renderer_get_egl_config() instead
of passed in as is.

We explicitly replace visual_id with drm_formats, because that is what they
really are. Only the DRM backend passes in other than NULL/0, and if other
backends start caring about the actual pixel format, drm_format is the lingua
franca.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen
2019-09-13 16:14:19 +03:00
parent 8e42af02a6
commit d8e851899a
3 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -735,12 +735,12 @@ fallback_format_for(uint32_t format)
static int
drm_backend_create_gl_renderer(struct drm_backend *b)
{
EGLint format[3] = {
uint32_t format[3] = {
b->gbm_format,
fallback_format_for(b->gbm_format),
0,
};
int n_formats = 2;
unsigned n_formats = 2;
if (format[1])
n_formats = 3;