forked from enlightenment/efl
software_generic: Check dmabuf attribute version during set
We should check here instead of only at time of usage.
This commit is contained in:
parent
892bfe7c98
commit
2e0e017b87
|
@ -1134,7 +1134,21 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native)
|
||||||
RGBA_Image *im = image;
|
RGBA_Image *im = image;
|
||||||
Image_Entry *ie = image, *ie2;
|
Image_Entry *ie = image, *ie2;
|
||||||
|
|
||||||
if (!im) return NULL;
|
if (!im)
|
||||||
|
{
|
||||||
|
/* This is a probe for wl_dmabuf viability */
|
||||||
|
if (ns && ns->type == EVAS_NATIVE_SURFACE_WL_DMABUF &&
|
||||||
|
!ns->data.wl_dmabuf.resource)
|
||||||
|
{
|
||||||
|
struct dmabuf_attributes *attr;
|
||||||
|
|
||||||
|
attr = ns->data.wl_dmabuf.attr;
|
||||||
|
if (attr->version != EVAS_DMABUF_ATTRIBUTE_VERSION)
|
||||||
|
ns->data.wl_dmabuf.attr = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
if (!ns)
|
if (!ns)
|
||||||
{
|
{
|
||||||
if (im->native.data && im->native.func.free)
|
if (im->native.data && im->native.func.free)
|
||||||
|
|
Loading…
Reference in New Issue