move instance, adapter and device creation from renderer to application
its necessary for web integration, because browser have its own mechanics to create hardware handles
this changes makes webgpu canvas more universal to use in case of system and web applications
issue: https://github.com/thorvg/thorvg/issues/2410
Since the text node wasn't pushed onto the loader's stack,
closing the text node incorrectly caused an element to be
popped from the stack (if one was present).
This could result in elements that were supposed to have
that element as a parent being rendered incorrectly or not
being rendered at all.
Now, the text node is correctly pushed onto the stack.
@Issue: https://github.com/thorvg/thorvg/issues/2706
A numerically motivated limit on the matrix determinant
set at 1e-6 was not sufficient. The limit has been increased
by checkoing whether 1/det is still a number.
If for any reason an invalid glyph is found in text,
it will now be skipped when rendering
(instead of increasing offset by last valid glyph advance).
Issue: #2687
According to the definition of trim path elements,
the begin and end values are specified as percentages
in the range of 0-100% (this is also confirmed by AE,
where it's not possible to exceed this range).
Added clamping to align with spec.
The limit on leftovers was too small, which became
noticeable for animations with trimming - currently
implemented with the dashing alg.
The limit has been increased.
The anti-aliased outline color was incorrectly blended
at the multiply option.
The fix can be observed in the example:
'examples/lottie/resourcesguitar.json'
in order to do this, RenderMehthod::blend() method introduced
`bool direct` for figuring out the intermediate composition.
An uint8_t version of the lerp function
is introduced to handle cases where
the interpolation factor t exceeds 1, which
previously caused overflow issues due to casting.
The range of saturation and brightness values is 0 ~ 100% and range of hue is 0 ~ 360.
If a value greater than 100% is loaded, it will be modified to be 100%.
issue: https://github.com/thorvg/thorvg/issues/2678
To avoid editing the trim path values provided
by the user, the logic for their interpretation
was moved from the API to the renderer (7c87d8e).
This caused an issue in the lottie animations when
the trim path is applied more than once. Now fixed.
@issue: https://github.com/thorvg/thorvg/issues/2670
previously font size & italic style had been ignored
even if its attributes are changed.
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
issue: https://github.com/thorvg/thorvg/issues/2676
- used hardware blending stage for scene blending
- used AABB for scene blending
- reduced number of offfscreen buffers coping
- reduced number of render pass switching
- used render pipelines abilities to convert offscreen pixel format to screen pixel format
- removed unused shaders
- Prevent expression processing if a property fails to parse.
- Fixed an incorrect usage of JerryScript.
This is a hotfix to address expression-related crashes.
Due to the lack of an analytical solution for Bezier
curves offsetting, a simple and computationally cheap
approximation has been implemented. The algorithm shifts
the segments connecting control points and determines
new points based on their intersections.
@issue: https://github.com/thorvg/thorvg/issues/2230
The occurrence of a 'carriage return' (13) or 'end of text' (3)
caused the skipping of the next character check, immediately
searching for it in the list of available characters.
If the next character was also 13 or 3, it led to incorrect
interpretation; however, if it was the last character in the
sequence, a crash occurred.
Introduced the abstract EngineMethod to handle
different engines more effectively using polymorphism.
Co-authored-by: Jinny You <jinny@lottiefiles.com>
Updated WASM binding to bring WebGPU on the web player.
binding will generate a WASM binary, which can render animation through both SW and WG raster engine.
A raster engine will be chosen by parameter `engine`, when initializing.
Spec out this incomplete experimental feature,
this is a still promising one, we will reintroduce
this officially after 1.0 release
size: -2kb
issue: https://github.com/thorvg/thorvg/issues/1372
If a Meson option is typed as `boolean`, the `get_option` returns a
boolean, and comparing it with `true` is redundant. Meson also errors if
you try to compare across types, so it couldn't _not_ be a boolean.
Also, Meson is not C, so no need for parentheses around `if` conditions.
A pkgconfig file is already provided, which enables using `thorvg` once
it is installed. However, this file is not, and cannot be, available at
setup time if using `thorvg` as a subproject.
In such cases, Meson provides the `override_dependency` mechanism for a
subproject to tell its parent how to use it.
In certain cases, the user might want to set mapped memory directly.
This update ensures that a null terminator is appended to the string data.
Co-Authored-By: Mira Grudzinska <mira@lottiefiles.com>
Issue: https://github.com/thorvg/thorvg/issues/2642