}
static void
-_native_cb_free(void *data, void *image)
+_native_cb_free(void *data EINA_UNUSED, 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->ns_data.wl_surface.wl_buf;
- eina_hash_del(ob->gl_context->shared->native_wl_hash, &wlid, img);
+ eina_hash_del(img->native.shared->native_wl_hash, &wlid, img);
if (n->ns_data.wl_surface.surface)
{
if (glsym_eglDestroyImage)
{
- glsym_eglDestroyImage(ob->egl.disp, n->ns_data.wl_surface.surface);
+ glsym_eglDestroyImage(img->native.disp, n->ns_data.wl_surface.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.yinvert = yinvert;
img->native.yinvert = 1;
img->native.loose = 0;
+ img->native.disp = ob->egl.disp;
+ img->native.shared = ob->gl_context->shared;
img->native.data = n;
img->native.func.data = re;
img->native.func.bind = _native_cb_bind;
img->native.yinvert = 0;
img->native.loose = 0;
+ img->native.disp = ob->egl.disp;
+ img->native.shared = ob->gl_context->shared;
img->native.data = n;
img->native.func.data = re;
img->native.func.bind = _native_cb_bind;
}
static void
-_native_free_cb(void *data, void *image)
+_native_free_cb(void *data EINA_UNUSED, void *image)
{
- Evas_Engine_GL_Context *gl_context;
- Render_Engine_GL_Generic *re = data;
Evas_GL_Image *im = image;
Evas_Native_Surface *n = im->native.data;
uint32_t texid;
if (n->type == EVAS_NATIVE_SURFACE_OPENGL)
{
- gl_context = re->window_gl_context_get(re->software.ob);
-
texid = n->data.opengl.texture_id;
- eina_hash_del(gl_context->shared->native_tex_hash, &texid, im);
+ eina_hash_del(im->native.shared->native_tex_hash, &texid, im);
}
im->native.data = NULL;
im->native.func.data = NULL;
im->native.yinvert = 0;
im->native.loose = 0;
+ im->native.shared = gl_context->shared;
im->native.data = n;
im->native.func.data = re;
im->native.func.bind = _native_bind_cb;
}
static void
-_native_cb_free(void *data, void *image)
+_native_cb_free(void *data EINA_UNUSED, 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->ns_data.wl_surface.wl_buf;
- eina_hash_del(ob->gl_context->shared->native_wl_hash, &wlid, img);
+ eina_hash_del(img->native.shared->native_wl_hash, &wlid, img);
if (n->ns_data.wl_surface.surface)
{
if (glsym_eglDestroyImage)
{
- glsym_eglDestroyImage(ob->egl_disp, n->ns_data.wl_surface.surface);
+ glsym_eglDestroyImage(img->native.disp, n->ns_data.wl_surface.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);
}
else if (n->ns.type == EVAS_NATIVE_SURFACE_EVASGL)
{
- eina_hash_del(eng_get_ob(re)->gl_context->shared->native_evasgl_hash, &n->ns_data.evasgl.surface, img);
+ eina_hash_del(img->native.shared->native_evasgl_hash, &n->ns_data.evasgl.surface, img);
}
else if (n->ns.type == EVAS_NATIVE_SURFACE_TBM)
{
- eina_hash_del(ob->gl_context->shared->native_tbm_hash, &n->ns_data.tbm.buffer, img);
+ eina_hash_del(img->native.shared->native_tbm_hash, &n->ns_data.tbm.buffer, img);
#ifdef GL_GLES
if (n->ns_data.tbm.surface)
{
int err;
if (glsym_eglDestroyImage)
{
- glsym_eglDestroyImage(ob->egl_disp,
+ glsym_eglDestroyImage(img->native.disp,
n->ns_data.tbm.surface);
if ((err = eglGetError()) != EGL_SUCCESS)
{
//img->native.yinvert = yinvert;
img->native.yinvert = 1;
img->native.loose = 0;
+ img->native.disp = ob->egl_disp;
+ img->native.shared = ob->gl_context->shared;
img->native.data = n;
img->native.func.data = re;
img->native.func.bind = _native_cb_bind;
img->native.yinvert = 0;
img->native.loose = 0;
+ img->native.disp = ob->egl_disp;
+ img->native.shared = ob->gl_context->shared;
img->native.data = n;
img->native.func.data = re;
img->native.func.bind = _native_cb_bind;
n->ns_data.evasgl.surface = ns->data.evasgl.surface;
img->native.yinvert = 0;
img->native.loose = 0;
+ img->native.disp = ob->egl_disp;
+ img->native.shared = ob->gl_context->shared;
img->native.data = n;
img->native.func.data = re;
img->native.func.bind = _native_cb_bind;
ERR("eglCreateImage() for %p failed", buffer);
img->native.yinvert = 1;
img->native.loose = 0;
+ img->native.disp = ob->egl_disp;
+ img->native.shared = ob->gl_context->shared;
img->native.data = n;
img->native.func.data = re;
img->native.func.bind = _native_cb_bind;