Hi Miguel,

On 21 March 2016 at 16:37, Miguel A. Vico <[email protected]> wrote:
> +       egl_surface = gl_renderer_create_window_surface(gr,
> +                                                       window_for_legacy,
> +                                                       window_for_platform,
> +                                                       config_attribs,
> +                                                       visual_id, n_ids);
> +
> +       ret = gl_renderer_output_create(output, egl_surface);
> +       if (ret < 0 && egl_surface != EGL_NO_SURFACE)
> +               eglDestroySurface(gr->egl_display, egl_surface);

I'm not a huge fan of the error-handling here: I'd rather see an
instant return -1 from this function if we can't create an EGLSurface,
rather than relying on gl_renderer_output_create to check and handle
it for us.

Otherwise I guess this looks OK.

Cheers,
Daniel
_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to