Hermet Park
f606d58dfb
lottie: chores++
Android / build_x86_64 (push) Waiting to run
Android / build_aarch64 (push) Waiting to run
iOS / build_x86_64 (push) Waiting to run
iOS / build_arm64 (push) Waiting to run
macOS / build (push) Waiting to run
macOS / compact_test (push) Waiting to run
macOS / unit_test (push) Waiting to run
Ubuntu / build (push) Waiting to run
Ubuntu / compact_test (push) Waiting to run
Ubuntu / unit_test (push) Waiting to run
Windows / build (push) Waiting to run
Windows / compact_test (push) Waiting to run
Windows / unit_test (push) Waiting to run
2025-06-15 14:52:58 +09:00
Hermet Park
3eaf110e0a
sw_engine: revised the texture clipping
...
Android / build_x86_64 (push) Waiting to run
Android / build_aarch64 (push) Waiting to run
iOS / build_x86_64 (push) Waiting to run
iOS / build_arm64 (push) Waiting to run
macOS / build (push) Waiting to run
macOS / compact_test (push) Waiting to run
macOS / unit_test (push) Waiting to run
Ubuntu / build (push) Waiting to run
Ubuntu / compact_test (push) Waiting to run
Ubuntu / unit_test (push) Waiting to run
Windows / build (push) Waiting to run
Windows / compact_test (push) Waiting to run
Windows / unit_test (push) Waiting to run
previous logic doesn't work if the clipping shape
has any inner corners. replace the logic
with a intermediate composition approach for
stability.
- performance can be drop at texture clipping by ~11%
- size is reduced by -0.5kb
issue: https://github.com/thorvg/thorvg/issues/3520
2025-06-11 22:35:54 +09:00
Hermet Park
b3d73e1568
lottie: do not try matting if the layer has no contents
Android / build_x86_64 (push) Waiting to run
Android / build_aarch64 (push) Waiting to run
iOS / build_x86_64 (push) Waiting to run
iOS / build_arm64 (push) Waiting to run
macOS / build (push) Waiting to run
macOS / compact_test (push) Waiting to run
macOS / unit_test (push) Waiting to run
Ubuntu / build (push) Waiting to run
Ubuntu / compact_test (push) Waiting to run
Ubuntu / unit_test (push) Waiting to run
Windows / build (push) Waiting to run
Windows / compact_test (push) Waiting to run
Windows / unit_test (push) Waiting to run
2025-06-09 22:33:25 +09:00
Hermet Park
a2665cbab7
lottie: fixed a repeater opacity logic
...
preserve the target opacity by multiplying,
do not overwrite it.
2025-06-09 18:52:05 +09:00
Mira Grudzinska
211fee73e2
lottie: fix precomposition with masking
...
Android / build_x86_64 (push) Has been cancelled
Android / build_aarch64 (push) Has been cancelled
iOS / build_x86_64 (push) Has been cancelled
iOS / build_arm64 (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS / compact_test (push) Has been cancelled
macOS / unit_test (push) Has been cancelled
Ubuntu / build (push) Has been cancelled
Ubuntu / compact_test (push) Has been cancelled
Ubuntu / unit_test (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows / compact_test (push) Has been cancelled
Windows / unit_test (push) Has been cancelled
A precomposition layer is clipped to its viewport.
If the same layer also had a mask that was optimized
using clipping, this clip was unintentionally overridden
by the viewport clipping. This conflict is now fixed.
2025-05-26 19:26:45 +09:00
Hermet Park
bace6b9e52
lottie: removed undesired embedded option.
...
Use local font by default and fall back if no glyphs exist.
Co-Authored-By: Mira Grudzinska <mira@lottiefiles.com>
2025-05-15 19:21:24 +09:00
Mira Grudzinska
6e41b44ea1
lottie: fix points calculation for rounded polygon
...
Added missing factor.
issue: https://github.com/thorvg/thorvg/issues/2629
2025-05-14 21:53:32 +09:00
Mira Grudzinska
24fba7cfae
lottie: add missing delimiter
...
\u0003 (\3) can be used as delimiter. Now handled correctly.
2025-05-07 10:53:32 +09:00
Hermet Park
1a332acd37
renderer: revise the pImpl design with a better efficiency
...
The following is a redesign that extends the class internally.
The main goal is to preserve the characteristics of the pImpl idiom
for data encapsulation, while simultaneously reducing the memory
allocation overhead typically associated with pImpl.
The stragegy is here:
Rather than alloc the impl memory inside of the thorvg engine,
impl extends the API classes in order to consolidate the memory.
size has been decreased by -4kb with optimization=s
issue: https://github.com/thorvg/thorvg/issues/3214
2025-04-20 00:07:50 +09:00
Hermet Park
e308d3416a
lottie: code refactoring
...
align the internal naming for lottie "ix" properites and its variables
2025-04-10 15:10:33 +09:00
Mira Grudzinska
b304448ef7
lottie: revert "lottie: more precise culling for inverse mattes"
...
This reverts commit 7ef3352efa
.
For mattes of type 'InvAlpha' or 'InvLuma', the matted layer
can still be visible regardless of the matte's opacity (unlike
'Alpha' and 'Luma' masks, which cut out the entire layer when
opacity = 0). The previously introduced optimization incorrectly
assumed that with opacity = 255, the image would not be visible.
@Issue: https://github.com/thorvg/thorvg/issues/3375
@Issue: https://github.com/thorvg/thorvg/issues/3380
@Issue: https://github.com/thorvg/thorvg/issues/3381
@Issue: https://github.com/thorvg/thorvg/issues/3382
2025-04-09 11:21:36 +09:00
Jinny You
fbe10255d7
lottie/text: added range selector flags
...
Duplicated text document properties (fill color, stroke color, and stroke width) to the text range.
If these properties are not defined in the range selector, ThorVG incorrectly overrides them with default values.
The correct behavior is to preserve the original values. The added flags address this issue.
Co-Authored-By: Hermet Park<hermet@lottiefiles.com>
2025-04-07 17:34:52 +09:00
Jinny You
2b3cdb0d97
lottie: simplify text layout calculation
2025-04-05 02:35:11 +09:00
Hermet Park
93cb33fb8e
lottie: improve the compatiblity
...
merge the scene with more accurate condition to allow
the evenodd pathes among the lottie render tree.
2025-03-27 14:06:19 +09:00
Hermet Park
e5d55d0651
lottie: safety++
...
Don't apply matte — it's already been pushed into the scene.
This is a corner-case bug that occurs when the Lottie data
violates the specification.
2025-03-27 12:43:17 +09:00
Hermet Park
fba861cb4f
lottie: fixed a regression bug
...
reverted stroke optimization from the previous cullting stragtegy.
introduced by d386a5654a
2025-03-27 12:43:11 +09:00
Hermet Park
3136cac6e4
Revert "lottie: minor optimization"
...
This reverts commit 51bc7e81f8
.
note: side effect!
2025-03-26 20:56:24 +09:00
Hermet Park
ffdb30cba2
lottie: don't evaluate local font text again
2025-03-26 12:19:32 +09:00
Hermet Park
51bc7e81f8
lottie: minor optimization
...
trim out a group when it has only one child.
2025-03-26 00:28:20 +09:00
Hermet Park
333e65ef7a
renderer: revise the Bounding Box Behavior
...
- modify the concept of AABB to apply only to transformed shapes.
- transform points before computing the bounding box min/max
to obtain a more compact shape region.
- trimmming memory by removing the cached matrix, about 36kb
of memory has been reduced per paint instance.
2025-03-20 13:26:25 +09:00
Mira Grudzinska
ac080ffabc
lottie: add support for text follow path
...
Added support for cases without text grouping and range selector.
Co-Authored-By: Hemet Park <hermet@lottiefiles.com>
@Issue: https://github.com/thorvg/thorvg/issues/2888
2025-03-12 13:08:26 +09:00
Jinny You
e4834e9190
lottie/text: render carriage return with local font ( #3310 )
...
Added missing carriage return support in local font case.
issue: #3301
2025-03-11 13:39:55 +09:00
Thaddeus Crews
e235eb8152
common: support c++20 builds
2025-03-10 09:45:19 +09:00
Hermet Park
67098793f0
renderer: revise the paint bounding box api
...
C++ API Modificaiton:
- Result Paint::bounds(float* x, float* y, float* w, float* h, bool transform = false) const
-> Result Paint::bounds(float* x, float* y, float* w, float* h) const
C++ API Addition:
- Result Paint::bounds(Point* pt4) const
C API Modification:
- Tvg_Result tvg_paint_get_bounds(const Tvg_Paint* paint, float* x, float* y, float* w, float* h, bool transformed);
-> Tvg_Result tvg_paint_get_aabb(const Tvg_Paint* paint, float* x, float* y, float* w, float* h);
C API Addition:
- Tvg_Result tvg_paint_get_obb(const Tvg_Paint* paint, Tvg_Point* pt4);
issue: https://github.com/thorvg/thorvg/issues/3290
2025-03-05 14:46:55 +09:00
Hermet Park
3c836b1b2a
lottie: revise the text justify logic
...
removed the duplicate logic,
improved for neat and easy maintainance
2025-03-04 15:15:06 +09:00
Jinny You
716311f44f
lottie/text: fix justification in embedded font rendering
...
issue: #3266
2025-03-04 15:01:35 +09:00
Hermet Park
d386a5654a
Lottie: optimize rendering performance
...
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
2025-02-27 19:05:41 +09:00
Hermet Park
9a79dd0267
lottie: code clean up++
2025-02-26 19:00:16 +09:00
Hermet Park
7ef3352efa
lottie: more precise culling for inverse mattes
...
don't do rendering further when the inverse mattes has
a fully translucent. This could improve rendering performance
in that case.
2025-02-26 12:55:47 +09:00
Hermet Park
c5ca7b4b12
lottie: hotfix a regression
...
a regression by the code refactoring:
5b30e2ad65
2025-02-25 18:54:04 +09:00
Hermet Park
66a30b2c50
lottie: fixed a regression bug of a weird artififact observation
...
this reverts a logic that was introduced by
https://github.com/thorvg/thorvg/pull/3167
this logic change was not necessary thus revert it.
2025-02-24 15:47:09 +09:00
Mira Grudzinska
5b30e2ad65
lottie: prevent trimming in masks
...
Until now the fill's trimming was not supported,
which allowed masks to function correctly. Introducing
trimming for the entire shape caused the mask to be trimmed
as well, leading to incorrect results.
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
2025-02-24 15:06:16 +09:00
Mira Grudzinska
b939a60bfa
api: change api name strokeTrim() -> trimpath()
...
No changes in behaviour so far.
2025-02-24 15:05:38 +09:00
Jinny You
646e35484f
loaders: added lottie, svg font fallback mechanism
...
fallback for allowing any available fonts.
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
2025-02-20 18:47:01 +09:00
Hermet Park
b77f3ca024
common: introduced designated memory allocators
...
Support the bindings to be more integrable with a system's coherent memory management.
Pleaes note that thorvg now only allow the desinated memory allocators here:
malloc -> tvg::malloc
calloc -> tvg::calloc
realloc -> tvg::realloc
free -> tvg::free
issue: https://github.com/thorvg/thorvg/issues/2652
2025-02-18 17:20:31 +09:00
Mira Grudzinska
ad261731b6
lottie: parsing embedded fonts data ( #3220 )
...
Only parsing and font loading is added with
a very basic text update while building the scene.
@Issue: https://github.com/thorvg/thorvg/issues/3184
2025-02-14 15:52:10 +01:00
Hermet Park
305da05b1b
lottie: resolved minor memory leaks
2025-02-14 00:31:14 +09:00
Mira Grudzinska
391777091c
lottie: ++ dashed stroke support
...
Until now lottie loader supported only a single
dash-gap pair, and only the case where only the dash
was provided was handled correctly. When both values
were provided, the gap was incorrectly increased by
the dash value. If more values were supplied, only
the last pair was considered.
@Issue: https://github.com/thorvg/thorvg/issues/3191
2025-02-13 23:37:32 +09:00
Fabian Blatz
71bb4163ed
common: fixed double-precision promotion compilation warnings
...
Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
2025-02-12 20:23:34 +09:00
Hermet Park
cc4c18d6c6
renderer: revise the Shape rect/circle features
...
The path direction of shapes is now functional for path trimming.
Replace the main logic with Lottie's by default
to align the spec, migrate the original logic to svg loader side.
This revision helps to reduce the binary size by 2–3 KB for lottie loader.
API Modifications:
- Result Shape::appendRect(float x, float y, float w, float h, float rx = 0, float ry = 0)
-> Result Shape::appendRect(float x, float y, float w, float h, float rx = 0, float ry = 0, bool cw = true)
- Result Shape::appendCircle(float cx, float cy, float rx, float ry)
-> Result Shape::appendCircle(float cx, float cy, float rx, float ry, bool cw = true)
- TVG_API Tvg_Result tvg_shape_append_circle(Tvg_Paint* paint, float cx, float cy, float rx, float ry)
-> TVG_API Tvg_Result tvg_shape_append_circle(Tvg_Paint* paint, float cx, float cy, float rx, float ry, bool cw)
- Tvg_Result tvg_shape_append_rect(Tvg_Paint* paint, float x, float y, float w, float h, float rx, float ry)
-> Tvg_Result tvg_shape_append_rect(Tvg_Paint* paint, float x, float y, float w, float h, float rx, float ry, bool cw)
issue: https://github.com/thorvg/thorvg/issues/3179
2025-02-12 01:41:02 +09:00
Hermet Park
78cfc33f4c
lottie: support frame tweening feature
...
frame tweening allows user to interpolate two frames
over a speicified duration. This Tweening functionality
can be particularly powerful when combined with state-based
(a.k.a. Marker) animation playback in Lottie.
For example, apps support state machine based animations,
where the transition sequences between states are not linear
and can occur in highly irregular directions.
Experimental APIs:
- Result LottieAnimation::tween(float from, float to, float progress)
- Tvg_Result tvg_lottie_animation_tween(Tvg_Animation* animation, float from, float to, float progress)
2025-02-06 19:09:27 +09:00
Hermet Park
1d90608edc
lottie: chores++
2025-02-06 12:21:16 +09:00
Hermet Park
2a4dfcd10e
lottie: revised the shape modifiers
...
- use a decoration style for path-modification chaining.
- use a reusable buffer for intermediate path generation.
2025-02-06 12:21:16 +09:00
Hermet Park
f4a2c922be
lottie: minor optimization
...
use a reusable buffer for intermediate path generation.
2025-02-06 12:21:16 +09:00
Hermet Park
4edaf311c6
lottie: ++compact & neat code
...
introduced RenderPath to minimize the path parameters.
2025-02-05 19:55:12 +09:00
Hermet Park
35dac266dd
lottie: neat code++
2025-02-05 15:15:01 +09:00
Hermet Park
8add23dd3a
lottie: allow expressions for the text properties
2025-02-05 14:26:44 +09:00
Hermet Park
3e337083e8
lottie: compact code & size++
2025-02-04 23:07:56 +09:00
Hermet Park
8833cc8521
commmon: ++neat code
...
introduced ARRAY_REVERSE_FOREACH() macro.
2025-02-03 21:47:43 +09:00
Hermet Park
f8da536d1a
lottie: code refactoring++
...
Unified the property expression and default version.
This also helps to reduce the binarys size (O3=4k, S=360kb)
2025-01-29 23:25:46 +09:00