[PATCH 2/7] gl-renderer: Refactor gl_renderer_output_window_create()
Daniel Stone
daniel at fooishbar.org
Tue Mar 22 09:02:55 UTC 2016
Hi Miguel,
On 21 March 2016 at 16:37, Miguel A. Vico <mvicomoya at nvidia.com> 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
More information about the wayland-devel
mailing list