This class extends the Animation and serves advanced Lottie features.
It's designed to separately have Lottie Animation's unique specs.
For now, this will have Slot overriding feature,
you can include <thorvg_lottie.h> for its extensive features.
@APIs:
- Result LottieAnimation::override(const char* slotJson) noexcept;
- static std::unique_ptr<LottieAnimation> LottieAnimation::gen() noexcept;
@Issue: https://github.com/thorvg/thorvg/issues/1808
Dashed curves require greater precision in calculating
their lengths and while splitting Bezier curves.
Otherwise, it results in visual discrepancies compared
to the expected outcomes.
Approximate functions 'bezLengthApprox' and 'bezAtApprox'
used for calculations in the lottie loader.
issue: https://github.com/thorvg/thorvg/issues/1686
In the case of non-uniform scaling for
thick strokes, artifacts were visible.
The calculations took into account the angle
resulting from the already transformed points,
whereas the untransformed points should have
been considered - the transformation is taken
into account in the next step.
@issue: https://github.com/thorvg/thorvg/issues/1915
enhance decoding efficiency by determining the desired canvas format
during image loading. This allows loaders to preemptively decode
the image in the specified format, to not convert the format again.
Attempt to load a given file/data using candidate formats
when the desired loader fails. This approach will enhance
the compatibility with various file formats in unexpected scenarios.
Previously, we had removed this feature, but have since
recognized its necessity due to the impact on file data
in specific corner cases.
* add new render task to do stencil and cover rendering which is a
fallback rendering method to handle cases that trianglation tessellation
failed
* add a new tessellator to generate stencil and cover vertex mesh
Allow direct updates to the paint object without prior validation.
The verification process is deemed inefficient;
users are expected to ensure the paint is updated using a canvas
that contains it.
This might break the backward compatibility.
Adjusted the sampling position basis by -0.5 pixel
to enhance edge line interpolation quality.
This change addresses an issue with the image up-scaling process,
resulting in clearer and more accurate visuals.
issue: https://github.com/thorvg/thorvg/issues/1949
Previously, the logic was set to halt rendering when any part of the paints,
particularly bitmap-based images, failed to render.
This update modifies the behavior to continue drawing the scene,
allowing for the successful rendering of other elements.
issue: https://github.com/thorvg/thorvg/issues/1951
* merge vertices that are close enough before tessellation
* append return branch in tessellation to prevent dead loop caused by floating point precision
dispose of the resources at the end of the paint deletion.
This will help retain the resources of the retained paints
and reuse them after reconstructing the next scene.
This update fixes an issue where duplicated overlapping curves/lines,
when introduced as a single line.
That case overlapping command operation is take account for
the trim path's path-building process.
We now skip such cases to ensure the trim path functions correctly.
issue: https://github.com/thorvg/thorvg/issues/1939
resolved a corner case where assets were being attached
multiple times during scene building. This issue was causing
a significant performence drop in image animation
in certain scenarios.
adjusted the starting position of the rounded rectangle to 90 degrees
to ensure compatibility with the Lottie trim path effect.
This modification follows the earlier circle correction applied to the rectangle.
issue: https://github.com/thorvg/thorvg/issues/1933
The compositor memory is likely to be reused in the next frame.
To enhance performance, it is advisable to retain this memory by default.
We may consider introducing a cache policy interface in the Initializer.
This would allow users to manage the Canvas memory more effectively.
Anyhow, this improves the Lottie example performance by 10%
Adjust the sampling count according to the scale ratio.
This significantly improves performance
while making it hard to recognize any loss in image quality.
Lottie example performance has improved by 15%.
Some systems such as micro-processor might not support
the thread feature on the system.
Enhance the portability by compiling the thorvg with toggling the
threading depepdency through the build option.
For this, thorvg newly introduced the internal Key/ScopedLock abstraction
for transparent thread-locking dependnecy.
To turn off the thread feature, please use the next build option:
$meson setup build -Dthreads=false ...
Note that, the thread feature is enabled in default.
Turning off the thread feature could reduce the binary size by 7kb.
issue: https://github.com/thorvg/thorvg/issues/1900
the bug was introduced in 9bf8bb018d.
Migrated the circle commands to the rectangle, which is currently necessary.
Retained the previous circle commands for backward compatibility.
Adjusted the path's start point to 90 degrees
to align the origin consistently with other path commands.
No compatibility issue, this only could affect the trimpath effects.
Introduced a dedicated mutex for each surface instance
to ensure safe sharing between the loader, renderer, and engine.
This enhancement allows for secure modification and access to bitmap data,
addressing potential concurrency issues.
Multiple Picture instances can now safely share a single loader instance,
optimizing performance.
This change builds upon the previous Loader Cache improvements:
ff6ea4b6c4