efl_ui_image: remove job in sizing calc.
authorHermet Park <hermetpark@gmail.com>
Mon, 25 Mar 2019 10:46:24 +0000 (19:46 +0900)
committerYeongjong Lee <yj34.lee@samsung.com>
Tue, 2 Apr 2019 03:45:17 +0000 (12:45 +0900)
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

Change-Id: I6a11744777186b486e81b87ea5293fa564c732ed

src/lib/elementary/efl_ui_image.c
src/lib/elementary/efl_ui_widget_image.h

index b11eb1a..f333dbc 100644 (file)
@@ -603,7 +603,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);
@@ -744,18 +743,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;
@@ -824,20 +820,6 @@ _sizing_eval_cb(void *data)
    }
 }
 
-void
-_efl_ui_image_sizing_eval(Evas_Object *obj)
-{
-   EFL_UI_IMAGE_DATA_GET_OR_RETURN(obj, sd);
-
-   //TIZEN_ONLY(20181001): remove ecore job temporarily.
-   _sizing_eval_cb(obj);
-   /*
-   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)
 {
index 004222e..8a5beef 100644 (file)
@@ -92,8 +92,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;