The current development of the expression engine is experimental.
It does not support multi-threading.
Therefore, when tvg::Initializer::init() is configured
with more than one thread, expressions will be automatically disabled.
issue: https://github.com/thorvg/thorvg/issues/1640
A single animation might have a desinated markers with naming: 0 ~ 0.5 (sector A), 0.5 ~ 1.0 (sector B). Selecting one of them using a marker name(sector A) and could play only that part with animation controllers.
usage:
- `animation->segment("sectionA") // Named segment(Marker)`
- `auto cnt = animation->markerCnt()`
- `auto name = animation->markers(index)`
- `animation->segment(0, 0.5) // Segment`
- `animation->segment(&begin, &end)`
Co-authored-by: Jinny You <jinny@lottiefiles.com>
This correction addresses the drawing order of
objects when a group contains a TrimPath and
is merging shapes.
Additionally, the TrimPath method is can applied
to the engine to control the drawing behavior by
7f3dc541d6b7abcdc03facd884489f37c327fd98
issue: https://github.com/thorvg/thorvg/issues/2047
removed unused static condition.
static was prepared for optimization,
but not used at all.
we will revisit this later when time permits.
binary size: -6kb
When json file is invalid in the parser,
the LottieComposition object is not released and the parse() returns false.
To prevent memory leaks, free the memory before returning false.
related issue : https://github.com/thorvg/thorvg/issues/2070
Internal model and parser modifications have been made
to parse "sid" and retrieve their data into the LottieComposition.
This will enable dynamic changes to the following Lottie objects:
The slot feature will encompass these properties:
- LottieSolidStroke
- LottieSolidFill
- LottieGradientStroke
- LottieGradientFill
- LottieTextDoc"
Issue: https://github.com/thorvg/thorvg/issues/1808
Co-authored-by: Hermet Park <hermet@lottiefiles.com>
Previously, multiple gradients within a single group
couldn't be accounted for during rendering.
This fix addresses the scenario by fragmenting the rendering context.
Each group must determine the stroking rendering contexts
and assess whether context switching has occurred.
Migrate the sequence from the root layer to all groups.
There are some matting masking bugs observed,
Reverted the commit. We will revisit it later.
commit d37c500262
Author: Hermet Park <hermet@lottiefiles.com>
Date: Wed Oct 25 18:55:05 2023 +0900
lottie: introduced static layer cache.
lottie builder doesn't need to rebuild the layer object
if it has no any animation frame data.
That case, we can cache the layer scene in order to reuse it.
Tested on local machine (single thread):
- Lottie: appx. 2ms enhanced.
- Binary: +204
lottie builder doesn't need to rebuild the layer object
if it has no any animation frame data.
That case, we can cache the layer scene in order to reuse it.
Tested on local machine (single thread):
- Lottie: appx. 2ms enhanced.
- Binary: +204
replace the frame count unit from the int32_t to float
since animations could smoothly interpolate key-frames.
This notificably improve the animation smoothness in Lottie
Beta API changes:
Result Animation::frame(uint32_t no) -> Result Animation::frame(float no)
uint32_t Animation::curFrame() const -> float Animation::curFrame() const
uint32_t Animation::totalFrame() const -> float Animation::totalFrame() const
This correction ensures a consistent use of 'ref' and 'unref' for paints to release memory properly.
The memory leak occurred when a picture was not pushed to a valid canvas.
This issue was reported by the unit-test memory sanitizer.
migrate transform from the group to the layer.
transformation is not necessary in group but layer.
This helps to reduce the unnecessary assigning of the transformation
in group instances.
To achieve full threading efficiency,
the header should return the necessary properties:
view size, framerate, and duration.
This commit adds duration parsing.
Also don't do the header task in case of single thread
because there wouldn't be parallel effects.