gl_drm: Improve dmabuf validity test

Now that higher layers are setting load errors this can be less gruesome.
This commit is contained in:
Derek Foreman 2017-06-30 14:52:54 -05:00
parent f45c0fcd67
commit b8165098dc
1 changed files with 9 additions and 5 deletions

View File

@ -1202,12 +1202,16 @@ eng_image_native_set(void *engine, void *image, void *native)
attr = ns->data.wl_dmabuf.attr;
if (attr->version == EVAS_DMABUF_ATTRIBUTE_VERSION)
v = gl_import_simple_dmabuf(ob->egl.disp, attr);
if (!v) {
ns->data.wl_dmabuf.attr = NULL;
return NULL;
}
if (!v) return NULL;
glsym_eglDestroyImage(ob->egl.disp, v);
return NULL;
img =
glsym_evas_gl_common_image_new_from_data(ob->gl_context,
attr->width,
attr->height,
NULL, 1,
EVAS_COLORSPACE_ARGB8888);
return img;
}
}
else