[4.0] Changed Update to reset only target properties each frame 06/168606/1
authorDavid Steele <david.steele@samsung.com>
Wed, 24 Jan 2018 13:59:55 +0000 (13:59 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Mon, 29 Jan 2018 21:53:07 +0000 (21:53 +0000)
commitc99b916b9708aa161c5d736964d5a8eadf235636
treee4ac8c6f8b2fec20cb00091f4724de3b65b8ab15
parentc17d02729a43a3f76fff1d56ea2c9bb01a23d99a
[4.0] Changed Update to reset only target properties each frame

Currently all default and custom animated properties are reset each frame.
This is wasteful, as unnecessary time is spent setting the same value again and again.

Instead, have added a new PropertyResetter, which is created when a property is being
animated or constrained. This is responsible for resetting the double buffered values
of that property.

Transform Manager properties are unaffected, as the reset is a single memset/memcpy
that handles all such properties at once, and is much faster than resetting properties
individually.

Added a PropertyResetter to animators.
Removed property reset from everything except transform manager.
Ensured property resetters die with animators

Added lifecycle observer to scene graph animators
Hooked up property resetter to observe animator destruction
Added aging to property resetter to ensure it resets for another frame after
animator death

Added constraint resetters
Changing connection to disconnection tracking fixes constraint velocity issue

Also changed Property::Bake to write to both buffer indexed values.

Ensured property resetters destroyed after animations ( animators have a resetter
observing destruction; order matters ).

Change-Id: Ia11f0e45744b09859ce1b87f306e1829efbb8fac
Signed-off-by: David Steele <david.steele@samsung.com>
(cherry picked from commit 39093bc48ee4ed2b4956c183faf59c36f3e9746c)
17 files changed:
dali/internal/event/animation/animator-connector.h
dali/internal/event/animation/constraint-impl.h
dali/internal/update/animation/property-accessor.h
dali/internal/update/animation/scene-graph-animator.h
dali/internal/update/animation/scene-graph-constraint-base.cpp
dali/internal/update/animation/scene-graph-constraint-base.h
dali/internal/update/common/animatable-property.h
dali/internal/update/common/property-owner.cpp
dali/internal/update/common/property-owner.h
dali/internal/update/common/property-resetter.h [new file with mode: 0644]
dali/internal/update/manager/update-algorithms.cpp
dali/internal/update/manager/update-manager.cpp
dali/internal/update/manager/update-manager.h
dali/internal/update/nodes/node.cpp
dali/internal/update/nodes/node.h
dali/internal/update/render-tasks/scene-graph-render-task.cpp
dali/internal/update/render-tasks/scene-graph-render-task.h