summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-07-16 15:31:46 -0400
committerCedric BAIL <cedric.bail@free.fr>2019-07-19 10:54:55 -0700
commite663b9da5521ad962d18d20e8def48c3e4bd786b (patch)
tree6c6c82d180c7c5adbb50b57c03989013d01103f4
parentbd625132329fc9fe172d0df1248c4cf33bec8857 (diff)
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
-rw-r--r--src/lib/evas/canvas/evas_object_box.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_box.c b/src/lib/evas/canvas/evas_object_box.c
index 2981c20eaa..7a7173eb25 100644
--- a/src/lib/evas/canvas/evas_object_box.c
+++ b/src/lib/evas/canvas/evas_object_box.c
@@ -443,10 +443,16 @@ _evas_box_efl_gfx_entity_size_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED,
443EOLIAN static void 443EOLIAN static void
444_evas_box_efl_gfx_entity_position_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Eina_Position2D pos) 444_evas_box_efl_gfx_entity_position_set(Eo *o, Evas_Object_Box_Data *_pd EINA_UNUSED, Eina_Position2D pos)
445{ 445{
446 Evas_Object_Smart_Clipped_Data *cso = evas_object_smart_data_get(o);
446 if (_evas_object_intercept_call(o, EVAS_OBJECT_INTERCEPT_CB_MOVE , 0, pos.x, pos.y)) 447 if (_evas_object_intercept_call(o, EVAS_OBJECT_INTERCEPT_CB_MOVE , 0, pos.x, pos.y))
447 return; 448 return;
448 449
449 efl_gfx_entity_position_set(efl_super(o, MY_CLASS), pos); 450 efl_gfx_entity_position_set(cso->clipper, pos);
451 /* this skips the call to _evas_object_smart_clipped_smart_move_internal
452 * since box internals will automatically recalc all the child positions
453 * at a later point
454 */
455 efl_gfx_entity_position_set(efl_super(o, EFL_CANVAS_GROUP_CLASS), pos);
450 evas_object_smart_changed(o); 456 evas_object_smart_changed(o);
451} 457}
452 458