Hi, 2016-10-07 17:08 GMT+02:00 Vincent Abriou <[email protected]>: > While gl_renderer_attach, query_buffer should be call only if the > query_buffer function exists. > > Signed-off-by: Vincent Abriou <[email protected]> > --- > libweston/gl-renderer.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c > index 6276188..caa72d7 100644 > --- a/libweston/gl-renderer.c > +++ b/libweston/gl-renderer.c > @@ -2004,7 +2004,8 @@ gl_renderer_attach(struct weston_surface *es, struct > weston_buffer *buffer) > > if (shm_buffer) > gl_renderer_attach_shm(es, buffer, shm_buffer); > - else if (gr->query_buffer(gr->egl_display, (void *) buffer->resource, > + else if (gr->query_buffer &&
gr->query_buffer is eglQueryWaylandBufferWL, which is mandated by the EGL_WL_bind_wayland_display extension. So rather than checking query_buffer here, i think it should check for gr->has_bind_display, which makes it more explicit that it's not just that function missing, but the whole thing. Thanks, Giulio > + gr->query_buffer(gr->egl_display, (void *)buffer->resource, > EGL_TEXTURE_FORMAT, &format)) > gl_renderer_attach_egl(es, buffer, format); > else if ((dmabuf = linux_dmabuf_buffer_get(buffer->resource))) > -- > 1.9.1 > > _______________________________________________ > wayland-devel mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
