Commit graph

2152 commits

Author SHA1 Message Date
Hermet Park
3752ad93b3 loader/lottie: do not draw zero size content
skip rendering by setting opacity zero, if the scale factor is zero.
2023-09-12 20:55:16 +09:00
Hermet Park
46d831ead7 sw_engine: skip the rendering if possible.
zero scale would not produce any visible artifacts.
we can skip the further processing sonner.
2023-09-12 20:52:33 +09:00
Hermet Park
2257211852 sw_engine: fix a regression bug by 0dafe9ff64
rectified the stroke scale factor acquisition.
2023-09-12 11:44:27 +09:00
Youjin Lee
d356b3f1e2 docs: updated font size 2023-09-11 23:36:31 +09:00
Youjin Lee
81b70e0334 docs: revise the doxygen design 2023-09-11 11:29:04 +09:00
Hermet Park
bfaea7f918
Update README.md 2023-09-09 11:17:17 +09:00
Hermet Park
f3c8d10b90 loader/lottie: fix a dash gap size.
fix a bug that was introduced by a mistake.
2023-09-08 15:01:28 +09:00
Hermet Park
e14e108d4a loader/lotte: ++clean code 2023-09-08 15:01:28 +09:00
Hermet Park
357f4d1518 doc: reduce a file size. 2023-09-07 19:25:04 +09:00
Hermet Park
ac76ba824d doc: updated the lottie example video 2023-09-07 18:57:00 +09:00
Hermet Park
516e8bf042 loader/lottie: minimum support for 3D transform
It lacks perspective projection information,
so it transforms 3D axes with orthogonal projection.
2023-09-07 17:59:52 +09:00
Hermet Park
b5fcc90e5d loader/lottie: fix a wrong precomp time remapping.
the remapped frame number should be applied to the only referenced
precomp layer.
2023-09-07 17:59:52 +09:00
Hermet Park
a49ac81543 loader/lottie: support the repeater property 2023-09-07 12:17:16 +09:00
Hermet Park
2fab9fb7d9 loader/lottie: fix the incorrect viewport clip condition.
the viewport clip should be applied when it has a precomposition reference
but should not apply to image assets.
2023-09-07 12:17:16 +09:00
Hermet Park
32d53f6a64
Update README.md 2023-09-05 18:48:51 +09:00
Hermet Park
8f376f7132
Update README.md 2023-09-05 18:45:50 +09:00
Hermet Park
0dafe9ff64 sw_engine: revised code.
add a concrete logic for validating the stroke width
2023-09-05 18:41:20 +09:00
Hermet Park
dae6636d29 loader/lottie: filled a missing gradient stroke dash body. 2023-09-05 18:41:20 +09:00
Hermet Park
204c87b470
Update README.md 2023-09-05 14:54:21 +09:00
Hermet Park
78cb32794a sw_engine: utilize the memory pool for dash stroking. 2023-09-05 12:38:57 +09:00
Hermet Park
64a444aeb6 loader/lottie: support focal property in the radial gradient 2023-09-05 10:29:12 +09:00
Hermet Park
fa134692b0 Revert "renderer taskscheduler: code refactoring."
This reverts commit 77de62068c.

This fixes the sanitizer thread report (data race) issue.

@Issue: https://github.com/thorvg/thorvg/issues/1623
2023-09-05 10:22:53 +09:00
RuiwenTang
b6e168b315 gl_engine: pack all data into one gpu buffer
Pack all data into one gpu buffer to avoid memory fragmentation
2023-09-05 00:38:27 +09:00
Hermet Park
e0d1c947e6 infra: renamed the files for the consistency. 2023-09-04 17:26:43 +09:00
Mira Grudzinska
fd014df1a9 loader/svg: support the focal property in the radial gradient.
@Issue: https://github.com/thorvg/thorvg/issues/1555
2023-09-04 16:48:38 +09:00
Mira Grudzinska
ce3c11838c renderer/sw_engine: support the focal property in the radial gradient.
@Issue: https://github.com/thorvg/thorvg/issues/1558
2023-09-04 16:48:38 +09:00
Hermet Park
7430589586 keep the line space consistency. 2023-09-04 13:14:39 +09:00
Hermet Park
cdac27b1b5 apis: promote beta apis to official status
- Result Shape::strokeMiterlimit(float miterlimit)
- float Shape::strokeMiterlimit() const
2023-09-04 13:11:37 +09:00
Hermet Park
ac8f3b8be6 loader/lottie: support hold interpolation. 2023-09-04 11:16:01 +09:00
Hermet Park
aa0ca8dc78
Update README.md 2023-09-02 18:40:20 +09:00
Hermet Park
7626aaf5d2 bindings/wasm: optimize the performance.
Do not try to update/render if nothing has been changed.
2023-09-01 13:50:00 +09:00
Hermet Park
ad9d9d0ecd loader/lottie: support trimpath feature 2023-09-01 13:16:18 +09:00
Hermet Park
22771b5d8a loader/lottie: fix a broken masking feature.
the inverse alpha should keep its own value.
previously, it's modified to alpha by a mistake.
2023-09-01 13:16:18 +09:00
Hermet Park
7c669f622f loader/lottie: enhanced the coverage of the rounded corner feature.
Rounded corners should now be applied not only to rectangles
but also to path strokes. This enhancement changes the stroke join style
to round when a rounded corner is present.

Indeed, rounded corners ensure the accurate calculation of roundness based on the join style.
However, this patch has not yet been designed to handle it.
2023-09-01 13:16:18 +09:00
Hermet Park
1112444bd2 renderer/shape: fixed the issue of a missing miterlimit property copy. 2023-08-30 21:45:01 +09:00
Hermet Park
c23c556f61 loader/lottie: fix a default color of the solid layer.
we assume the default color is black.
before this fix, the value is not designated properly.
2023-08-30 17:46:32 +09:00
Hermet Park
ce5ac1c114 loader/lottie: fix a crash issue caused by incorrect gradient alpha handling.
This fix addresses the interpretation of gradient alpha values,
preventing a potential crash due to invalid memory access.
2023-08-30 17:46:27 +09:00
Hermet Park
735c1cb9e4 sw_engine: fixed a antialiasing issue.
Previously, a mechanism was introduced to skip antialiasing computations
when shapes are invisible due to their stroking. However, this mechanism
failed to account for the scale factor of the stroke; it only considered
the current stroke width as a threshold.

Consequently, when the stroke width is scaled up to a value smaller than
the threshold, the incorrect antialiasing approach is applied. This results
in the appearance of jagged edges.

The implemented fix rectifies this problem and ensures that the antialiasing
computation correctly takes into consideration both the visibility and the
scale factor of the stroke width.
2023-08-30 17:28:41 +09:00
Hermet Park
09da0b86cb
Update README.md 2023-08-30 16:44:44 +09:00
Hermet Park
309f355c60 common/bezier: fix a wrong computation.
the value should be normalized.
2023-08-30 11:05:07 +09:00
Hermet Park
86467481d1 examples: do not update canvases when frame numbers haven't been changed. 2023-08-29 13:24:59 +09:00
Hermet Park
992891e6a8 sw_engine: a minor optimization.
reduced the point counting since we already know some of them.
2023-08-29 13:24:54 +09:00
Martin Capitanio
ab77e1d3d4 THORVG_LOG: --compiler -Werror=empty-body
Godot CI:
Error: (thirdparty/thorvg/)src/renderer/tvgPaint.h:85:80: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
   85 |             if (refCnt == 255) TVGERR("RENDERER", "Corrupted reference count!");
...
2023-08-29 12:30:33 +09:00
Hermet Park
5a73bcaa8f common/array: code refactoring
easy access to a specific data with a operator.
2023-08-29 12:28:38 +09:00
Hermet Park
24711e485c infra: renames the source folders
lib -> renderer
bin -> tools
utils -> common
2023-08-28 13:11:24 +09:00
Hermet Park
07069f6640 loader/lottie: introduce chaining maskings more effectively. 2023-08-28 11:55:17 +09:00
Hermet Park
21413b1872 sw_engine: optimizing the masking feature
replaced 32-bit operations with 8-bit operations for masking buffers.

We might need a grasycale image support for applying 1-byte channel masking input(Picture).
Some of masking implementation are disabled by this reason.

Also, I don't expecct it's necessary for the thorvg now.
2023-08-28 11:55:10 +09:00
Hermet Park
624b275628 sw_engine: improve the masking methods
Corrected subtract/intersect masking behaviors that were inaccurately functioning
within chain-masking.

This also helps to enhance the masking performance by reducing the
masking region when applying subtract/intersect.

@Issue: https://github.com/thorvg/thorvg/issues/1606
2023-08-28 11:55:01 +09:00
RuiwenTang
7eeba75472 gl_engine: Use advance tessellate algorithm
Introducing a new tessellate algorithm to break polygon into triangles.
2023-08-28 11:36:43 +09:00
Hermet Park
7b40c741ac loader/lottie: correct a polystar transform.
Properly propagate the transform information to the merged shapes.
This corrects the incorrect transformation applied to the subsequent shapes.
2023-08-24 10:57:38 +09:00