evas + gl - fix callback-to-app-changes-state issue with pixel data

so if we call a callback that has e do something like set new pixel
data in a pixel data provider and we do it from the is pixel inside
call ebcause pixels were marked as dirty - pixels may no longer exist
after that, so re-get to make sure and handle properly.

this was found with tiling + e + shaped windows + moving them around
in tiling. it's a valid efl bug though.

@fix
This commit is contained in:
Carsten Haitzler 2020-05-09 14:02:04 +01:00
parent a7bcba534a
commit af4c39c37a
2 changed files with 4 additions and 2 deletions

View File

@ -673,6 +673,7 @@ evas_object_image_data_set(Eo *eo_obj, void *data)
if (o->engine_data)
{
ENFN->image_free(ENC, o->engine_data);
o->engine_data = NULL;
o->changed = EINA_TRUE;
evas_object_change(eo_obj, obj);
}
@ -687,8 +688,6 @@ evas_object_image_data_set(Eo *eo_obj, void *data)
state_write->image.stride = 0;
}
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
o->engine_data = NULL;
}
/* FIXME - in engine call above
if (o->engine_data)

View File

@ -3514,6 +3514,9 @@ evas_object_image_is_inside(Evas_Object *eo_obj,
o->pixels->func.get_pixels(o->pixels->func.get_pixels_data, eo_obj);
if (ENFN->gl_get_pixels_post)
ENFN->gl_get_pixels_post(ENC, output);
pixels = _evas_image_pixels_get(eo_obj, obj, ENC, output, NULL, NULL, 0, 0,
&imagew, &imageh, &uvw, &uvh, EINA_TRUE, EINA_FALSE);
if (!pixels) return is_inside;
}
}