Hi Varad, On 17 November 2016 at 11:55, Varad Gautam <varadgau...@gmail.com> wrote: > @@ -1847,6 +1851,69 @@ import_dmabuf(struct gl_renderer *gr, > } > > static bool > +gl_renderer_query_dmabuf_formats(struct weston_compositor *wc, > + int **formats, int *num_formats) > +{ > + struct gl_renderer *gr = get_renderer(wc); > + EGLint num; > + > + assert(gr->has_dmabuf_import); > + > + if (!gr->query_dmabuf_formats(gr->egl_display, 0, NULL, &num)) { > + *num_formats = 0; > + return false; > + } > + > + *formats = calloc(1, num * sizeof(int));
calloc(num, sizeof(int)) > +static bool > +gl_renderer_query_dmabuf_modifiers(struct weston_compositor *wc, int format, > + uint64_t **modifiers, > + int *num_modifiers) > +{ > + struct gl_renderer *gr = get_renderer(wc); > + int num; > + > + assert(gr->has_dmabuf_import); > + > + if (!gr->has_dmabuf_import_modifiers || > + !gr->query_dmabuf_modifiers(gr->egl_display, format, 0, NULL, > + NULL, &num)) { The test can just be removed here, as there's none for query_dmabuf_formats. With those fixed: Reviewed-by: Daniel Stone <dani...@collabora.com> Cheers, Daniel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel