evas: bugfix in evas_render of not maintaining changed flags on object correctly.
authorCedric Bail <cedric.bail@samsung.com>
Tue, 3 Dec 2013 07:23:05 +0000 (16:23 +0900)
committerCedric Bail <cedric.bail@samsung.com>
Tue, 3 Dec 2013 07:43:58 +0000 (16:43 +0900)
commitf90803aa2fb2a201529cd1205702edc99bd180f6
tree8121e7eeda5a3218ceefabb2c147a0d28a9f0599
parent7cac8bceef0ddf1534f71c5d49f7906d5cd08060
evas: bugfix in evas_render of not maintaining changed flags on object correctly.

This bug is particularly visible in EFM video preview ( T 539 ). The problem is
that the logic for changed has evolved over time. At the beginning Evas canvas
was flat and could be handle in an array. It was then not using the changed flag
that much. This day, we are living with a tree and we need to propagate the
changed flag to the parent, so that when we walk them we only need to walk the
active objects and don't spend our time on branch that are completely static.

Sadly things did collide here. We remove all object that have been rendered
from the pending_objects array. That does include any smart object that was
processed even if one of the child was not. Once any of the child of that not
processed object is marked changed, it will be propagated up to the first
parent that is changed. As the parent of that one are marked as not changed
when evas_render walk the tree, he is blocked really early in the process and
never get a chance to detect that the child of a not changed object did change
and tada !

The fix is to add all the parent of all the object that are in the pending_objects
array back into the pending_objects list. So they will always be marked as changed.
Another alternative to this logic would have been to change pending_change to
filter out those and keep them around. I choose the first solution as I think it
will be more robust to catch all the parent in all case.
src/lib/evas/canvas/evas_render.c