forked from enlightenment/efl
efl_ui_image: remove job in sizing calc.
Originally, this job task was introduced for trick optimization to avoid unnecessary duplicated compuation. But this introduced a regression bug as well, image geometry updation was delayed by this. So, we remove the job here. @fix T7360
This commit is contained in:
parent
476010b018
commit
620eb070f4
|
@ -600,7 +600,6 @@ _efl_ui_image_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Image_Data *sd)
|
|||
if (elm_widget_is_legacy(obj))
|
||||
efl_event_callback_del(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED,
|
||||
_on_size_hints_changed, sd);
|
||||
ecore_job_del(sd->sizing_job);
|
||||
ecore_timer_del(sd->anim_timer);
|
||||
evas_object_del(sd->img);
|
||||
_prev_img_del(sd);
|
||||
|
@ -741,18 +740,15 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
_sizing_eval_cb(void *data)
|
||||
void
|
||||
_efl_ui_image_sizing_eval(Evas_Object *obj)
|
||||
{
|
||||
Evas_Object *obj = data;
|
||||
EFL_UI_IMAGE_DATA_GET_OR_RETURN(obj, sd);
|
||||
|
||||
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
|
||||
Eina_Size2D sz;
|
||||
double ts;
|
||||
|
||||
EFL_UI_IMAGE_DATA_GET_OR_RETURN(obj, sd);
|
||||
|
||||
sd->sizing_job = NULL;
|
||||
|
||||
// TODO: remove this function after using the widget's scale value instead of image's scale value,
|
||||
if (sd->no_scale)
|
||||
sd->scale = 1.0;
|
||||
|
@ -812,15 +808,6 @@ _sizing_eval_cb(void *data)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
_efl_ui_image_sizing_eval(Evas_Object *obj)
|
||||
{
|
||||
EFL_UI_IMAGE_DATA_GET_OR_RETURN(obj, sd);
|
||||
|
||||
if (sd->sizing_job) ecore_job_del(sd->sizing_job);
|
||||
sd->sizing_job = ecore_job_add(_sizing_eval_cb, obj);
|
||||
}
|
||||
|
||||
static void
|
||||
_efl_ui_image_load_size_set_internal(Evas_Object *obj, Efl_Ui_Image_Data *sd)
|
||||
{
|
||||
|
|
|
@ -91,8 +91,6 @@ struct _Efl_Ui_Image_Data
|
|||
Eina_Bool use : 1;
|
||||
} freedesktop;
|
||||
|
||||
Ecore_Job *sizing_job;
|
||||
|
||||
Eina_Bool aspect_fixed : 1;
|
||||
Eina_Bool fill_inside : 1;
|
||||
Eina_Bool no_scale : 1;
|
||||
|
|
Loading…
Reference in New Issue