Stop misuing EVAS_NATIVE_SURFACE_VERSION macro

Desktop / Enlightenment / Enlightenment - Derek Foreman [osg.samsung.com] - 6 June 2017 17:28 EDT

We should be stating the version the code supports, not the version that the EFL version we compiled against supports.

###

diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c
index 0d68b69..ca0f838 100644
--- a/src/bin/e_pixmap.c
+++ b/src/bin/e_pixmap.c
@@ -17,6 +17,8 @@
# include "e_comp_x.h"
#endif

+#define E_SUPPORTED_NATIVE_SURFACE_VERSION 4
+
#include

static Eina_Hash *pixmaps[2] = {NULL};
@@ -704,7 +706,7 @@ e_pixmap_native_surface_init(E_Pixmap *cp, Evas_Native_Surface *ns)
EINA_SAFETY_ON_NULL_RETURN_VAL(cp, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(ns, EINA_FALSE);

- ns->version = EVAS_NATIVE_SURFACE_VERSION;
+ ns->version = E_SUPPORTED_NATIVE_SURFACE_VERSION;
switch (cp->type)
{
case E_PIXMAP_TYPE_X:
@@ -1061,7 +1063,7 @@ e_pixmap_dmabuf_test(struct linux_dmabuf_buffer *dmabuf)
{
Eina_Bool ret;
ns.type = EVAS_NATIVE_SURFACE_WL_DMABUF;
- ns.version = EVAS_NATIVE_SURFACE_VERSION;
+ ns.version = E_SUPPORTED_NATIVE_SURFACE_VERSION;
ns.data.wl_dmabuf.attr = &dmabuf->attributes;
ns.data.wl_dmabuf.resource = NULL;
test = evas_object_image_add(e_comp->evas);

4a40614 Stop misuing EVAS_NATIVE_SURFACE_VERSION macro
src/bin/e_pixmap.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Upstream: git.enlightenment.org


  • Share