From: Wonsik Jung Date: Fri, 8 Jun 2018 05:55:17 +0000 (+0900) Subject: [EvasGL] fix the crash issue about egl_fence_sync X-Git-Tag: upstream/1.21.0~342 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80e8ff960bc1f503df2e24ae97a5b764bf2a538d;p=platform%2Fupstream%2Fefl.git [EvasGL] fix the crash issue about egl_fence_sync fix the crash issue about evas gl and egl_fence_sync After upgrading efl 1.20, native_bind_cb function interface was changed. To support, native struct has outbuf. Change-Id: I2ffc10671d716ee478f0589bd2309efb62aed913 --- diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h index 1f44a85..c9fcec4 100755 --- a/src/modules/evas/engines/gl_common/evas_gl_common.h +++ b/src/modules/evas/engines/gl_common/evas_gl_common.h @@ -482,6 +482,8 @@ struct _Evas_GL_Image void (*unbind) (void *image); void (*free) (void *image); int (*yinvert) (void *image); + // TIZEN_ONLY(20180608) : support EGL_IMAGE_SYNC for EvasGL + void *outbuf; } func; void *disp; Evas_GL_Shared *shared; diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c index 78a9c94..d98cbe2 100755 --- a/src/modules/evas/engines/wayland_egl/evas_engine.c +++ b/src/modules/evas/engines/wayland_egl/evas_engine.c @@ -1102,7 +1102,7 @@ end: } static void -_native_cb_bind(void *data, void *image) +_native_cb_bind(void *image) { Render_Engine *re; Outbuf *ob; @@ -1112,12 +1112,13 @@ _native_cb_bind(void *data, void *image) EGLBoolean wait_result; EGLBoolean destroy_result; - if (!(re = (Render_Engine *)data)) return; - if (!(ob = eng_get_ob(re))) return; - if (!(img = image)) return; if (!(n = img->native.data)) return; + // TIZEN_ONLY(20180608) : support EGL_IMAGE_SYNC for EvasGL + ob = (Outbuf*)img->native.func.outbuf; + if (!ob) return; + if (n->ns.type == EVAS_NATIVE_SURFACE_WL) { if (n->ns_data.wl_surface.surface) @@ -1194,7 +1195,7 @@ _native_cb_bind(void *data, void *image) } static void -eng_gl_get_pixels(void *data EINA_UNUSED, Evas_Object_Image_Pixels_Get_Cb cb, void *get_pixels_data, +eng_gl_get_pixels(void *data, Evas_Object_Image_Pixels_Get_Cb cb, void *get_pixels_data, Evas_Object *o, void *image) { Render_Engine *re; @@ -1621,6 +1622,8 @@ eng_image_native_set(void *engine, void *image, void *native) img->native.func.bind = _native_cb_bind; img->native.func.unbind = _native_cb_unbind; img->native.func.free = _native_cb_free; + // TIZEN_ONLY(20180608) : support EGL_IMAGE_SYNC for EvasGL + img->native.func.outbuf = ob; img->native.target = GL_TEXTURE_2D; img->native.mipmap = 0; @@ -1648,6 +1651,8 @@ eng_image_native_set(void *engine, void *image, void *native) img->native.func.unbind = _native_cb_unbind; img->native.func.free = _native_cb_free; img->native.func.yinvert = _native_cb_yinvert; + // TIZEN_ONLY(20180608) : support EGL_IMAGE_SYNC for EvasGL + img->native.func.outbuf = ob; img->native.target = GL_TEXTURE_2D; img->native.mipmap = 0; @@ -1675,6 +1680,8 @@ eng_image_native_set(void *engine, void *image, void *native) img->native.func.bind = _native_cb_bind; img->native.func.unbind = _native_cb_unbind; img->native.func.free = _native_cb_free; + // TIZEN_ONLY(20180608) : support EGL_IMAGE_SYNC for EvasGL + img->native.func.outbuf = ob; img->native.target = GL_TEXTURE_2D; img->native.mipmap = 0; @@ -1714,6 +1721,7 @@ eng_image_native_set(void *engine, void *image, void *native) img->native.func.bind = _native_cb_bind; img->native.func.unbind = _native_cb_unbind; img->native.func.free = _native_cb_free; + img->native.func.outbuf = ob; img->native.target = GL_TEXTURE_EXTERNAL_OES; img->native.mipmap = 0; img->native.rot = ns->data.tbm.rot;