Evas filters: Simplify evas_filter_dirty

Objects can mark themselves as changed rather than having all this
duplicated code inside the mixin.
This commit is contained in:
Jean-Philippe Andre 2016-03-02 14:41:32 +09:00
parent 9c204eb369
commit b640cb5ba9
3 changed files with 7 additions and 25 deletions

View File

@ -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

View File

@ -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

View File

@ -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);
}