evas/box: avoid triggering smart_move callback
any time an evas box is moved, it flags itself to do a recalc on all of its contents in the next render. evas box also inherits from smart clipped class, however, which means that it will also move all of its contents immediately on every single move. this results in something like: move(box) -> for content in box { move(content) } -> render -> recalc(box) -> for content in box { calc(content); move(content); } which is massively inefficient and results in box being completely unusable once it has a large number of contents by skipping immediate move() calls for all the box contents, we can bring this performance back to usable levels @fix Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D9336
This commit is contained in:
parent
bd62513232
commit
e663b9da55
|
@ -443,10 +443,16 @@ _evas_box_efl_gfx_entity_size_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED,
|
|||
EOLIAN static void
|
||||
_evas_box_efl_gfx_entity_position_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Eina_Position2D pos)
|
||||
{
|
||||
Evas_Object_Smart_Clipped_Data *cso = evas_object_smart_data_get(o);
|
||||
if (_evas_object_intercept_call(o, EVAS_OBJECT_INTERCEPT_CB_MOVE , 0, pos.x, pos.y))
|
||||
return;
|
||||
|
||||
efl_gfx_entity_position_set(efl_super(o, MY_CLASS), pos);
|
||||
efl_gfx_entity_position_set(cso->clipper, pos);
|
||||
/* this skips the call to _evas_object_smart_clipped_smart_move_internal
|
||||
* since box internals will automatically recalc all the child positions
|
||||
* at a later point
|
||||
*/
|
||||
efl_gfx_entity_position_set(efl_super(o, EFL_CANVAS_GROUP_CLASS), pos);
|
||||
evas_object_smart_changed(o);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue