diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-03-02 14:41:32 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-03-15 11:11:59 +0900 |
commit | b640cb5ba9af16533a6625140c4e5e8a79ad7f01 (patch) | |
tree | 7d9e3de78651245b211ccd492272639351a4957b | |
parent | 9c204eb36970c72d254c5f42818dbe24f9a47451 (diff) | |
download | efl-b640cb5ba9af16533a6625140c4e5e8a79ad7f01.tar.gz |
Evas filters: Simplify evas_filter_dirty
Objects can mark themselves as changed rather than having all this
duplicated code inside the mixin.
-rw-r--r-- | src/lib/evas/canvas/evas_filter_mixin.c | 24 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_image.c | 5 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_text.c | 3 |
3 files changed, 7 insertions, 25 deletions
diff --git a/src/lib/evas/canvas/evas_filter_mixin.c b/src/lib/evas/canvas/evas_filter_mixin.c index 4d4b7ca081..6461776f0f 100644 --- a/src/lib/evas/canvas/evas_filter_mixin.c +++ b/src/lib/evas/canvas/evas_filter_mixin.c @@ -56,10 +56,6 @@ _filter_end_sync(Evas_Filter_Context *ctx, Evas_Object_Protected_Data *obj, ERR("Filter failed at runtime!"); evas_filter_invalid_set(eo_obj, EINA_TRUE); evas_filter_dirty(eo_obj); - evas_object_change(eo_obj, obj); - evas_object_clip_dirty(eo_obj, obj); - evas_object_coords_recalc(eo_obj, obj); - evas_object_inform_call_resize(eo_obj); } else { @@ -401,12 +397,7 @@ _evas_filter_efl_gfx_filter_filter_program_set(Eo *eo_obj, Evas_Filter_Data *pd, } FCOW_END(fcow, pd); - // Update object evas_filter_dirty(eo_obj); - evas_object_change(eo_obj, obj); - evas_object_clip_dirty(eo_obj, obj); - evas_object_coords_recalc(eo_obj, obj); - evas_object_inform_call_resize(eo_obj); } EOLIAN static void @@ -497,10 +488,6 @@ update: } evas_filter_dirty(eo_obj); - evas_object_change(eo_obj, obj); - evas_object_clip_dirty(eo_obj, obj); - evas_object_coords_recalc(eo_obj, obj); - evas_object_inform_call_resize(eo_obj); } EOLIAN static Efl_Gfx_Base * @@ -542,12 +529,7 @@ _evas_filter_efl_gfx_filter_filter_state_set(Eo *eo_obj, Evas_Filter_Data *pd, pd->data->state.pos); } - // Mark as changed evas_filter_dirty(eo_obj); - evas_object_change(eo_obj, obj); - evas_object_clip_dirty(eo_obj, obj); - evas_object_coords_recalc(eo_obj, obj); - evas_object_inform_call_resize(eo_obj); } } @@ -659,7 +641,6 @@ _evas_filter_efl_gfx_filter_filter_data_set(Eo *eo_obj, Evas_Filter_Data *pd, const char *name, const char *value, Eina_Bool execute) { - Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); Evas_Filter_Data_Binding *db, *found = NULL; Evas_Object_Filter_Data *fcow; @@ -701,12 +682,7 @@ _evas_filter_efl_gfx_filter_filter_data_set(Eo *eo_obj, Evas_Filter_Data *pd, } FCOW_END(fcow, pd); - // update object evas_filter_dirty(eo_obj); - evas_object_change(eo_obj, obj); - evas_object_clip_dirty(eo_obj, obj); - evas_object_coords_recalc(eo_obj, obj); - evas_object_inform_call_resize(eo_obj); } EOLIAN static void diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index f3b1d7797a..8fd8c94c8b 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -3206,9 +3206,12 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, } EOLIAN static void -_evas_image_evas_filter_filter_dirty(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) +_evas_image_evas_filter_filter_dirty(Eo *eo_obj, Evas_Image_Data *o) { + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); + o->changed = 1; + evas_object_change(eo_obj, obj); } EOLIAN static Eina_Bool diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index a492ebdca7..186200ebe8 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -1665,8 +1665,11 @@ evas_font_draw_async_check(Evas_Object_Protected_Data *obj, EOLIAN static void _evas_text_evas_filter_filter_dirty(Eo *eo_obj, Evas_Text_Data *o) { + Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); + _evas_object_text_items_clear(o); o->changed = 1; + evas_object_change(eo_obj, obj); _evas_object_text_recalc(eo_obj, o->cur.text); } |