summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-04-04 14:26:20 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-04-04 14:42:34 +0900
commitcf2804a220c492674b219c2db65b18a502083aff (patch)
tree91fa7034cae4357d6ec760e0f8053a9af24d6505
parent8c3f4cd8163f98eb77e40b76d29272511e138753 (diff)
downloadefl-cf2804a220c492674b219c2db65b18a502083aff.tar.gz
Evas x11: Fix warnings and invalid calls in engine
This follows commit f10672dd7429dd98dd3b7d88d9c3c63aac392a40 which apparently forgot some changes in xlib and eglfs. I hope there are no remains of the old native bind/unbind functions. Also... I can't build everything, so I'm just hoping this works. Note: GL and SW native images are not using the same internal api prototypes.
-rw-r--r--src/modules/evas/engines/eglfs/evas_engine.c24
-rw-r--r--src/modules/evas/engines/software_x11/evas_xcb_image.c16
-rw-r--r--src/modules/evas/engines/software_x11/evas_xlib_dri_image.c4
-rw-r--r--src/modules/evas/engines/software_x11/evas_xlib_image.c12
4 files changed, 24 insertions, 32 deletions
diff --git a/src/modules/evas/engines/eglfs/evas_engine.c b/src/modules/evas/engines/eglfs/evas_engine.c
index c408375c96..648b54f89a 100644
--- a/src/modules/evas/engines/eglfs/evas_engine.c
+++ b/src/modules/evas/engines/eglfs/evas_engine.c
@@ -580,7 +580,7 @@ _re_winfree(Render_Engine *re)
}
static void
-_native_cb_bind(void *data EINA_UNUSED, void *image)
+_native_cb_bind(void *image)
{
Evas_GL_Image *img;
Native *n;
@@ -609,7 +609,7 @@ _native_cb_bind(void *data EINA_UNUSED, void *image)
}
static void
-_native_cb_unbind(void *data EINA_UNUSED, void *image)
+_native_cb_unbind(void *image)
{
Evas_GL_Image *img;
Native *n;
@@ -624,29 +624,26 @@ _native_cb_unbind(void *data EINA_UNUSED, void *image)
}
static void
-_native_cb_free(void *data, void *image)
+_native_cb_free(void *image)
{
- Render_Engine *re;
- Outbuf *ob;
Evas_GL_Image *img;
Native *n;
uint32_t texid;
void *wlid;
- if (!(re = (Render_Engine *)data)) return;
if (!(img = image)) return;
if (!(n = img->native.data)) return;
- if (!(ob = eng_get_ob(re))) return;
+ if (!img->native.shared) return;
if (n->ns.type == EVAS_NATIVE_SURFACE_WL)
{
- wlid = (void*)n->wl_buf;
- eina_hash_del(ob->gl_context->shared->native_wl_hash, &wlid, img);
+ wlid = n->wl_buf;
+ eina_hash_del(img->native.shared->native_wl_hash, &wlid, img);
if (n->egl_surface)
{
if (glsym_eglDestroyImage)
{
- glsym_eglDestroyImage(ob->egl.disp, n->egl_surface);
+ glsym_eglDestroyImage(img->native.disp, n->egl_surface);
if (eglGetError() != EGL_SUCCESS)
ERR("eglDestroyImage() failed.");
}
@@ -657,11 +654,10 @@ _native_cb_free(void *data, void *image)
else if (n->ns.type == EVAS_NATIVE_SURFACE_OPENGL)
{
texid = n->ns.data.opengl.texture_id;
- eina_hash_del(ob->gl_context->shared->native_tex_hash, &texid, img);
+ eina_hash_del(img->native.shared->native_tex_hash, &texid, img);
}
img->native.data = NULL;
- img->native.func.data = NULL;
img->native.func.bind = NULL;
img->native.func.unbind = NULL;
img->native.func.free = NULL;
@@ -1038,7 +1034,7 @@ eng_image_native_set(void *data, void *image, void *native)
if (img->native.data)
{
if (img->native.func.free)
- img->native.func.free(img->native.func.data, img);
+ img->native.func.free(img);
glsym_evas_gl_common_image_native_disable(img);
}
@@ -1145,7 +1141,6 @@ eng_image_native_set(void *data, void *image, void *native)
img->native.yinvert = 1;
img->native.loose = 0;
img->native.data = n;
- img->native.func.data = re;
img->native.func.bind = _native_cb_bind;
img->native.func.unbind = _native_cb_unbind;
img->native.func.free = _native_cb_free;
@@ -1171,7 +1166,6 @@ eng_image_native_set(void *data, void *image, void *native)
img->native.yinvert = 0;
img->native.loose = 0;
img->native.data = n;
- img->native.func.data = re;
img->native.func.bind = _native_cb_bind;
img->native.func.unbind = _native_cb_unbind;
img->native.func.free = _native_cb_free;
diff --git a/src/modules/evas/engines/software_x11/evas_xcb_image.c b/src/modules/evas/engines/software_x11/evas_xcb_image.c
index 8688d07e71..3794cb990c 100644
--- a/src/modules/evas/engines/software_x11/evas_xcb_image.c
+++ b/src/modules/evas/engines/software_x11/evas_xcb_image.c
@@ -6,12 +6,11 @@
#include "evas_xcb_image.h"
static void
-_evas_xcb_image_update(void *data EINA_UNUSED, void *image, int x, int y, int w, int h)
+_evas_xcb_image_update(void *image, int x, int y, int w, int h)
{
- RGBA_Image *im;
+ RGBA_Image *im = image;
Native *n;
- im = image;
n = im->native.data;
if (ecore_x_image_get(n->ns_data.x11.exim, n->ns_data.x11.pixmap, 0, 0, x, y, w, h))
@@ -37,16 +36,15 @@ _evas_xcb_image_update(void *data EINA_UNUSED, void *image, int x, int y, int w,
}
static void
-_native_cb_bind(int x, int y, int w, int h)
+_native_cb_bind(void *image, int x, int y, int w, int h)
{
- RGBA_Image *im;
+ RGBA_Image *im = image;
Native *n;
- im = image;
n = im->native.data;
if ((n) && (n->ns.type == EVAS_NATIVE_SURFACE_X11))
- _evas_xcb_image_update(NULL, image, x, y, w, h);
+ _evas_xcb_image_update(image, x, y, w, h);
}
static void
@@ -75,7 +73,7 @@ _native_cb_free(void *image)
}
void *
-evas_xcb_image_native_set(void *data, void *image, void *native)
+evas_xcb_image_native_set(void *data EINA_UNUSED, void *image, void *native)
{
RGBA_Image *im;
Evas_Native_Surface *ns;
@@ -118,7 +116,7 @@ evas_xcb_image_native_set(void *data, void *image, void *native)
im->native.func.unbind = NULL;
im->native.func.free = _native_cb_free;
- _evas_xcb_image_update(data, image, 0, 0, w, h);
+ _evas_xcb_image_update(image, 0, 0, w, h);
}
return im;
diff --git a/src/modules/evas/engines/software_x11/evas_xlib_dri_image.c b/src/modules/evas/engines/software_x11/evas_xlib_dri_image.c
index a4fc0e08fb..7c968eecb1 100644
--- a/src/modules/evas/engines/software_x11/evas_xlib_dri_image.c
+++ b/src/modules/evas/engines/software_x11/evas_xlib_dri_image.c
@@ -511,7 +511,7 @@ evas_xlib_image_dri_new(int w, int h, Visual *vis, int depth)
}
static void
-_native_bind_cb(void *data EINA_UNUSED, void *image, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED)
+_native_bind_cb(void *image, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED)
{
RGBA_Image *im = image;
Native *n = im->native.data;
@@ -526,7 +526,7 @@ _native_bind_cb(void *data EINA_UNUSED, void *image, int x EINA_UNUSED, int y EI
}
static void
-_native_free_cb(void *data EINA_UNUSED, void *image)
+_native_free_cb(void *image)
{
RGBA_Image *im = image;
Native *n = im->native.data;
diff --git a/src/modules/evas/engines/software_x11/evas_xlib_image.c b/src/modules/evas/engines/software_x11/evas_xlib_image.c
index fdbcee6422..c8f5eca614 100644
--- a/src/modules/evas/engines/software_x11/evas_xlib_image.c
+++ b/src/modules/evas/engines/software_x11/evas_xlib_image.c
@@ -6,7 +6,7 @@
#include "evas_xlib_image.h"
static void
-evas_xlib_image_update(void *data EINA_UNUSED, void *image, int x, int y, int w, int h)
+evas_xlib_image_update(void *image, int x, int y, int w, int h)
{
RGBA_Image *im = image;
Native *n = im->native.data;
@@ -33,19 +33,19 @@ evas_xlib_image_update(void *data EINA_UNUSED, void *image, int x, int y, int w,
}
static void
-_native_bind_cb(void *data, void *image, int x, int y, int w, int h)
+_native_bind_cb(void *image, int x, int y, int w, int h)
{
RGBA_Image *im = image;
Native *n = im->native.data;
if ((n) && (n->ns.type == EVAS_NATIVE_SURFACE_X11))
{
- evas_xlib_image_update(data, image, x, y, w, h);
+ evas_xlib_image_update(image, x, y, w, h);
}
}
static void
-_native_free_cb(void *data EINA_UNUSED, void *image)
+_native_free_cb(void *image)
{
RGBA_Image *im = image;
Native *n = im->native.data;
@@ -66,7 +66,7 @@ _native_free_cb(void *data EINA_UNUSED, void *image)
}
void *
-evas_xlib_image_native_set(void *data, void *image, void *native)
+evas_xlib_image_native_set(void *data EINA_UNUSED, void *image, void *native)
{
RGBA_Image *im = image;
Evas_Native_Surface *ns = native;
@@ -105,7 +105,7 @@ evas_xlib_image_native_set(void *data, void *image, void *native)
im->native.func.bind = _native_bind_cb;
im->native.func.free = _native_free_cb;
- evas_xlib_image_update(data, image, 0, 0, w, h);
+ evas_xlib_image_update(image, 0, 0, w, h);
}
return im;
}