diff options
author | Shinwoo Kim <cinoo.kim@samsung.com> | 2020-09-24 12:16:49 +0900 |
---|---|---|
committer | Hermet Park <chuneon.park@samsung.com> | 2020-09-24 12:16:49 +0900 |
commit | 46eca1108c6982fbb26bc60ff5bc6a1f92444bc2 (patch) | |
tree | e96c60449f4731356de2f137d6a9adc05ff58299 /src/lib | |
parent | f3014132cec677eb774d252e4be089604fb0af4c (diff) | |
download | efl-46eca1108c6982fbb26bc60ff5bc6a1f92444bc2.tar.gz |
evas vg: check vg changed
Summary:
It is not able to render even though vg object has a chance to render,
because evas_object_smart_changed_get checks only Evas_Object_Protected_Data,
when Efl_Canvas_Vg_Object_Data.changed is TRUE.
Reviewers: Hermet, jsuya, herb
Reviewed By: Hermet
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12152
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/evas/canvas/efl_canvas_vg_object.c | 8 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_smart.c | 5 | ||||
-rw-r--r-- | src/lib/evas/include/evas_private.h | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c index 1c49ac5ac1..5317c375a6 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_object.c +++ b/src/lib/evas/canvas/efl_canvas_vg_object.c @@ -384,6 +384,7 @@ _efl_canvas_vg_object_efl_object_constructor(Eo *eo_obj, Efl_Canvas_Vg_Object_Da obj->func = &object_func; obj->private_data = efl_data_ref(eo_obj, MY_CLASS); obj->type = o_type; + obj->is_vg_object = EINA_TRUE; /* default root node */ pd->obj = obj; @@ -1163,5 +1164,12 @@ evas_object_vg_fill_mode_get(const Evas_Object *obj) return _efl_ui_canvas_object_vg_fill_mode_to_evas_object_vg_fill_mode(efl_canvas_vg_object_fill_mode_get(obj)); } +Eina_Bool +evas_object_vg_changed_get(Evas_Object_Protected_Data *obj) +{ + Efl_Canvas_Vg_Object_Data *pd = obj->private_data; + return pd->changed; +} + #include "efl_canvas_vg_object.eo.c" #include "efl_canvas_vg_object_eo.legacy.c" diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 2a27d7b1e8..cc0ab2c09d 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -1392,7 +1392,10 @@ evas_object_smart_changed_get(Evas_Object_Protected_Data *obj) if (has_map) { if ((obj->need_surface_clear && obj->changed && !obj->is_smart) || - ((obj->changed_pchange) && (obj->changed_map))) + ((obj->changed_pchange) && (obj->changed_map)) || + /* A condition for a rare case which has obj->changed is FALSE, + but Efl_Canvas_Vg_Object_Data.changed is TRUE. */ + (obj->is_vg_object && evas_object_vg_changed_get(obj))) return EINA_TRUE; } } diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h index d270b2be65..1af914f51c 100644 --- a/src/lib/evas/include/evas_private.h +++ b/src/lib/evas/include/evas_private.h @@ -825,6 +825,7 @@ struct _Evas_Object_Protected_Data Eina_Bool events_filter_enabled : 1; Eina_Bool is_pointer_inside_legacy : 1; Eina_Bool is_filter_object : 1; + Eina_Bool is_vg_object : 1; }; struct _Evas_Data_Node @@ -1251,6 +1252,7 @@ void evas_call_smarts_calculate(Evas *e); void evas_object_smart_bounding_box_update(Evas_Object_Protected_Data *obj); void evas_object_smart_need_bounding_box_update(Evas_Smart_Data *o, Evas_Object_Protected_Data *obj); Eina_Bool evas_object_smart_changed_get(Evas_Object_Protected_Data *obj); +Eina_Bool evas_object_vg_changed_get(Evas_Object_Protected_Data *obj); void evas_object_smart_attach(Evas_Object *eo_obj, Evas_Smart *s); void _evas_post_event_callback_call_real(Evas *e, Evas_Public_Data* e_pd, int min_event_id); #define _evas_post_event_callback_call(e, pd, id) do { \ |