Summary:
If image object geometry is same with image size, then a crash occurs on both
GL and SW engine.
[Test Code]
evas_object_image_size_get(img, &w, &h);
evas_object_resize(img, w, h);
[GL engine]
eng_ector_buffer_wrap should use output instead of engine for calling
evas_ector_buffer_engine_image, because it expects the output not the engine.
[SW engine]
eng_ector_buffer_wrap should check if im->image.data is NULL because
_evas_ector_software_buffer_evas_ector_buffer_engine_image_set returns before
calling evas_cache_iamge_ref if im->image.data is NULL, and it causes
a segmentation fault finally with following backtrace.
(#0) evas_cache_image_drop (im=0x0)
(#1) _evas_ector_software_buffer_efl_object_destructor
(#2) efl_destructor
(#3) _efl_del_internal
(#4) _efl_unref_internal
(#5) _efl_add_internal_end
(#6) _efl_add_end
(#7) eng_ector_buffer_wrap
Test Plan: {
F3841366}
Reviewers: Hermet, jsuya
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11258
if (fb->is_render) goto end;
buffer = ENFN->ector_buffer_wrap(ENC, ctx->evas->evas, engine_buffer);
+ if (!buffer) return EINA_FALSE;
+
ret = EINA_TRUE;
end:
eng_ector_buffer_wrap(void *engine EINA_UNUSED, Evas *evas, void *engine_image)
{
Evas_GL_Image *im = engine_image;
+ Render_Output_GL_Generic *output;
EINA_SAFETY_ON_NULL_RETURN_VAL(engine_image, NULL);
+ output = _evgl_output_find(engine);
+ if (!output) return NULL;
return efl_add(EVAS_ECTOR_GL_IMAGE_BUFFER_CLASS, evas,
- evas_ector_buffer_engine_image_set(efl_added, evas, im));
+ evas_ector_buffer_engine_image_set(efl_added, output, im));
}
//FIXME: Currently Ector GL doens't work properly. Use software instead.
{
Image_Entry *ie = engine_image;
Ector_Buffer *buf = NULL;
+ RGBA_Image *im = (RGBA_Image *)ie;
if (!ie) return NULL;
+ if (!im->image.data) return NULL;
if (!efl_domain_current_push(EFL_ID_DOMAIN_SHARED))
return NULL;