[PATCH 1/7] gl-renderer: Renaming of things and minor improvements
Daniel Stone
daniel at fooishbar.org
Tue Mar 22 09:06:25 UTC 2016
Hi Miguel,
On 21 March 2016 at 16:37, Miguel A. Vico <mvicomoya at nvidia.com> wrote:
> In preparation for follow-on changes to support frame presentation
> through EGLDevice+EGLOutput, this change includes the following:
> -Rename gl_renderer_output_create to gl_renderer_output_window_create
> -Add <platform_attribs> argument to gl_renderer_create
> -Rename <attribs> argument for gl_renderer_create() and
> gl_renderer_output_window_create() to <config_attribs>
> -Accept non-NULL empty <visual_id> arrays (n_ids == 0) both in
> gl_renderer_create() and gl_renderer_output_window_create()
It would be nice to split these up into discrete changes: one per
bullet point is a pretty good guideline. While you're at it,
gl_renderer->create() could definitely be renamed to something more
usefully specific, e.g. gl_render->display_create.
> diff --git a/src/gl-renderer.c b/src/gl-renderer.c
> index cb08344..0c55e0b 100644
> --- a/src/gl-renderer.c
> +++ b/src/gl-renderer.c
> @@ -2493,7 +2493,7 @@ egl_choose_config(struct gl_renderer *gr, const EGLint *attribs,
> goto out;
> }
>
> - if (!visual_id)
> + if (!visual_id || n_ids == 0)
> config_index = 0;
>
> for (i = 0; config_index == -1 && i < n_ids; i++)
This bit I'm a bit confused about though. How do you end up in this situation?
The rest look good to me, once split into separate patches.
Cheers,
Daniel
More information about the wayland-devel
mailing list