Hermet Park
51c3a8912c
sw_engine: fix an invalid memory access.
...
the surface and mesh data can be missed by an invalid condition.
this fixes an invalid memory access problem.
Issue: https://github.com/thorvg/thorvg/issues/1671
2023-09-26 17:41:08 +09:00
Hermet Park
92b6f9dc48
examples: remove Async test
...
We have alternative test cases for it such as Lottie
2023-09-26 14:50:16 +09:00
Hermet Park
e4ade98e8c
sw_engine: fix a regression stroke bug
...
reverted changes that occurred this issue from d683d2e
Issue: https://github.com/thorvg/thorvg/issues/1670
2023-09-26 14:26:57 +09:00
Hermet Park
7ec969be29
lottie/builder: Fix incorrect stroke width scaling propagation.
...
The transform (scale) should be applied to the following drawing elements,
not the previous stroke.
2023-09-26 14:24:52 +09:00
Hermet Park
74b67919e0
tvg: support radial gradient focal properties
...
properly store/restore the radial gradient focal properties
from the tvg loader and saver
2023-09-26 13:05:27 +09:00
Hermet Park
ed23b432bb
tvg: support dash offset property
...
properly store/restore the dash offset property
from the tvg loader and saver
Issue: https://github.com/thorvg/thorvg/issues/1617
2023-09-26 13:05:27 +09:00
Hermet Park
c7123a1547
test: enhanced the unit-test coverage
...
supplements animation/lottie/sw_engine test cases.
updated the page: https://github.com/thorvg/thorvg/wiki/Unit-Tests
Issue: https://github.com/thorvg/thorvg/issues/1669
2023-09-26 10:48:33 +09:00
Hermet Park
fdd90605c7
lottie/builder: fix a memory leak.
...
fixed a memory leak in an exceptional case.
2023-09-26 10:48:33 +09:00
Hermet Park
1819fed033
renderer/paint: fixed a mismatched reference count.
...
This correction ensures a consistent use of 'ref' and 'unref' for paints to release memory properly.
The memory leak occurred when a picture was not pushed to a valid canvas.
This issue was reported by the unit-test memory sanitizer.
2023-09-26 10:48:33 +09:00
Hermet Park
2fb0cc8309
Update README.md
2023-09-26 01:29:47 +09:00
Hermet Park
2f1873f04e
test/capi: update unit tests
...
added a Tvg_Composite_Method::TVG_COMPOSITE_METHOD_NONE case
2023-09-25 21:33:23 +09:00
Hermet Park
ac82234360
capi: api sync up.
...
added beta apis:
- enum Tvg_Composite_Method::TVG_COMPOSITE_METHOD_INVERSE_LUMA_MASK;
promote apis:
- TVG_API Tvg_Result tvg_shape_set_stroke_miterlimit(Tvg_Paint* paint, float miterlimit);
- TVG_API Tvg_Result tvg_shape_get_stroke_miterlimit(const Tvg_Paint* paint, float* miterlimit);
@Issue: https://github.com/thorvg/thorvg/issues/1669
2023-09-25 21:33:23 +09:00
Hermet Park
0f5f43db1e
apis: promote beta apis to the official ones.
...
- enum class CompositeMethod::InvLumaMask;
- template<typename T> std::unique_ptr<T> cast(Paint* paint);
- template<typename T> std::unique_ptr<T> cast(Fill* fill);
@Issue: https://github.com/thorvg/thorvg/issues/1669
2023-09-25 21:33:23 +09:00
Hermet Park
44d0f98274
examples/capi: added an animation example.
2023-09-25 12:27:22 +09:00
Hermet Park
749523b709
capi/animation: support animation features under the beta.
...
New APIs:
- Tvg_Animation* tvg_animation_new();
- Tvg_Result tvg_animation_set_frame(Tvg_Animation* animation, uint32_t no);
- Tvg_Paint* tvg_animation_get_picture(Tvg_Animation* animation);
- Tvg_Result tvg_animation_get_cur_frame(Tvg_Animation* animation, uint32_t* no);
- Tvg_Result tvg_animation_get_total_frame(Tvg_Animation* animation, uint32_t* cnt);
- Tvg_Result tvg_animatoon_get_duration(Tvg_Animation* animation, float* duration);
- Tvg_Result tvg_animation_del(Tvg_Animation* animation);
2023-09-25 12:27:22 +09:00
Hermet Park
dc9e14a20f
lottie/model: revise the color stop population logic.
...
The omitted data must be generated with interpolation.
This change supplements that logic.
2023-09-25 11:04:20 +09:00
Hermet Park
dc67c405f8
infra/gitaction: hotfix system buid fail.
2023-09-22 16:25:26 +09:00
Hermet Park
3b611e0da9
lottie: fixed data conversion complie warnings
2023-09-22 12:35:13 +09:00
Hermet Park
20d2760bf4
infra/gitaction: trouble shooting macos build failure
2023-09-22 10:47:01 +09:00
RuiwenTang
453cba7ddd
gl_engine: make GlRenderTask generic with uniform block
...
* Use uniform block to pack all color informations
* Move the actual gl draw call into GlRenderer::sync function, so all
data is been uploaded into GPU
* Make GlRenderTask simple and generic for direct gl draw
2023-09-21 22:24:07 +09:00
Hermet Park
9e3b74bac5
sw_engine fill: fixed radial fill focal issue.
...
This might be a workaround to correct the issue.
The threshold value comes from the mathematical inaccuracy.
@Issue:https://github.com/thorvg/thorvg/issues/1555
2023-09-21 22:19:42 +09:00
Hermet Park
c40df32561
examples: changed the default test intervnal time. (1 -> 2)
2023-09-21 22:18:58 +09:00
Hermet Park
ec5a32bb73
lottie: enhanced the colorstop feature.
...
Lottie ColorStop RGB / Alpha can be dealt with individually.
Since thorvg handles this one unified set,
lottie model need to merge the data into one structure.
2023-09-21 22:11:31 +09:00
Hermet Park
e2b7bfc198
lottie model: corrected stroke default value according to the lottie-spec.
2023-09-21 22:11:31 +09:00
Hermet Park
cba2b0f724
lottie/builder: correct a parenting error.
...
There is a missing case where a layer didn't parent properly,
especially when the parent is the matte target.
2023-09-21 22:11:31 +09:00
Hermet Park
5b8c66f5c8
lottie/builder: fix an invalid matting result.
...
Previously, it ignored the matte when it was out of frames for the sake of optimization.
However, this led to an incorrect matting result.
It should make the scene invisible when the matting is invisible.
2023-09-21 22:11:31 +09:00
Hermet Park
edb156f4fc
sw_engine/shape: fix a dash-line infite-loop bug.
...
a regresion bug was introduced by d683d2e70d
2023-09-21 21:55:53 +09:00
Hermet Park
bd9d0cea6d
sw_engine: properly implemented the missing image composition.
...
The 8-bit masking target is the destination with a 32-bit source image and 8-bit composition.
2023-09-20 18:42:06 +09:00
Hermet Park
b3b9fa37f5
Update CONTRIBUTING.md
2023-09-20 11:52:18 +09:00
Hermet Park
99609c7968
lottie: fixed an incorrect view clipping problem.
...
this missing initialization occured an incorrect view clipping.
2023-09-19 21:55:25 +09:00
Martin Capitanio
5ed7034c45
sw_engine: fix VS 2017 issues with Godot's NOMINMAX
...
Fixes #1661
2023-09-19 21:51:54 +09:00
Hermet Park
2cada9c446
loader/lottie: code refactoring.
...
migrate transform from the group to the layer.
transformation is not necessary in group but layer.
This helps to reduce the unnecessary assigning of the transformation
in group instances.
2023-09-19 14:03:13 +09:00
Hermet Park
549f4b1308
loader/lottie: properly handle graident opacity attributes.
...
That property has been missed in the implementation.
2023-09-19 10:33:22 +09:00
Hermet Park
8aa12ca468
taskschduler: fix a regression deadlock issue
...
This fix introduces a workaround to enforce synchronous tasking on worker threads.
Sometimes, out of threads get stuck in a deadlock condition.
@Issue: https://github.com/thorvg/thorvg/issues/1636
2023-09-18 21:06:01 +09:00
Hermet Park
81599a14a0
loader/lottie: code refactoring
...
moved clipping logic to the coherent precomp method.
2023-09-18 10:41:00 +09:00
Hermet Park
42d7a5faed
loader/lottie: correct the frame range.
...
Fixed some incorrect time-remapping logic,
Also, the last frame should not be taken into account for the drawing.
2023-09-18 10:41:00 +09:00
Hermet Park
87dee3c1f7
loader/lottie: fix a memory leak
...
A dangling scene instance should be deleted properly.
2023-09-18 10:41:00 +09:00
Hermet Park
d683d2e70d
sw_engine: Do not handle exceptions for zero line length.
...
While it may represent a dot with a stroke width,
ignoring its length is not a good idea.
this also eliminates 0 size dash dots caused by unexpected empty lengths.
2023-09-15 11:16:38 +09:00
Hermet Park
00ab8c254d
loader/lottie: fix a missing opacity propagation.
...
the propagated opacity size should be accumulated.
2023-09-14 21:14:33 +09:00
RuiwenTang
5298f338de
gl_engine: fix compilation erros due to redundant header inclusion
2023-09-14 19:49:35 +09:00
Hermet Park
e4330f7089
loader/lottie: implemented missing hold interpolation.
...
path/colorstop has been missed to implement that feature.
2023-09-14 01:04:37 +09:00
Hermet Park
ed1b4a4923
sw_engine: allow 8bit grayscale gradient filling
2023-09-14 01:03:22 +09:00
Hermet Park
e9490e375c
sw_engine: corrected a wrong blending equation at 8 bits grayscale rle.
2023-09-14 01:03:22 +09:00
Hermet Park
3a0f3536ad
Update AUTHORS
2023-09-13 16:15:52 +09:00
Hermet Park
1bcbac71ab
loader/lottie: fix a invalid matte source access.
...
parser ignored a matte source has no target.
this fixes the corner case.
2023-09-13 13:16:13 +09:00
Hermet Park
78b14aecb4
Update README.md
2023-09-13 12:37:04 +09:00
Hermet Park
5b8999e417
infra: updated gitaction CI build test with MacOS
...
@Issue: https://github.com/thorvg/thorvg/issues/1433
2023-09-13 12:33:16 +09:00
Hermet Park
6b3bd8b27a
loader/lottie: fix a precomposition+matting.
...
the matting target with a precomp lost the referencing in
the building the structure. this fixes it.
2023-09-13 10:11:24 +09:00
Hermet Park
cea63125a4
sw_engine: fix a wrong compuation.
...
corrected a mistake caused by a dead brain.
2023-09-12 21:40:01 +09:00
Hermet Park
2998eb18fc
loader/lottie: fix an invalid memory access crash.
2023-09-12 20:56:38 +09:00