Commit graph

3361 commits

Author SHA1 Message Date
Mira Grudzinska
a851d1706e lottie: fix transformations in text range selector
Since the translate API was used while text updating,
the subsequent range selector transformations gets overwritten
when updating the shape (scale and rotate, adding another
translation will persist). This caused unexpected results.
Fixed by using the transform API when additional transformations
are needed - also fixes applying more than one range selector.
2024-11-01 17:37:44 +09:00
Hermet Park
33cfc16569 renderer: --shadow variable compiler warning 2024-11-01 17:31:16 +09:00
Mira Grudzinska
35bc063edd svg: prevent runtime error
runtime error: applying non-zero offset 1 to null pointer
Observed for Bespoke-leather-belt-2016012857.svg
2024-11-01 17:31:08 +09:00
Hermet Park
cebc29c5ff renderer: hotfix a broken svg file sharing
Do not allow data sharing among same svg instances.
This should be addressed properly.
2024-11-01 17:30:51 +09:00
Hermet Park
4d8c0e9a64 sw_engine: corrected the blur feathering region.
issue: https://github.com/thorvg/thorvg/issues/2892
2024-11-01 17:30:42 +09:00
Hermet Park
3fdfe11cd7 bump up version v0.15.2 2024-10-22 00:44:08 +09:00
Hermet Park
3490f9b9ce png, gl_engine: fixed an wrong png colorspace.
issue: https://github.com/thorvg/thorvg/pull/2880
2024-10-22 00:41:42 +09:00
Hermet Park
ec62ca869f sw_engine: fixed linear gradient filling masking.
properly filtering alpha channel of the 8bits linear gradient
masking drawing.

issue: https://github.com/thorvg/thorvg/issues/2204
2024-10-22 00:41:31 +09:00
RuiwenTang
6427b81358 gl_engine: ignore masking alpha when calculate inv luma masking 2024-10-22 00:41:24 +09:00
Mira Grudzinska
269e6c4d10 lottie: offset does not depend on shape direction
According to tests in AE, the offset direction should
not depend on the direction of the shape. A positive
offset value expands the shape, while a negative value
contracts it. Fixed.
2024-10-22 00:41:15 +09:00
Mira Grudzinska
fa49f14412 sw_engine: fix _rasterDirectImage
Since the source buffer is 32 bits, not 8 bits,
both alpha and inverse alpha need to be calculated.
2024-10-22 00:41:07 +09:00
Mira Grudzinska
9ce784751c lottie: correct the array reserved size
The color input will contain at least colorStops.count * 4
elements (not including alpha). Since the alpha offset values
don't have to much colorStops, estimation is used.
2024-10-22 00:41:01 +09:00
RuiwenTang
e6aa41f7c4 gl_engine: implement path trim in tvgGlTessellator
Implement the path trim claculation, and handle the strokeTrim before
doing Path stroke.

issue: https://github.com/thorvg/thorvg/issues/2435
2024-10-22 00:40:41 +09:00
Mira Grudzinska
4c0765b761 lottie: fix offset
For long Bezier curves compared to the offset value,
the offsetting algorithm caused deformation. The problem
became evident after adding mask extension, as the simple
shapes defined there are based on Bezier curves rather
than as shapes like a circle/rect/etc, which is the case
for the offset. Now fixed.
2024-10-22 00:40:24 +09:00
Hermet Park
719fbc9d64 sw_engine: rectify the blending method of grayscale fill
issue: https://github.com/thorvg/thorvg/issues/2842
issue: https://github.com/thorvg/thorvg/issues/2841
2024-10-22 00:40:15 +09:00
Hermet Park
b5943d627f lottie: multiply opacity to the fill alpha value,
opacity of a shape may bring a composition
when it has both stroke and fill
2024-10-22 00:40:06 +09:00
Hermet Park
d0f18e741d lottie: release memory immediately after loading is complete.
there is no need to retain the data,
as the Lottie source is not reusable
and is affected by the parsing mechanism.

issue: https://github.com/thorvg/thorvg/issues/2647
2024-10-22 00:39:53 +09:00
Mira Grudzinska
661bdeb9b7 lottie: add support for mask expansion
Implemented the mask attribute 'x' - expand mask.
Enforced rounded lines join according to tests in AE.

@Issue: https://github.com/thorvg/thorvg/issues/2832
2024-10-22 00:39:21 +09:00
Mira Grudzinska
cb2a15528d sw_engine: split long lines to avoid overflow
@Issue: https://github.com/thorvg/thorvg/issues/2651
2024-10-22 00:39:14 +09:00
Hermet Park
43cdd4c7ec lottie: Fine-tune for post-processing effect.
reduce quality for the post-processing effect to
improve general performance, while fine-tuning the quality
for lower resolutions.
2024-10-22 00:39:06 +09:00
Hermet Park
75ae8bcc7b sw_engine: properly update the render region
shape render region should be aligned with the
current shape bbox. this could bring the compact size
of the rendering region even shapes are not drawable.
2024-10-22 00:38:58 +09:00
Hermet Park
a16cbd58a0 bump up version v0.15.1 2024-10-12 12:46:29 +09:00
Hermet Park
066160a82a lottie: hotfix a crash
Fixed a mistake during the code merge.

issue: https://github.com/thorvg/thorvg/issues/2733
2024-10-12 12:41:15 +09:00
Hermet Park
c9960fcc93 bump up version v0.15 2024-10-04 10:00:38 +09:00
Sergii Liebodkin
7e1f756da0 wg_engine: fix picture memory leak
picture mesh data was not released
2024-10-04 10:00:38 +09:00
Hermet Park
3563546a65 infra: --shutdown the unkown-pragmas warning
Apply the flag even if the sanitizer is toggled on.
2024-10-04 02:33:11 +09:00
Hermet Park
5813e7e09f test/capi: fixed a memory leak 2024-10-04 01:53:10 +09:00
Hermet Park
f374802d04 doc: updated to v0.15 2024-10-04 00:41:06 +09:00
Hermet Park
0df35447b3 wg_engine: fixed resource leaks
issue: https://github.com/thorvg/thorvg/issues/2808
2024-10-04 00:34:16 +09:00
Mira Grudzinska
52def8dc27 sw_engine: ++exception handling
Prevent the infinite loop in the worst case

@Issue: https://github.com/thorvg/thorvg/issues/2651
2024-10-04 00:34:16 +09:00
Mira Grudzinska
03bbfd3183 sw_engine: ignore small cubics
During the stroke's outline calculation, the function
handling small cubics set all angles to zero. When
the cubic was small but not zero, this resulted in
incorrect outlines. Now such curves are ignored.

Co-Authored-By: Hermet Park <hermet@lottiefiles.com>

Issue: https://github.com/thorvg/thorvg/issues/2776
Issue: https://github.com/thorvg/thorvg/issues/2712
2024-10-03 21:42:14 +09:00
Hermet Park
8ebaf06ffd test: shutdown the false alram of the valgrind
- Conditional jump or move depends on uninitialised value(s)
2024-10-03 19:02:40 +09:00
Hermet Park
19656db676 renderer/compressor: corrected base64 decoded data size
issue: https://github.com/thorvg/thorvg/issues/2794
2024-10-03 19:02:33 +09:00
Hermet Park
aece166cb7 sw_engine: ++stability
cut the Bezier curve based on the number of points
and transform it into a straight line when it's very small.

issue: https://github.com/thorvg/thorvg/issues/2759
2024-10-03 19:02:26 +09:00
Hermet Park
bceedf081f sw_engine: fixed an uninitialized data access 2024-10-03 19:02:14 +09:00
Mira Grudzinska
42c4190112 examples: fix mingw build error
M_PI was not declared error solved
2024-10-03 16:39:42 +09:00
Hermet Park
38f6ff4380 lottie: hotfix layer effect parsing
fixed a break in expressions/driving.json
2024-10-03 16:33:26 +09:00
Hermet Park
2b3a2e5ddf lottie: fixed a corrupted colorstop population
the color stop number should be retained during
the population of frames

issue: https://github.com/thorvg/thorvg/issues/2765
2024-10-03 16:33:16 +09:00
Mira Grudzinska
1c48cd3cdc lottie: fix gradient populating
When populating the gradient, the color/alpha should
be assigned the first possible value from the provided
ones, rather than the default value of 255.
2024-10-03 12:39:46 +09:00
Hermet Park
f446e5d079 wasm: fix a build break 2024-10-01 17:12:28 +09:00
Hermet Park
6f7ec5165a lottie: portability++
issue: https://github.com/thorvg/thorvg/issues/2764
2024-10-01 14:08:40 +09:00
Hermet Park
ee19380d50 tvg: updated binary with v0.15 tagging 2024-10-01 12:58:13 +09:00
Hermet Park
124dd4b629 lottie: ++safety 2024-10-01 12:58:13 +09:00
Hermet Park
c39910cfd6 test: fix a memory leak 2024-10-01 12:58:13 +09:00
RuiwenTang
c8a04a5337 gl_engine: implement darken and lighten mask method
Add new shader to support darken and lighten mask method.
2024-09-30 23:24:28 +09:00
Mira Grudzinska
80a977f07e lottie: fix mem leak
Mem leak was observed in a case the end values
(deprecated feature) were provided for the gradient.

@Issue: https://github.com/thorvg/thorvg/issues/2667
2024-09-30 23:24:24 +09:00
Hermet Park
fa9223fe1e hotfix: backward compatibility++ 2024-09-30 18:02:48 +09:00
Sergii Liebodkin
b66ff36502 CompositeMethod::ClipPath will be replaced with the Scene::clip()
wg_engine needs to refactor to remove the enum value usage before proceeding with its removal
2024-09-30 18:02:43 +09:00
Hermet Park
ff2cacd25d examples: fixed an incorrect buffer size.
adjusted the size according to the offsets.
2024-09-30 17:00:40 +09:00
Hermet Park
1a795e2ed4 lottie: optimization++
Use a clipper instead of masking when the condition is satisfied.
Generally, clipping is cheaper than masking in fps & memory usage.

issue: https://github.com/thorvg/thorvg/issues/2647
2024-09-30 16:44:22 +09:00