Releases: thorvg/thorvg
ThorVG 0.13.0
After a period of three months of steadfast commitment, we are pleased to present the latest version of ThorVG. In this newly revised edition, we are eager to showcase a series of significant advancements. (Full Change Log)
Infrastructure
Threading feature configuration
ThorVG fundamentally utilizes the standard features of C++14, leveraging these capabilities to perform rendering task parallelization based on its custom-implemented task scheduler. It employs synchronization mechanisms such as std::thread and std::mutex during the parallelization process, which may be challenging to support on low-spec processors like the STM32. To enhance compatibility, we have further abstracted the task scheduler and locking system, ensuring ThorVG can be smoothly built even in environments that cannot accommodate such parallelization. If you wish to disable ThorVG's built-in locking & task scheduler, you can do so by adding the following option through the build configuration.
$meson setup builddir -Dthreads=false ...
MSYS2 package support
To facilitate easy and quick installation of ThorVG on Windows, we have added ThorVG's package to the MSYS2 package manager. If you are a MingW user, you can now directly install and use the pre-packaged ThorVG on Windows.
Download and execute the MSYS2 installer on the web page above and follow the steps. When done, just launch one of the terminals in the start menu, according to the architecture and compiler you want (either 32 or 64 bits, with MSVCRT or UCRT library). Then you can install the ThorVG package :
pacman -S thorvg
To update to a newer release (and update all the packages, which is preferable), run :
pacman -Syu
Lottie Animation
Stability enhancements have been achieved through a series of comprehensive bug fixes, alongside significant improvements in Lottie format compatibility and notable advancements in Lottie rendering performance. Specifically, the optimization process for Lottie rendering has been refined, focusing on efficiently converting Lottie data into ThorVG commands for each frame. Our stress profiling tests have demonstrated a remarkable 38% enhancement in rendering performance when simultaneously executing 100 animations. Furthermore, this release marks the official introduction of two major new features.
Text elements support
Official support for fonts, text, and characters (glyphs) has now begun, enabling the output of basic text elements. This involves interpreting font and matching glyph vector information specified in the Lottie format to prepare the output graphics. Embedded layout information within the text element determines the size of each glyph, allowing for appropriate placement or the addition of animation effects. Text layout supports horizontal or vertical progression directions, as well as left, center, and right alignments. Additionally, graphical effects can be applied to characters based on the basic attributes of strokes outputtable by Lottie (such as join types, thickness, color, and dash patterns, etc).
ThorVG Lottie Text Animations
Slot elements support
Lottie Slot is a feature that addresses a property, it enables dynamic and flexible animation customizations at runtime.
Dynamic Change of Fill Property via Slot
// Lottie Slots format example
// 'solid_fill' and 'gradient_fill' are the name of an SID that can be overridden with properties sharing the same name.
"slots": {
"solid_fill":{
"p":{
"a":0,
"k":[0.259, 1,0.518]
}
},
"gradient_fill": {
"p": {
"a": 0,
"k": [0, 0.1, 0.1, 0.2, 1, 1, 0.1, 0.2, 0.1, 1]
}
}
}
ThorVG Slot overriding feature allows for the manipulation of multiple properties within slot data (themes), seamlessly parsing and applying new properties to targeted properties(SIDs). As a result, this enhancement in ThorVG empowers users to implement essential theming features effectively. In this release, ThorVG supports the following properties for slot overriding:
- Solid Stroke
- Solid Fill
- Gradient Stroke
- Gradient Fill
- Text Document
Practically, during its integration with the dotLottie player, ThorVG refined this capability by allowing multiple properties to be applied and reverted, ensuring a more versatile and functional animation experience. The following code snippet demonstrates an example of the ThorVG slot overriding method. The following demonstrates how to use slot overriding with tvg::LottieAnimation. Please note that ThorVG has introduced the 'LottieAnimation' class, which extends the 'Animation' class. This class is specifically designed to support Lottie-related functionalities.
// Include a header file for lottie extension features.
#include <thorvg_lottie.h>
// Create a lottie animation.
auto lottie = LottieAnimation::gen();
// ThorVG Lottie constructs the LottieSlot data based on the property SIDs. If the current animation
// properties possess an SID value, these properties will be linked to the LottieSlot.
lottie->load(“sample.json”);
// In this example, Theme A contains only the “solid_fill” property, but it can include
// multiple properties as required.
auto themeA = R"({"solid_fill":{"p":{"a":0,"k":[0.259,1,0.518]}}})";
// When applying Theme A, ThorVG Lottie iterates over the given Theme A SID properties, identifies
// the target properties in the current animation that match the given SID name, and then parses
// and overrides these properties with new ones.
lottie->override(themeA);
// Reset the theme (Revert to the default)
lottie->override(nullptr);
For more information, Please explore Lottie Slot feature(aka. Theming) with the official dotLottie live player!
Dynamic Theme Change by the ThorVG Slot Overriding
WebGPU Engine
Currently, the ThorVG Team is developing a WebGPU-based rendering engine to ensure the high performance of the next-generation graphics engine, while also considering the versatility across web and various platforms. In version 0.13, advanced features such as scene Blending, Composition, and super sampling based Anti-Aliasing have been further implemented. At present, we have secured the major advanced rendering features that ThorVG can support, and have successfully rendered animations within the wide range of Lottie specifications supported by ThorVG. Although it is still in the development stages, we will focus on enhancing stability and performance as we continue development towards the next version release.
Lottie Animations powered by ThorVG WebGPU Engine
OpenGL Engine
ThorVG OpenGL/ES has been revised under an experimental version. Alongside WebGPU, this release has seen the addition of many advanced rendering features. Notably, Scene Blending, Composition, and multi sampling based Anti-Aliasing features have been newly introduced, allowing for the output of shapes with quite decent quality as a Vector Drawing Primitive engine.
Vector Primitive Drawings by ThorVG GL Engine
Note that currently, ThorVG only conducts rendering by specifying rendering targets through FBO, due to a known issue where drawing onto the main surface fails. This issue is anticipated to be resolved in the upcoming release as soon as possible.
//Create a GL Canvas
auto canvas = tvg::GlCanvas::gen();
//Prepare the target buffer with FBO
GLint targetId;
...
//Set the target buffer with Canvas
glCanvas->target(targetId, width, height);
Static WebP Loader
Basically, ThorVG inherently supports two types of loader mechanisms for importing specific image formats: Static and External loaders. External loader refers to the method of dynamically linking ThorVG with external, fully-fledged libraries, while Static loader implies an implementation built-in ThorVG itself. The decision to support both approaches stems from the desire to leverage widely-used image libraries, which are often incorporated into systems as shared libraries to enhance the efficiency of both applications and the systems themselves. ThorVG is structured to utilize these libraries wherever possible, recommending their integration in native systems such as Android, iOS, Mac, Windows, Linux. However, in scenarios where this integration is challenging, ThorVG's built-in image loader can be utilized, offering users immediate access to these features without external dependencies, significantly enhancing ThorVG's portability. Consequently, users can configure either loader as needed when building the ThorVG binary.
ThorVG 0.12.10
This release includes several improvements and minor bug fixes:
- [Renderer] Fixed a crash issue caused by setting an invalid clipper. #2083
- [SwEngine] Improved the rendering of consecutive line drawings to comply with the SVG spec. #1487
- [SwEngine] Enhanced the stability of contour composition logic. #2093
- [Lottie] Enhanced the stability of the Slot overriding feature to ensure smoother animations.
- [Lottie] Improved resilience against invalid Lottie input, addressing potential crashes. #2072
- [Lottie] Optimized the logic, reducing the binary size by approximately 6kb.
- [Lottie] Refined the rendering logic to eliminate unnecessary rendering contexts, ensuring more efficient animations. (~10% performance++)
- [Lottie] Fixed a rendering issue that impacted Lottie compatibility. #2061
- [SVG] Enhanced the handling of gradient units and recalculated each radial element accurately. #2078
- [SVG] Improved the handling of "href" IDs by verifying parent-child relationships. #2078
Full Changelog: v0.12.9...v0.12.10
ThorVG 0.12.9
This release includes several improvements and minor bug fixes:
- [Renderer] Enhanced paint objects to retain their composition context, ensuring re-rendering accurately without update calls. #2058
- [Lottie] Enhanced to support slot-overriding reset function.
- [Lottie] Fixed a memory leak issue that occurred when attempting to load invalid Lottie files. #2070
- [SVG] Improved SVG path compatibility by removing a incorrect conditional check in pathAppendArcTo. #1255
- [TTF] Enhanced the UWP portability by implementing an alternative method for file loading. #1912
- [Portability] Addressed and resolved a compilation issue related to Lottie animations. #2062
Full Changelog: v0.12.8...v0.12.9
ThorVG 0.12.8
This release includes several improvements and minor bug fixes:
- [Lottie] Improved slot overriding functionality to support multiple properties within a single JSON resource. #2045
- [CAPI] Introduced two additional essential straight version ColorSpaces.
- [WebP] Addressed a static WebP memory alignment issue. #2006
- [Portability] Resolved a Lottie compilation issue for ESP32. #2051
Full Changelog: v0.12.7...v0.12.8
ThorVG 0.12.7
This release includes several improvements and minor bug fixes:
- [Renderer] Improved the image loader caching mechanism to address an issue with hash collisions. #2020
- [Renderer] Fixed a regression by correcting an incorrect premultiplied option in the static PNG loader.
- [Renderer] Corrected an issue with the incorrect positioning of dash offsets in SVGs. #1686
- [SwEngine] Resolved a regression that affected a specific outline curve rendering. #2015
- [SwEngine] Addressed an issue with radial gradients when the focal point is outside the circle, particularly on ARM/Apple Silicon devices. #2014
- [SwEngine] Fixed a regression that disrupted certain Lottie trim path animations. #2021
- [Lottie] Introduced support for slot overriding, aligning with the Lottie specification. #1808
Full Changelog: v0.12.6...v0.12.7
ThorVG 0.12.6
This release includes several improvements and minor bug fixes:
- [SW_Engine] Improved stroke outline visual quality through corrected calculation methods. #1915
- [SW_Engine] Enhanced the accuracy of dash outline curve length calculations for more precise renderings. #1686
- [SVG] Rectified handling of empty id values to improve SVG parsing. #1977
- [SVG] Enhanced validation for url(#id) syntax, ensuring more reliable SVG rendering. #1983
- [WebP] Achieved a reduction in binary size by 1.5KB.
- [Examples] Made improvements to threading stability in example code, ensuring smoother operation.
- [Portability] Addressed compilation issues on Windows, enhancing cross-platform support.
Full Changelog: v0.12.5...v0.12.6
ThorVG 0.12.5
This release includes several improvements and minor bug fixes:
- [Renderer] Enhanced resilience in canvas rendering to ensure continuity even when encountering invalid scene elements. #1951
- [Renderer] Increased picture format compatibility by accommodating inconsistent extension names.
- [Loaders] Improved image decoding efficiency through the application of premultiplied alpha channel and ensuring consistency in image colorspaces.
- [SwEngine] Upgraded image up-scaler quality, resulting in smoother and more refined image enlargements. #1949
- [WebP] Introduced a static WebP loading support. #1427
Full Changelog: v0.12.4...v0.12.5
ThorVG 0.12.4
This release includes several improvements and minor bug fixes:
- [SwEngine] Resolved a specific case in the handling of trim paths, ensuring more accurate renderings. #1939
- [Renderer] Fixed an issue where context loss would result in paints objects drawing invalid contents, enhancing stability and visual output.
- [Lottie] Rectified errors in font/glyph and assets parsing, ensuring smoother integration and functionality.
- [Lottie] Corrected text height alignment issues, improving layout consistency across Lottie animations.
- [Lottie] Enhanced compatibility with mismatched image formats with diverse assets.
- [SVG] Implemented the SVG specification for handling out-of-range elliptical arc parameters. #1937
- [SVG] Corrected the handling of zero values for arc's rx and ry parameters, ensuring arcs are processed correctly in all scenarios.
Full Changelog: v0.12.3...v0.12.4
ThorVG 0.12.3
This release includes several improvements and minor bug fixes:
- [SwEngine] Resolved a regression bug that resulted in corrupted composition images when resizing the canvas.
- [SwEngine] Enhanced dash line drawing accuracy by excluding extremely small lines (less than 0.001 pixel in size).
- [Renderer] Corrected the starting position of round rectangles, addressing the Lottie trimpath animation issue. #1933
- [Lottie] Fixed a bug that led to missing stroke drawings in certain animations. #1933
- [Lottie] Corrected a wrong scene building logic that led an unexpected image animation performance issues.
- [SVG] Add missing implementation of skewX and skewY in transform-list #1927
Full Changelog: v0.12.2...v0.12.3
ThorVG 0.12.2
This release includes several improvements and minor bug fixes:
- [Lottie] Resolved an issue with incorrect time remapping. #1809
- [Lottie] Addressed a bug affecting gradient fill behavior.
- [Lottie] Enhanced feature coverage by accurately processing XOR shapes filling.
- [SwEngine] Fixed a regression issue that caused incorrect shape-line directionality.
- [SwEngine] Significantly improved the performance of image down-scaling.
- [SwEngine] Improved performance by retaining the compositor caches by default.
- [Portability] Added support for threading toggling feature and enhanced STM32 portability. #1900