lottietoqml: Adopt new QuickTimeline-based animation mode
The new Timeline mode is better suited for the Lottie keyframe format
and effects like precomp layer time offsets. Using it fixes a number
of timing related issues seen in real world Lottie files.
Changes and simplifications include
- Keyframe frame numbers no longer need to be mapped to time points,
or attempted (doubtfully) to be wrapped into the animation duration;
they can be used as-is.
- Similarly, precomp frame number offsets are now handled by the
generator, does not need to be applied in the visitor. However, we
need a stack to keep track of which layer is the reference for frame
numbers, so that information can be assigned to the animations.
- The addition of boundary keyframes is simplified, and has been
factored out in an internal function: polishPropertyAnimation(). By
keeping the current layer's start- and end frame numbers in a stack,
we can add a precise initial keyframe when needed, including for
negative frame times.
Note: The dependency on QuickTimeline is added as a hard dependency
for the generator library. We cannot use QML dependencies for this,
because the lottietoqml generator is an implicit dependency through
a plugin, which is not detectable through qmlimportscanner.
Fixes: QTBUG-142546
Change-Id: I453c7fac6fda78e2818a7bdff85a3f513e7f4790
Reviewed-by: Kwanghyo Park <kwanghyo.park@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>