forked from enlightenment/efl
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:
parent
9c204eb369
commit
b640cb5ba9
|
@ -56,10 +56,6 @@ _filter_end_sync(Evas_Filter_Context *ctx, Evas_Object_Protected_Data *obj,
|
||||||
ERR("Filter failed at runtime!");
|
ERR("Filter failed at runtime!");
|
||||||
evas_filter_invalid_set(eo_obj, EINA_TRUE);
|
evas_filter_invalid_set(eo_obj, EINA_TRUE);
|
||||||
evas_filter_dirty(eo_obj);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -401,12 +397,7 @@ _evas_filter_efl_gfx_filter_filter_program_set(Eo *eo_obj, Evas_Filter_Data *pd,
|
||||||
}
|
}
|
||||||
FCOW_END(fcow, pd);
|
FCOW_END(fcow, pd);
|
||||||
|
|
||||||
// Update object
|
|
||||||
evas_filter_dirty(eo_obj);
|
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
|
EOLIAN static void
|
||||||
|
@ -497,10 +488,6 @@ update:
|
||||||
}
|
}
|
||||||
|
|
||||||
evas_filter_dirty(eo_obj);
|
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 *
|
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);
|
pd->data->state.pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark as changed
|
|
||||||
evas_filter_dirty(eo_obj);
|
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,
|
const char *name, const char *value,
|
||||||
Eina_Bool execute)
|
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_Filter_Data_Binding *db, *found = NULL;
|
||||||
Evas_Object_Filter_Data *fcow;
|
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);
|
FCOW_END(fcow, pd);
|
||||||
|
|
||||||
// update object
|
|
||||||
evas_filter_dirty(eo_obj);
|
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
|
EOLIAN static void
|
||||||
|
|
|
@ -3206,9 +3206,12 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj,
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
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;
|
o->changed = 1;
|
||||||
|
evas_object_change(eo_obj, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Bool
|
EOLIAN static Eina_Bool
|
||||||
|
|
|
@ -1665,8 +1665,11 @@ evas_font_draw_async_check(Evas_Object_Protected_Data *obj,
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_evas_text_evas_filter_filter_dirty(Eo *eo_obj, Evas_Text_Data *o)
|
_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);
|
_evas_object_text_items_clear(o);
|
||||||
o->changed = 1;
|
o->changed = 1;
|
||||||
|
evas_object_change(eo_obj, obj);
|
||||||
_evas_object_text_recalc(eo_obj, o->cur.text);
|
_evas_object_text_recalc(eo_obj, o->cur.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue