forked from enlightenment/efl
dmabuf: Make a define for the version of the dmabuf attribute struct
I should've done this in the first place, and the version checks are starting to spread out a bit.
This commit is contained in:
parent
4024857bf6
commit
892bfe7c98
|
@ -1320,7 +1320,7 @@ eng_image_native_set(void *engine, void *image, void *native)
|
|||
struct dmabuf_attributes *a;
|
||||
|
||||
a = ns->data.wl_dmabuf.attr;
|
||||
if (a->version != 1)
|
||||
if (a->version != EVAS_DMABUF_ATTRIBUTE_VERSION)
|
||||
{
|
||||
glsym_evas_gl_common_image_free(img);
|
||||
return NULL;
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
|
||||
//#include <Evas_Common.h>
|
||||
|
||||
#define EVAS_DMABUF_ATTRIBUTE_VERSION 1
|
||||
|
||||
struct dmabuf_attributes
|
||||
{
|
||||
/* This must exactly match the struct in Enlightenment.
|
||||
|
|
|
@ -107,7 +107,7 @@ _evas_native_dmabuf_surface_image_set(void *image, void *native)
|
|||
if (!n) return NULL;
|
||||
|
||||
a = ns->data.wl_dmabuf.attr;
|
||||
if (a->version != 1)
|
||||
if (a->version != EVAS_DMABUF_ATTRIBUTE_VERSION)
|
||||
{
|
||||
free(n);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue