Releases: thorvg/thorvg
ThorVG 0.14.1
This release includes several improvements and minor bug fixes:
- [SwEngine] Improved GradientFill rendering quality with properly applies anti-aliased edges for FillSpread: Repeat.
- [SwEngine] Correctly applied the anti-aliased shape filling when half-translucent stroking overlaps.
- [SwEngine] Added support for 8-bit grayscale image scaling rasterization.
- [GlEngine] Optimized rendering performance by allocating the optimal size of off-screen buffers.
- [GlEngine] Rectified the drawing quality for tiny strokes.
- [Lottie] Removed assert() calls in JSON Parser to reduce the binary size by 0.8 KB.
- [Lottie] Improved parsing to continue even when the expected integer value type is not provided. #2389
- [Lottie] Rectified masking behaviors to support complex masking compositions. #2426
- [Lottie] Fixed image drawing issues by allowing image sharing among LottiePicture instances. #2428
- [Lottie] Fixed a regression bug where InverseAlphaMasking was incorrectly applied as AlphaMasking.
- [Portability] Resolved compilation issues in VS2017 due to missing headers for std::min and std::max. #2512
Full Changelog: v0.14.0...v0.14.1
ThorVG v0.14.0
After three months of steadfast commitment, we are pleased to present ThorVG v0.14! This new version features a series of significant advancements that we are eager to showcase. Full Change Log
Community
Lottie Animation Support in LVGL
Over the past six months, through collaboration, LVGL has successfully integrated ThorVG to support vector primitive drawings and fully replaced the existing rlottie with ThorVG for Lottie animation functionality. rlottie, an open-source project led by Samsung, has ceased all maintenance, clearly indicating little potential for further development. Given this, it was quite expected that LVGL would see choosing ThorVG for its superior functionality and performance as the obvious choice. Additionally, LVGL needed to support SVG features within their framework; they were able to achieve both SVG and Lottie functionalities using the compact ThorVG library.
[Lottie Animation on a micro-device (STM32F769, 200 MHz, 800x480 screen)]
ThorVG in Canva iOS
Canva, a leading visual communication platform, has integrated ThorVG into its iOS app for Lottie animation support. The decision to adopt ThorVG was driven by several factors identified by its team:
- Performance Improvement: ThorVG offered significant speed and memory efficiency improvements.
- Active Development: Continuous updates and support from the ThorVG community ensured reliability and access to new features.
- Technical Compatibility: ThorVG's ability to render frames efficiently and its compatibility with Canva’s existing infrastructure made it an ideal choice.
For more details, please check this page to see how Canva applied ThorVG and gained significant improvements from it.
ThorVG New Package distributions
During the last development period, ThorVG has been expanded to various package management systems with the help of the community. Here are three new package servers you can officially use to conveniently install ThorVG:
- Conan C/C++ Package Manager
- xmake, A cross-platform build utility based on Lua
- The ESP Component Registry
- MSYS2 Software Distribution and Building Platform for Windows
Infrastructure (for Integrators)
During the last development period, we made structural changes and improvements to the ThorVG repository.
First, we changed the folder locations for the source code. By separating the tools and examples within the ThorVG directory from the src folder, we have started maintaining only the pure ThorVG library code in it.
Second, we separated the web code into a separate thorvg.web project, keeping the thorvg project solely for the core rendering engine. This change is expected to make the repository and branch management more compact and efficient, as many projects do not need to reference the web components.
"thorvg/src/tools" -> "thorvg/tools" (Executable ThorVG programs)
"thorvg/src/examples" -> "thorvg/examples" (ThorVG sample code)
"thorvg/web" -> "thorvg.web" (ThorVG for Web system support)
Third, we changed the meson option name from vector to simd for a more obvious and intuitive name. To use AVX or Neon vector processing, please update your build configuration with the new option.
$meson setup builddir -Dsimd=true ...
Fourth, ThorVG has enabled the TTF loader in the build configuration to support text rendering by default. To manually specify the TTF feature, please use the -Dloader meson option to include or exclude it. This feature is also defined in the ThorVG config.h file.
#define THORVG_TTF_LOADER_SUPPORT 1
Laslty, In this release, ThorVG starts to support Lottie Expressions feature in default. It might enlarge the binary size of the ThorVG (~250kb). If your program doesn't necessary for this, Please disable the feature using meson option:
$meson setup builddir -Dextra="" ...
This feature will be also defined in the ThorVG config.h file.
#define THORVG_LOTTIE_EXPRESSIONS_SUPPORT 1 //Remove this if you manually integrate ThorVG with your program.
If you are not familiar with Lottie and Expressions, please refer to the Lottie Animation > Expressions Support section.
Lottie Animation
Expressions Support
Lottie Expressions represent a runtime scripting method designed to execute programmable programs, created specifically for Adobe After Effects. Originally, Lottie was developed for After Effects, but its reliance on expressions has become a significant barrier to compatibility with players on other platforms. Currently, no players, aside from lottie-web, support the expressions feature at all.
Nevertheless, ThorVG begins to support Expressions primarily, it supports the major specifications of Expressions as well as the basic JavaScript operations that underlie JerryScript engine. With Expressions, ThorVG can modify the position, size, and color of shapes and layers, and control the segment repeat playback of Lottie animations, among other options such as loop.
The following is an example of Expressions code that modifies the position of a scene in a Lottie Animation which is allowed in ThorVG.
var $bm_rt; //This is a result, its type is a 2d position.
var amp, freq, decay, n, time_max, n, t, t, v;
amp = 0.05;
freq = 2;
decay = 2;
n = 0;
$bm_rt = time_max = 2;
if (numKeys > 0) {
$bm_rt = n = nearestKey(time).index;
if (key(n).time > time) {
n--;
}
}
if (n == 0) {
$bm_rt = t = 0;
} else {
$bm_rt = t = sub(time, key(n).time);
}
if (n > 0 && t < time_max) {
v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10)));
$bm_rt = sum(value, div(mul(mul(v, amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))));
} else {
$bm_rt = value;
}
[Lottie Expressions Sample Code]
[ThorVG Lottie Animations without Expressions]
[ThorVG Lottie Animations with Expressions]
In the expressions, $bm_rt is the result variable whose type is arbitrary but aligned with the current property targeted by the expression. After executing the expression code, ThorVG can acquire a new property value from $bm_rt in each frame, and it will overwrite the existing property with this new value within the same frame. Therefore, we can assume that if the above code resides in the Lottie Position property, the type of the bm_rt value will be a Position(x, y) value and the value will be applied to the current model position value.
[ThorVG Lottie Expressions: Design Overview]
Basically, when provided, Expressions source code can reside in every Lottie Property with Lottie Expression. A Lottie Property is abstract data that will be implemented as Position, Opacity, Float, Path, etc., as required by the Lottie Model data. The ThorVG Lottie Parser will combine them—LottieExpression plus LottieProperty—in the LottieModel in order to compile/execute the Expression source code using the Lottie Expressions Engine for every property during the scene building time by the Lottie Builder.
In the above figure, the Lottie Expressions Engine and JerryScript Core are presented as integrated features of ThorVG and can be optionally enabled as an experimental feature during the ThorVG build process. If the feature is disabled, ThorVG Lottie will neither compose the LottieExpression data nor execute any of it.
Additionally, the Expressions Engine will not function when Lottie Model data is processed on the worker thread through ThorVG's intrinsic task-scheduler. This mean s that Expressions feature can be disabled by the engine on runtime when the ThorVG threading is functional. The reason I assume that the JerryScript Core has been designed to work within an unique global context that is not thread-safe at all. We could consider making it thread-safe using a locking mechanism, but this might lead to significant threading sync-waiting, which could undermine the effectiveness of threading. Until now, the dotlottie player has not used ThorVG's threading feature so it wouldn’t be a problem but in the future, we will address this issue and decide on a proper solution.
Note that, the current specifications of Expressions officially supported by ThorVG are as follows:
- Global Object
- Math
- Random
- Interpolation
- Comp Properties
- Layer General
- Layer Properties
- Properties
- Key
-...
ThorVG v0.13.8
This release includes several improvements and minor bug fixes:
- [Renderer] Optimized ClipPath performance with viewport fast-track. #2332
- [SwEngine] Fixed a bug in Bezier curve drawing with wrong rectangular filling. #2379
- [SwEngine] Fixed an issue where anti-aliasing was omitted when trimming the stroke.
- [SwEngine] Resolved a corner case crash when the anti-aliasing frame range was out of bounds. #2391
- [SVG] Added support for Text Node. #2350
- [Portability] Fixed a mutex crash issue in Visual Studio 2022 17.10 due to the STL known issue (_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR).
Full Changelog: v0.13.7...v0.13.8
ThorVG 0.13.7
This release includes several improvements and minor bug fixes:
- [Renderer] Introduced the Shape::strokeTrim() feature. #2190
- [Renderer] Corrected the return value of Shape::strokeMiterlimit() API from NonSupport to InvalidArgument.
- [SwEngine] Rectified the dash line drawing issue, ensuring the length of the remaining line to be drawn matches the dash line length exactly.
- [SwEngine] Improved trim path accuracy, enhancing Lottie simultaneous mode rendering. #2335
- [SwEngine] Fine-tuned RLE performance for extremely large shapes.
- [Lottie] Corrected the bug in matte layer finding. #2349
- [Lottie] Stabilized text property support for cases with invalid font or glyph matches.
- [SVG] Fixed the issue with loading embedded WebP images due to a missing MIME type. #2355
Full Changelog: v0.13.6...v0.13.7
ThorVG 0.13.6
This release includes several improvements and minor bug fixes:
- [Renderer] Corrected a missing symbol in the viewport CAPI. #2314
- [Lottie] Fixed a memory violation error during path interpolation. #2287
- [Lottie] Enhanced the matte feature to support the 'tp' property. #2325
- [Lottie] Rectified transformation behaviors in the repeater.
- [Lottie] Optimized runtime memory usage by encoding the property names.
- [Web] Optimized the rendering performance by introducing the viewport clipping. #2292
- [Portability] Resolved several compilation warnings.
- [Example] Fixed a missing update for re-drawing gl engine in AnimateMasking.
- [Example] Fixed a heap-use-after-free error in CAPI.
Full Changelog: v0.13.5...v0.13.6
ThorVG 0.13.5
This release includes several improvements and minor bug fixes:
- [Renderer] Introduced a custom floating epsilon to prevent a potential crash in rotated image drawing. #2265
- [Renderer] Added viewport region drawing feature. #2274
- [Lottie] Fixed a bug in the Polystar transformation.
- [Lottie] Fixed a bug that didn't trigger the slot overriding update. #2303
- [SVG] Rectified XML parsing where an XML entity was omitted, fixing bitmap image drawing. #2273
- [Web] Improved performance (~5fps) by tweaking Uint8ClampedArray memory conversion.
- [Web] Enhanced performance by freezing invisible content during initial boot-up. thorvg/thorvg.web#5
- [Portability] Fixed a regression issue with incorrect arguments in Lottie. #2289
Full Changelog: v0.13.4...v0.13.5
ThorVG 0.13.4
This release includes several improvements and minor bug fixes:
- [Lottie] Added support for Rounded Corners in Polystar and Path properties. #2230
- [Lottie] Introduced skew transformation support for more versatile animations. #2262
- [Lottie] Fixed memory corruption issue caused by slot reverting. #2255
- [Lottie] Improved precision of keyframe values for enhanced animation accuracy. #2266
- [Lottie] Fixed access violation issue when updating empty layer Lottie data. #2283
Full Changelog: v0.13.3...v0.13.4
ThorVG 0.13.3
This release includes several improvements and minor bug fixes:
- [SwEngine] Added AArch64 NEON support for grayscale 8-bit and 32-bit color rasterization. #30
- [Renderer] Fixed a precision issue in appendArc.
- [Renderer] Enhanced rendering performance by ~ 5% through optimizations in Bezier curve calculations.
- [Lottie] Introduced support for the Expressions feature. #1640
- [Lottie] Enhanced the Text feature by adding a tracking property. #2254
- [Lottie] Addressed memory leaks and violations.
- [SVG] Corrected the omission of paintOrder and display property copying and inheritance in CSS data processing.
- [Portability] Resolved a compilation error related to an incorrect default parameter in CAPI. #2228
- [Portability] Fixed a compilation error when using C++17 with MSVC. #2225
Full Changelog: v0.13.2...v0.13.3
ThorVG 0.13.2
This release includes several improvements and minor bug fixes:
- [Renderer] Fixed incorrect stroke composition when InvAlpha, InvLuma masking is applied. #1653
- [Lottie] Fixed alignment issues with multi-line texts.
- [SVG] Updated to prevent the rendering of graphics nodes that are not closed. #2210
- [SVG] Corrected the rendering behavior of objects with display=none when referenced via a use tag.
- [SVG] Addressed an issue where opacity values were not properly copied.
- [SVG] Enhanced stabilization. #2078
- [Web] Eliminated memory leaks occurring at player termination.
Full Changelog: v0.13.1...v0.13.2
ThorVG 0.13.1
This release includes several improvements and minor bug fixes:
- [SwEngine] Improved AVX/NEON support for grayscaling operations.
- [Lottie] Enhanced frame updates to ensure animations reach the final frame accurately. #2147
- [Lottie] Resolved parsing errors caused by incorrect data types for composition/layer sizes. #2153
- [Lottie] Added support for the Marker (Segment) feature. #2044
- [Lottie] Corrected inaccuracies in simultaneous TrimPath animations. #2173
- [Lottie] Improved stability of the Lottie features.
- [SVG] Stabilized SVG data parsing to handle unexpected data. #2078
- [SVG] Fixed a heap buffer overflow issue caused by SVG data not ending with a null character. #2163
- [SVG] Corrected size calculations in URL decoding to prevent memory corruption. #2156
- [Portability] Resolved build issues on NEON-aarch64 architectures.
- [Portability] Addressed CAPI build issues related to disabled ThorVG Lottie extension features.
Full Changelog: v0.13.0...v0.13.1