gl-renderer: remove incorrect assertion
authorMichael Olbrich <m.olbrich@pengutronix.de>
Tue, 14 Jul 2020 14:14:50 +0000 (16:14 +0200)
committerSimon Ser <contact@emersion.fr>
Thu, 13 Aug 2020 18:50:57 +0000 (18:50 +0000)
The refcount is not zero if the corresponding buffer is attached to multiple
surfaces.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
libweston/renderer-gl/gl-renderer.c

index 937ebe865b414c975cbfd5b8a31f05e01a604eb6..d5bfe8303850b28ed983b403a6e3e1dfbeb429b2 100644 (file)
@@ -2534,7 +2534,6 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
        struct gl_surface_state *gs = get_surface_state(surface);
        struct dmabuf_image *image;
        int i;
-       int ret;
 
        if (!gr->has_dmabuf_import) {
                linux_dmabuf_buffer_send_server_error(dmabuf,
@@ -2580,10 +2579,8 @@ gl_renderer_attach_dmabuf(struct weston_surface *surface,
        /* The dmabuf_image should have been created during the import */
        assert(image != NULL);
 
-       for (i = 0; i < image->num_images; ++i) {
-               ret = egl_image_unref(image->images[i]);
-               assert(ret == 0);
-       }
+       for (i = 0; i < image->num_images; ++i)
+               egl_image_unref(image->images[i]);
 
        if (!import_known_dmabuf(gr, image)) {
                linux_dmabuf_buffer_send_server_error(dmabuf, "EGL dmabuf import failed");