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:
Derek Foreman 2017-06-29 13:51:07 -05:00
parent 4024857bf6
commit 892bfe7c98
3 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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.

View File

@ -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;