forked from enlightenment/efl
Evas sw_generic/x11: Fix calls to native_bind_cb/unbind_cb
Summary: In Evas-SW-Generic/X11, native_unbind_cb is not called sometimes, although native_bind_cb was called. Some native surface's cases, both native_bind_cb and native_unbind_cb should be called for mapping and unmapping, eg. with tbm_surface. @fix Test Plan: Evas Native Surface with pixmap sample. Evas Native Surface with tbm(this sample can work in Tize Device) elementary_test Reviewers: raster, jpeg, cedric, spacegrapher Subscribers: JoogabYun, scholb.kim, dkdk Differential Revision: https://phab.enlightenment.org/D3317
This commit is contained in:
parent
64890d260f
commit
84cb06784e
|
@ -1956,6 +1956,7 @@ eng_image_draw(void *data EINA_UNUSED, void *context, void *surface, void *image
|
|||
|
||||
if (do_async)
|
||||
{
|
||||
Eina_Bool ret;
|
||||
if (!evas_common_rgba_image_scalecache_prepare(image, surface, context, smooth,
|
||||
src_x, src_y, src_w, src_h,
|
||||
dst_x, dst_y, dst_w, dst_h))
|
||||
|
@ -1968,15 +1969,23 @@ eng_image_draw(void *data EINA_UNUSED, void *context, void *surface, void *image
|
|||
else
|
||||
#endif
|
||||
evas_cache_image_load_data(&im->cache_entry);
|
||||
if (!im->cache_entry.flags.loaded) return EINA_FALSE;
|
||||
if (!im->cache_entry.flags.loaded)
|
||||
{
|
||||
if (im->native.func.unbind)
|
||||
im->native.func.unbind(data, image);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return evas_common_rgba_image_scalecache_do_cbs(image, surface,
|
||||
ret = evas_common_rgba_image_scalecache_do_cbs(image, surface,
|
||||
context, smooth,
|
||||
src_x, src_y, src_w, src_h,
|
||||
dst_x, dst_y, dst_w, dst_h,
|
||||
_image_thr_cb_sample,
|
||||
_image_thr_cb_smooth);
|
||||
if (im->native.func.unbind)
|
||||
im->native.func.unbind(data, image);
|
||||
return ret;
|
||||
}
|
||||
#ifdef BUILD_PIPE_RENDER
|
||||
else if ((cpunum > 1))
|
||||
|
|
|
@ -641,6 +641,7 @@ _native_evasgl_free(void *data EINA_UNUSED, void *image)
|
|||
im->native.data = NULL;
|
||||
im->native.func.data = NULL;
|
||||
im->native.func.bind = NULL;
|
||||
im->native.func.unbind = NULL;
|
||||
im->native.func.free = NULL;
|
||||
//im->image.data = NULL;
|
||||
free(n);
|
||||
|
@ -740,6 +741,7 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native)
|
|||
im->native.func.free = _native_evasgl_free;
|
||||
im->native.func.data = NULL;
|
||||
im->native.func.bind = NULL;
|
||||
im->native.func.unbind = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ _native_cb_free(void *data EINA_UNUSED, void *image)
|
|||
im->native.data = NULL;
|
||||
im->native.func.data = NULL;
|
||||
im->native.func.bind = NULL;
|
||||
im->native.func.unbind = NULL;
|
||||
im->native.func.free = NULL;
|
||||
im->image.data = NULL;
|
||||
|
||||
|
@ -116,6 +117,7 @@ evas_xcb_image_native_set(void *data, void *image, void *native)
|
|||
im->native.data = n;
|
||||
im->native.func.data = NULL;
|
||||
im->native.func.bind = _native_cb_bind;
|
||||
im->native.func.unbind = NULL;
|
||||
im->native.func.free = _native_cb_free;
|
||||
|
||||
_evas_xcb_image_update(data, image, 0, 0, w, h);
|
||||
|
|
|
@ -60,6 +60,7 @@ _native_free_cb(void *data EINA_UNUSED, void *image)
|
|||
im->native.data = NULL;
|
||||
im->native.func.data = NULL;
|
||||
im->native.func.bind = NULL;
|
||||
im->native.func.unbind = NULL;
|
||||
im->native.func.free = NULL;
|
||||
im->image.data = NULL;
|
||||
free(n);
|
||||
|
|
Loading…
Reference in New Issue