}
static void
-_native_cb_bind(void *data EINA_UNUSED, void *image)
+_native_cb_bind(void *image)
{
Evas_GL_Image *img;
Native *n;
}
static void
-_native_cb_unbind(void *data EINA_UNUSED, void *image)
+_native_cb_unbind(void *image)
{
Evas_GL_Image *img;
Native *n;
}
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.");
}
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;
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);
}
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;
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;
#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))
}
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
}
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;
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;
}
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;
}
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;
#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;
}
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;
}
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;
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;
}