summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-03-25 19:46:24 +0900
committerHermet Park <hermetpark@gmail.com>2019-03-25 19:49:54 +0900
commit620eb070f40f398ecb180181f98469fbb6ac9dd8 (patch)
tree24c1da24dd641a9a3ca93e96b6146753e0c579fe
parent476010b018e3f7d76f3ed198ad2657fc18cc50c8 (diff)
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
-rw-r--r--src/lib/elementary/efl_ui_image.c21
-rw-r--r--src/lib/elementary/efl_ui_widget_image.h2
2 files changed, 4 insertions, 19 deletions
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index 56be05583e..a1bbe2f239 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -600,7 +600,6 @@ _efl_ui_image_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Image_Data *sd)
600 if (elm_widget_is_legacy(obj)) 600 if (elm_widget_is_legacy(obj))
601 efl_event_callback_del(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED, 601 efl_event_callback_del(obj, EFL_GFX_ENTITY_EVENT_HINTS_CHANGED,
602 _on_size_hints_changed, sd); 602 _on_size_hints_changed, sd);
603 ecore_job_del(sd->sizing_job);
604 ecore_timer_del(sd->anim_timer); 603 ecore_timer_del(sd->anim_timer);
605 evas_object_del(sd->img); 604 evas_object_del(sd->img);
606 _prev_img_del(sd); 605 _prev_img_del(sd);
@@ -741,18 +740,15 @@ _key_action_activate(Evas_Object *obj, const char *params EINA_UNUSED)
741 return EINA_TRUE; 740 return EINA_TRUE;
742} 741}
743 742
744static void 743void
745_sizing_eval_cb(void *data) 744_efl_ui_image_sizing_eval(Evas_Object *obj)
746{ 745{
747 Evas_Object *obj = data; 746 EFL_UI_IMAGE_DATA_GET_OR_RETURN(obj, sd);
747
748 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; 748 Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
749 Eina_Size2D sz; 749 Eina_Size2D sz;
750 double ts; 750 double ts;
751 751
752 EFL_UI_IMAGE_DATA_GET_OR_RETURN(obj, sd);
753
754 sd->sizing_job = NULL;
755
756 // TODO: remove this function after using the widget's scale value instead of image's scale value, 752 // TODO: remove this function after using the widget's scale value instead of image's scale value,
757 if (sd->no_scale) 753 if (sd->no_scale)
758 sd->scale = 1.0; 754 sd->scale = 1.0;
@@ -812,15 +808,6 @@ _sizing_eval_cb(void *data)
812 } 808 }
813} 809}
814 810
815void
816_efl_ui_image_sizing_eval(Evas_Object *obj)
817{
818 EFL_UI_IMAGE_DATA_GET_OR_RETURN(obj, sd);
819
820 if (sd->sizing_job) ecore_job_del(sd->sizing_job);
821 sd->sizing_job = ecore_job_add(_sizing_eval_cb, obj);
822}
823
824static void 811static void
825_efl_ui_image_load_size_set_internal(Evas_Object *obj, Efl_Ui_Image_Data *sd) 812_efl_ui_image_load_size_set_internal(Evas_Object *obj, Efl_Ui_Image_Data *sd)
826{ 813{
diff --git a/src/lib/elementary/efl_ui_widget_image.h b/src/lib/elementary/efl_ui_widget_image.h
index 5bdb566add..7a959d4cc6 100644
--- a/src/lib/elementary/efl_ui_widget_image.h
+++ b/src/lib/elementary/efl_ui_widget_image.h
@@ -91,8 +91,6 @@ struct _Efl_Ui_Image_Data
91 Eina_Bool use : 1; 91 Eina_Bool use : 1;
92 } freedesktop; 92 } freedesktop;
93 93
94 Ecore_Job *sizing_job;
95
96 Eina_Bool aspect_fixed : 1; 94 Eina_Bool aspect_fixed : 1;
97 Eina_Bool fill_inside : 1; 95 Eina_Bool fill_inside : 1;
98 Eina_Bool no_scale : 1; 96 Eina_Bool no_scale : 1;