[PATCH 1/7] gl-renderer: Renaming of things and minor improvements

Miguel Angel Vico mvicomoya at nvidia.com
Tue Mar 22 22:46:18 UTC 2016


Hi Daniel,

On Tue, 22 Mar 2016 09:06:25 +0000
Daniel Stone <daniel at fooishbar.org> wrote:

> 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.

Consider it done.

> 
> > 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?

An early version of the patches was passing a non-null visual_id array
with n_ids == 0 for the streams case, which I think is valid. I
thought it wouldn't hurt to also check for n_ids != 0 there and avoid
possible bugs in the future.

> 
> The rest look good to me, once split into separate patches.
> 
> Cheers,
> Daniel


-- 
Miguel

NVIDIA GmbH, Wuerselen, Germany, Amtsgericht Aachen, HRB 8361
Managing Director: Karen Theresa Burns

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------


More information about the wayland-devel mailing list