When resetting back to animated property, system causes an UAF because frames have been freed.
Mark frames in nullptr at the case, so it doesn't use frame data after freed.
Issue: #2255
The display property, like any other node's style property,
should be part of a node style. This ensures its correct
copying and inheritance.
For the 'symbol' node, which is not rendered unless it is
used within a 'use' node, the display property can also be
applied. Because of that it cannot be utilized during scene
construction to determine whether the symbol is being defined
or used within a 'use' context.
this commit introduces an additional build options:
- lottie expressions: this advanced feature in Lottie can
significantly increase binary size. Users now have the option
to enable or disable it based on their requirements.
Note that, this change introduces one config definitions:
- THORVG_LOTTIE_EXPRESSIONS_SUPPORT
For angles close to multiples of pi/2, precision
based on FLT_EPSILON was insufficient. It either
led to the creation of an additional cubic segment
filled with erroneous values or NaNs, or it resulted
in the drawing of an angle for a sweep close to 0.
- disable unused builtin realm functions.
- disable global this
- disable regexp (potential)
- disable unicode case conversion (potential)
Some features are marked with (potential)
since we are not certain these are used practically.
until now, total binary size diff by expressions: +287kb
When the system fails to interpret the expression code,
it forcibly disables the feature per property.
This improvement enhances stability and performance
by avoiding reckless attempts to interpret JavaScript code.
When we confirm the full stability with expressions,
we can revert this code.
* restrict the scissor box of composite task
* do not tessellate stroke or fill geometry if there is no Fill or
Stroke color
* use actually transformed curve to calculate polyline count when doing
curve flatten
the WIN32_LEAN_AND_MEAN definition will remove the unused
features in windows.h that helps to improve the build-speed
as well as fixing the issue.
Issue: https://github.com/thorvg/thorvg/issues/2225
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
The current development of the expression engine is experimental.
It does not support multi-threading.
Therefore, when tvg::Initializer::init() is configured
with more than one thread, expressions will be automatically disabled.
issue: https://github.com/thorvg/thorvg/issues/1640
These internal methods have been introduced to search for content within
an object (parent) using a given parameter (name or index).
- LottieLayer* LottieGroup::asset(const char* name)
- LottieLayer* LottieComposition::asset(const char* name)
- LottieLayer* LottieComposition::layer(uint16_t id)
- LottieLayer* LottieComposition::layer(const char* name)
This converts the frame number to the corresponding time.
- float LottieComposition::timeAtFrame(float frameNo)
introduced the JerryScript engine to interpret Lottie
expressions, enhancing the capability to support runtime
programmable animation logic within Lottie expressions
spec. This feature, based on js scripting, represents
the most complicated addition to the Lottie spec so far.
ThorVG probably could includes an option to toggle
this feature at build time, allowing for customizable user
configurations according to specific requirements.
removed unused features for the optimal size:
- DEBUGGER
- MEM_STATS
- SNAPSHOT
- BUILTIN_JSON
- BUILTIN_PROXY
- BUILTIN_REFLECT
- BUILTIN_ATOMICS
- PROMISE_CALLBACK
- MODULE_SYSTEM
- SYSTEM_PORT
This is an experimental version.
Please manually enable the 'lottie-expressions' in meson.build
when you wish to use it.
See: https://jerryscript.net/
Fix some error:
* glViewport not controlled by framebuffer, and need to set manually when
target framebuffer is changed.
* change even-odd stencil operation, so no need to do third draw call to
clear stencil buffer
* fix the missing `GlCanvas::update` calls in Lottoe and LottieExtension
[issues 1479: Masking, InvMasking, LumaMasking, InvLumaMasking](#1479)
Computes composition and blending using simgle pass istead of two full screen passes
Using a mask (any type) with alpha set to less
than 255 through the fill(r, g, b, a) API resulted
in incorrect compositions of fill and stroke.
Incorrect results were also observed for luma masks,
as their alpha is calculated based on the other color
channels.
@issue: https://github.com/thorvg/thorvg/issues/1653