Skip to content

Releases: thorvg/thorvg

ThorVG v0.15

06 Oct 14:02

Choose a tag to compare

After three months of steadfast commitment, we are pleased to present ThorVG v0.15! This new version features a series of significant advancements that we are eager to showcase. Please check the release notes to see the latest updates in ThorVG!

Full Changelog: v0.14.0...v0.15.0

WebGPU Engine

In this release, we have made significant improvements in the performance, functionality, and stability of the WebGPU engine. Despite our steadyfast efforts, the WebGPU engine is being provided as a experimental version in this release. This decision led us to further validate its stability and improve the quality of anti-aliasing. We plan to achieve these goals in the right next version. Nevertheless, the WebGPU engine's rendering performance and functionality are working well overall and are ready for trial use at this stage. We have also successfully integrated WebGPU with web browsers using WebAssembly, and performance tests show it can deliver 120fps in 4K resolution.

To further boost ThorVG's performance, we revisited the WebGPU engines from a performance standpoint and applied a series of targeted optimizations.

[Enhanced Rendering Capabilities with ThorVG WebGPU]

Stroke Generation

We introduced several optimizations to improve stroke generation efficiency. We minimized memory allocations, range checks, and other conditions for large-scale vertex and index creation, while reducing the number of segment length and bounding box calculations. Distance and bounding box updates are now applied only when necessary, and for shapes without strokes, distance calculations were entirely removed. We also switched to stack memory for better cache efficiency and reduced fragmentation, improving memory allocation speed. Caching was implemented for point distances and path lengths, with updates triggered only as needed. Geometry consistency validation is deferred to the final stage of the path life-cycle to streamline data streaming. Additionally, stroke trimming now uses binary search, circle geometry for caps and joints is pre-cached. After this optimization, we achieved a performance enhancement in stroke rendering of approximately 3x.

[Stroke Generation Performance Comparison. Before: 200fps -> After: 676fps]

Blending and Compositions

We have reduced the number of context switches during masking operations, leading to improved performance. Additionally, new decomposed Shaders were introduced to optimize the execution of various blending methods. Support for new masking methods, including Lighten and Darken, has also been added, offering greater flexibility in visual effects. The ThorVG WebGPU engine currently supports the following blending modes: Normal, Multiply, Screen, Overlay, Darken, Lighten, Color Dodge, Color Burn, Hard Light, Soft Light, Difference, Exclusion, Add.

[Support for Various WebGPU Blending Types]

More Optimizations

We implemented memory optimizations by using a single stencil buffer for all operations, significantly reducing GPU memory pressure. Additionally, gradient values are now pre-cached into a texture, allowing GPU samplers to efficiently manage spread and interpolation computations. The pre-cached gradient values and reduced context switches further enhanced both the performance and visual quality of the rendering.

[Gradient Fill Transform]

More Feature Coverage

We added support for Path Clipping and Viewport management. Path clipping allows parts of a graphic that fall outside a defined clipping area to be hidden, enabling more efficient rendering and control over what is displayed within the scene. This feature is particularly useful when managing complex shapes or focusing on specific regions of a graphic, ensuring that only the visible portions are processed and rendered. Viewport defines the visible area in which the rendering occurs, allowing control over the portion of the canvas or scene that is rendered to the screen. By setting the viewport, developers can manage the scale and positioning of content within a specified region, offering greater flexibility in rendering larger scenes or zooming into specific areas without recalculating the entire graphic.

[Path Clipping (Left) and Viewport (Right)]

Lottie Animation

In this update, the ThorVG Lottie feature has been significantly enhanced in terms of specification support, functionality stability, and performance. Lottie rendering performance has improved by approximately 10% compared to the last version v0.14, with new support for Layer Effects, Text Range Selector, User Interaction, Offset Path, and extended Masking capabilities.

Layer Effect Support

The biggest feature addition in ThorVG is Layer Effect support. Layer Effects in Lottie are related to post-processing effects and can create various visual transformations through post-processing image manipulation. While there are various types of effects within Layer Effects, ThorVG will start by supporting the widely-used Blur effect first and gradually expand to other types such as Drop Shadow. Please note that Layer Effects are advanced features that come with higher processing costs, making them ideal for creating impactful visuals while offering enhanced creative control and dynamic visual presentations.

[Lottie Layer Effect (Gaussian Blur) in ThorVG]

Interactive Lottie Support

ThorVG’s Interactive Lottie Feature introduces the ability to make Lottie animations responsive to user interactions, significantly enhancing the user experience. This feature allows developers to trigger, control, and manipulate animations in real-time based on user inputs such as clicks, touches, or hover actions, and then play the corresponding animation segment based on the application's context.

[Interactive Lottie Animation in ThorVG]

For this interaction, ThorVG introduced a mechanism for searching for specific objects within a Lottie scene and determining the response between those objects and user input. By default, the unit of search is a Lottie Layer, and users can determine the target they want to search for through its name. To facilitate this process, ThorVG allows users to easily determine whether a specific object within a Lottie scene has been selected by identifying the object and providing its touch area (bounding box). Please check the demo code for basic interaction.

[Interactive Lottie Workflow in ThorVG]

Text Range Selector Support

ThorVG’s text capabilities have been enhanced with new features and corrections, providing greater flexibility and precision for text animations in Lottie. We’ve introduced support for selecting and animating text based on defined ranges, improved control over line spacing for more sophisticated layouts, and added the ability to randomize text animations for dynamic visual effects.

[Dynamic Lottie Texts in ThorVG]

Offset Path Support

The offset curve is a curve parallel to the original one at a specified distance. For Bezier curves, generating an offset curve is non-trivial. Although it can be done analytically, the resulting curve is no longer a polynomial and cannot be represented as a Bezier curve:

To address this, different techniques can be employed to quickly and accurately estimate the offset curve as a Bezier curve. In general, this can be tricky, but a straightforward approach can be applied in most cases. For each point along the original Bezier curve, the tangent vector at that point is computed, which can be derived from the first derivative of the Bezier curve's parametric equation. From the tangent vector, the normal vector is calculated by rotating the tangent vector 90 degrees in either direction (left or right). Next, each control point of the original Bezier curve is moved by a specified offset distance along the corresponding normal vector. These resulting points are then connected, creating new segments that can be intersected with adjacent segments. This process yields...

Read more

ThorVG 0.14.10

13 Sep 01:48

Choose a tag to compare

This release includes several improvements and minor bug fixes:

  • [SwEngine] Corrected blending operations in certain Lottie animations, ensuring proper rendering behavior. #2704
  • [SwEngine] Enhanced support for drawing direct images with matte and blending compositions, improving overall rendering accuracy. #1767
  • [SwEngine] Fixed the issue where 8-bit grayscale images were not blending correctly during rendering.
  • [Renderer] Resolved a regression causing rendering failures when text assets were missing. #2715
  • [Lottie] Improved support for the Text Range Selector, now excluding spaces among character, words, and lines when using text-based. #2178
  • [Lottie] Updated line spacing calculations to consider the Text Range Selector, applying the maximum spacing value for each line for better text rendering. #2178
  • [SVG] Fixed an issue where text was not being appended correctly to the SVG scene, ensuring proper rendering of text elements.

Full Changelog: v0.14.9...v0.14.10

ThorVG 0.14.9

06 Sep 02:54

Choose a tag to compare

This release includes several improvements and minor bug fixes:

  • [SwEngine] Improved accuracy in dashed line drawing.
  • [Lottie] Corrected TrimPath handling for values exceeding the specification range.
  • [Lottie] Enhanced reliability when parsing JSON, addressing cases with "null" data. #2703
  • [SVG] Fixed a rendering issue where matrix inversion required precision greater than 1e-6.
  • [SVG] Resolved a regression bug that caused the omission of drawing due to text nodes. #2706
  • [TTF] Fixed an issue with incorrect rendering where spaces and invalid glyphs were inserted #2687

Full Changelog: v0.14.8...v0.14.9

ThorVG v0.14.8

30 Aug 01:47

Choose a tag to compare

This release includes several improvements and minor bug fixes:

  • [SwEngine] Rectified an issue where anti-aliased outline colors were incorrectly blended.
  • [GlEngine] Corrected an issue where stroke drawing was omitted at small line sizes. #2435
  • [GlEngine] Fixed the miter limit calculation to ensure correct fallback to bevel join.
  • [Renderer] Resolved an issue where text updates were missing after changing italic or font size. #2676 #2669
  • [Lottie] Fixed a regression bug affecting TrimPath behavior. #2670
  • [Lottie] Addressed an issue where TrimPaths were not applied consistently across groups.
  • [Lottie] Corrected an over-range issue in color interpolation.
  • [Lottie] Stabilized Lottie Expressions to prevent several crashes.
  • [SVG] Adjusted out-of-range HSL values. #2678

Full Changelog: v0.14.7...v0.14.8

ThorVG 0.14.7

23 Aug 03:07

Choose a tag to compare

This release includes several improvements and minor bug fixes:

  • [Lottie] Added support for ShapeModifiers OffsetPath property. #2230
  • [Lottie] Fixed a crash related to Text updates when a carriage return (13) character is introduced.
  • [Lottie] Ensured a null terminator is present at the end of copied JSON data. #2642
  • [Common] Removed the TexMap Experimental feature. #1372
  • [SwEngine] Fixed memory access violations causing crashes during texture mapping.
  • [Infra] Updated the Meson build to override pkgconfig dependencies, allowing ThorVG to be used as a subproject.

Full Changelog: v0.14.6...v0.14.7

ThorVG 0.14.6

16 Aug 01:23

Choose a tag to compare

This release includes several improvements and minor bug fixes:

  • [Renderer] Removed the experimental scene clipping feature.
  • [Lottie] Rectified support for the polygon rounded corner property. #2624
  • [Lottie] Optimized rendering by pooling Shape instances, improving performance.
  • [Lottie] Fixed an edge case where the rectangle roundness formula was incorrectly applied.
  • [Lottie] Updated logic to prioritize rectangle roundness over rounded corners, ensuring consistency with After Effects behavior.
  • [Web] Fixed a regression where resizing the frame buffer did not work. #2580

Full Changelog: v0.14.5...v0.14.6

ThorVG 0.14.5

09 Aug 03:32

Choose a tag to compare

This release includes several improvements and minor bug fixes:

  • [SwEngine] Enhanced the Radial Gradient quality by revamping the coefficient calculations. #2530
  • [SwEngine] Improved the Radial Gradient behavior to fill with the last color stop value when its region is zero. #2582
  • [Renderer] Introduced support for Lighten/Darken Masking options. #2608
  • [Renderer] Revised Paint::bounds() to correctly return coordinates in Canvas space.
  • [Renderer] Added a feature to find a specific paint node by unique ID. #2055
  • [Lottie] Enhanced Expressions functionality, adding support for groupIndex() and property(ix).
  • [Lottie] Fixed various Expression bugs, including issues with updating missing Transformation and SolidFill properties.
  • [Lottie] Improved functionality to support Matte + Masking composition, Lighten/Darken Masking usages.
  • [Lottie] Resolved a regression issue affecting animation smoothness due to Bezier computation.
  • [TTF] Added basic support for composite glyph loading. #2599
  • [Infrastructure] Applied Build Optimization Level 3, boosting performance to the native systems by ~ 20%.

Full Changelog: v0.14.4...v0.14.5

ThorVG 0.14.4

26 Jul 04:24

Choose a tag to compare

This release includes several improvements and minor bug fixes:

  • [SwEngine] Fixed the linear gradient filling issue when its length is less than zero. #2582
  • [SwEngine] Addressed a corner case where a invisible image drawing returns InsufficientCondition, Now it's Success
  • [Renderer] Corrected the animation segment handling to accommodate zero-size segments for stopped motion.
  • [Lottie] Improved Expressions feature coverage, including global layer index and PingPong looping.
  • [Lottie] Stabilized Expressions linear interpolation and composition layer behaviors.
  • [Lottie] Fixed a regression bug causing invalid contents to appear as artifacts.
  • [Lottie] Optimized with more aggressive object culling.

Full Changelog: v0.14.3...v0.14.4

ThorVG 0.14.3

19 Jul 00:55

Choose a tag to compare

This release includes several improvements and minor bug fixes:

[SwEngine] Added support for drawing images in 8-bit grayscale format.
[SwEngine] Improved performance of alpha blending operations for faster rendering.
[Renderer] Introduced APIs for querying the engine version. #2543
[Lottie] Properly supported counterclockwise direction for ellipse drawing.
[Lottie] Achieved (~10%) performance improvement by introducing a designated shape render pool.
[Lottie] Rectified the Expressions where PolyStar was not implemented.

Full Changelog: v0.14.2...v0.14.3

ThorVG 0.14.2

12 Jul 03:42

Choose a tag to compare

This release includes several improvements and minor bug fixes:

[SwEngine] Optimized RLE operations to reduce a bunch of memory copy during shape generation.
[SwEngine] Rectified blending operations on masked translucent rectangle drawings.
[GlEngine] Improved anti-aliasing quality when FillSpread::Repeat is set. #2521
[GlEngine] Corrected gradient fill display instead of solid fill. Duplicate in #2435
[Renderer] Replaced round() math calls with nearbyint(), which is twice as fast.
[Renderer] Introduced a custom atan2() method, 1.4 times faster than the standard atan2().
[Renderer] Reduced thread locking burden when no nested threads are used.
[Renderer] Fixed internal render updates to ensure proper functionality.
[Renderer] Corrected the transform() API to return InsufficientCondition instead of FailedAllocation.
[Lottie] Properly supported counterclockwise direction for rectangle drawing.
[Lottie] Optimized scene composition by caching solid layer drawing paint nodes.
[Lottie] Introduced the Text RangeSelector feature, covering text units and customizing text styles. #2178
[Lottie] Corrected 3D rotation matrix computation for accurate results.
[Lottie] Fixed incorrect auto-orient direction calculations.
[Lottie] Fixed broken image size due to missing image size settings.
[Lottie] Improved thread safety.
[SVG] Fixed a bug where graphic elements declared in are displayed. #2518

Full Changelog: v0.14.1...v0.14.2