When the datas are copied with deep copy, memory issue caused (SEGV on unknown address) due to these reasons:
1. `mimeType` is nullptr when it's not embedded(base64) data
2. datas(b64Data, mimeType) should not be clear, it's used for next slot copy in same pair.
If the svg contained an unsupported element with <stop> elements,
they were incorrectly assigned to the last loaded gradient. Now fixed.
@Issue: https://github.com/thorvg/thorvg/issues/3321
In member function ‘constexpr LottieGenericProperty<LottieScalarFrame<float>, float>& LottieGenericProperty<LottieScalarFrame<float>, float>::ope> inlined from ‘LottieFloat& LottieStroke::dashValue()’ at ../src/loaders/lottie/tvgLottieModel.h:60:104,
inlined from ‘void LottieParser::parseStrokeDash(LottieStroke*)’ at ../src/loaders/lottie/tvgLottieParser.cpp:623:82:
../src/loaders/lottie/tvgLottieProperty.h:297:8: warning: ‘<anonymous>.LottieGenericProperty<LottieScalarFrame<float>, float>::value’ may be used> 297 | struct LottieGenericProperty : LottieProperty
| ^~~~~~~~~~~~~~~~~~~~~
../src/loaders/lottie/tvgLottieModel.h: In member function ‘void LottieParser::parseStrokeDash(LottieStroke*)’:
../src/loaders/lottie/tvgLottieModel.h:60:104: note: ‘<anonymous>’ declared here
60 | for (uint8_t i = 0; i < dashattr->size; ++i) newValues[i] = LottieFloat(dashattr->values[i]);
|
../src/renderer/wg_engine/tvgWgRenderer.cpp:623:78: runtime error: downcast of address 0x5040005b7010 which does not point to an object of type 'RenderEffectFill'
0x5040005b7010: note: object is of type 'tvg::RenderEffectTint'
00 00 00 00 80 07 5d 35 c9 7f 00 00 20 60 23 00 30 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'tvg::RenderEffectTint'
../src/renderer/wg_engine/tvgWgRenderer.cpp:624:85: runtime error: downcast of address 0x5040005b7050 which does not point to an object of type 'RenderEffectFill'
0x5040005b7050: note: object is of type 'tvg::RenderEffectTritone'
00 00 00 00 a0 07 5d 35 c9 7f 00 00 40 5e 23 00 30 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^~~~~~~~~~~~~~~~~~~~~~~
- Issue was present when masking and clipping were applied
simultaneously. In the case where the mask was in fastTrack
mode and the clip was also clipped, the fastTrack was not
reset, resulting in an incorrect rendering effect.
- For rectangular clippers with a stroke width > 0, stroke clipping
should be applied. However, the fastTrack mode was set instead,
resulting in regular clipping instead of stroke clipping.
previously, the bounding box calculation was simply
determined by comparing all the points, which led to
incorrect sizing due to Bezier control points.
Now, it accurately computes the curve boundary,
properly addressing this issue.
implemented an aggressive culling strategy to eliminate
unnecessary renderings if the rendering visuals were hidden
by other overlaid opaque fills or strokes
this pretty improves the performance for those scenarios
when rendering sequences are fragmented by fills/strokes.
Performance has been improved ~7% with those cases
Generating the outline may return false, e.g., if the shape
is completely trimmed. If such a shape was used as a clip,
an attempt to generate 'rle' will still be made. In such a case,
a crash will occur because the outline is nullptr.
Enable default font compression to reduce WASM size.
The LZSS algorithm is a simple compression method with advantages in decompression performance.
Font data is optimized without external compression dependencies, reducing the embedded font size to 9KB (-40%).
While dashing, changing the path command each time caused
a new 'move to' command to be added, even when dash segments
across different path commands should have been connected.
@Issue: https://github.com/thorvg/thorvg/issues/3231