Hermet Park
8492a63052
svg: code refactoring
...
--cyclomatic complexity, no logical changes.
2024-10-16 15:26:34 +09:00
Hermet Park
6357da3b97
svg: remove the condition for white shape fill in luma masking
...
Immediately apply LumaMask when SvgMaskType::Luminance is specified.
2024-10-16 15:24:50 +09:00
Hermet Park
0a16152d75
api: renamed the composite with mask.
...
Since we've separated ClipPath and Masking,
Masking now has a distinct and independent purpose.
API Modification:
- enum class CompositeMethod -> enum class MaskMethod
- Result Paint::composite(std::unique_ptr<Paint> target, CompositeMethod method) -> Result Paint::mask(std::unique_ptr<Paint> target, MaskMethod method)
- CompositeMethod Paint::mask(const Paint** target) const -> MaskMethod Paint::mask(const Paint** target) const
issue: https://github.com/thorvg/thorvg/issues/1372
2024-10-16 14:41:26 +09:00
Sergii Liebodkin
adebbcd4e2
wg_engine: fix miter qdge cases math
2024-10-16 00:52:07 +09:00
Sergii Liebodkin
40cff2d6f5
wg_engine: fix long path support
...
created a singe shared instance of stoke generator in heap, instead of stack. No performace impact
2024-10-16 00:52:07 +09:00
Sergii Liebodkin
c926eebba1
wg_engine: fix empty shape aabb handling
...
see https://github.com/thorvg/thorvg/issues/2843 :
2024-10-16 00:52:07 +09:00
RuiwenTang
0c08dab32f
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-15 20:02:42 +09:00
Hermet Park
630cbc48ae
api: revise the api for v1.0
...
- refactored the Fill matrix to hold internal data statically.
- refactored for clean & neat the raster engine / svg loader logic.
API Modification:
- Matrix Fill::transform() const -> Matrix& Fill::transform() const
issue: https://github.com/thorvg/thorvg/issues/1372
2024-10-14 23:32:55 +09:00
Hermet Park
6a45e6e494
api: revise the api for v1.0
...
API Modification:
- Matrix Paint::transform() -> Matrix& Paint::transform()
issue: https://github.com/thorvg/thorvg/issues/1372
2024-10-14 17:22:20 +09:00
Hermet Park
8ee5f5c544
api: path data size reduction (to 1 byte)
...
API Modification:
- enum class PathCommand -> enum class PathCommand : uint8_t
- enum class Result::Unknown (6) -> enum class Result::Unknown = 255
- typedef enum Tvg_Path_Command -> typedef uint8_t Tvg_Path_Command
- TVG_RESULT_UNKNOWN (6) -> TVG_RESULT_UNKNOWN = 255
2024-10-14 14:46:40 +09:00
Hermet Park
65916857e2
api: polish the thorvg API usages
...
Use ColorSpace to support various types of raw bitmaps.
API Modifications:
- Result Picture::load(uint32_t* data, uint32_t w, uint32_t h, bool premultiplied, bool copy = false) -> Result Picture::load(uint32_t* data, uint32_t w, uint32_t h, ColorSpace cs, bool copy = false)
- Tvg_Result tvg_picture_load_raw(Tvg_Paint* paint, uint32_t *data, uint32_t w, uint32_t h, bool premultiplied, bool copy) -> Tvg_Result tvg_picture_load_raw(Tvg_Paint* paint, uint32_t *data, uint32_t w, uint32_t h, Tvg_Colorspace cs, bool copy)
issue: https://github.com/thorvg/thorvg/issues/1372
2024-10-13 11:15:57 +09:00
Hermet Park
0e45fabb3d
spec out tvg binary format
...
issue: https://github.com/thorvg/thorvg/issues/2721
2024-10-12 21:07:31 +09:00
Hermet Park
367ac5f331
api: removed redundant CompisiteMethod::ClipPath
...
issue: https://github.com/thorvg/thorvg/issues/1372
2024-10-12 16:02:38 +09:00
Hermet Park
9bc900206b
api: polish the thorvg API usages.
...
API Modification:
- SwCanvas::Colorspace -> ColorSpace
API Addition:
- ColorSpace::Unknown
issue: https://github.com/thorvg/thorvg/issues/1372
2024-10-12 15:38:03 +09:00
Mira Grudzinska
3fd095e947
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-10 14:39:10 +09:00
Mira Grudzinska
0a677396c4
sw_engine: split long lines to avoid overflow
...
@Issue: https://github.com/thorvg/thorvg/issues/2651
2024-10-10 14:21:13 +09:00
Hermet Park
8cdc0da1e2
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-09 20:41:52 +09:00
Hermet Park
4feab345fb
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-09 20:41:52 +09:00
JunsuChoi
6cfc22d123
svg_loader: Support id attribute for tvg::Accessor
...
Supports access with tvg::Accessor using the value set in the id attribute of SVG
Please refer to examples/Accessor.cpp
2024-10-09 00:04:41 +09:00
Hermet Park
01559a45c0
api: remove deprecations
...
issue: https://github.com/thorvg/thorvg/issues/1372
2024-10-07 20:43:37 +09:00
Sergii Liebodkin
b4238cd647
wg_engine: fix long path decoding crash
...
fixed crash with shape have too big path
2024-10-07 17:00:43 +09:00
Sergii Liebodkin
2bd8fdad36
wg_engine: fix custom scene blending with opacity
...
fixed incorrect opacity applience for scene blending
2024-10-04 23:23:03 +09:00
Sergii Liebodkin
ba7091956c
wg_engine: fix color stops offsets
...
filter offset by increasing order
2024-10-04 23:17:01 +09:00
Hermet Park
a72ed0ddfa
wg_engine: fixed resource leaks
...
issue: https://github.com/thorvg/thorvg/issues/2808
2024-10-04 14:20:51 +09:00
Sergii Liebodkin
3afb7be255
wg_engine: fix picture memory leak
...
picture mesh data was not released
2024-10-04 03:40:57 +09:00
Hermet Park
e077eca8a7
infra: --shutdown the unkown-pragmas warning
...
Apply the flag even if the sanitizer is toggled on.
2024-10-04 02:50:19 +09:00
Mira Grudzinska
19d3eb95e2
sw_engine: ++exception handling
...
Prevent the infinite loop in the worst case
@Issue: https://github.com/thorvg/thorvg/issues/2651
2024-10-03 23:59:18 +09:00
Mira Grudzinska
3c74e90b76
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:31:07 +09:00
Hermet Park
08e6b8333f
renderer/compressor: corrected base64 decoded data size
...
issue: https://github.com/thorvg/thorvg/issues/2794
2024-10-03 18:56:26 +09:00
Hermet Park
b868503033
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 18:54:14 +09:00
Hermet Park
d3af7a5cb0
sw_engine: fixed an uninitialized data access
2024-10-03 18:20:47 +09:00
Hermet Park
d8f6710c73
lottie: hotfix layer effect parsing
...
fixed a break in expressions/driving.json
2024-10-03 13:53:45 +09:00
Hermet Park
5dabcbac0b
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 13:31:19 +09:00
Mira Grudzinska
38f4d17eac
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:32:48 +09:00
Hermet Park
132213110c
wasm: fix a build break
2024-10-01 17:11:28 +09:00
Hermet Park
13110fbec7
lottie: portability++
...
issue: https://github.com/thorvg/thorvg/issues/2764
2024-10-01 14:08:08 +09:00
Hermet Park
d038518e6d
lottie: ++safety
2024-10-01 11:23:12 +09:00
RuiwenTang
894ecd7461
gl_engine: implement darken and lighten mask method
...
Add new shader to support darken and lighten mask method.
2024-09-30 23:17:33 +09:00
Mira Grudzinska
2238109ada
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 22:18:51 +09:00
Hermet Park
b995c33ac7
hotfix: backward compatibility++
2024-09-30 18:02:19 +09:00
Sergii Liebodkin
08c333acd9
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 17:44:42 +09:00
Hermet Park
155d4a2aa2
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 12:29:54 +09:00
Hermet Park
639df7e3cf
gl_engine: --deprecation references.
2024-09-29 21:52:32 +09:00
Hermet Park
bbe69578a5
renderer/scene: rectify the render region elaboration
...
Properly clip the render region to the current viewport.
2024-09-29 15:04:22 +09:00
Hermet Park
27f173faa3
sw_engine: applied OpenMP to improve post-processing performance.
...
- OpenMp threads will be allocated alongside the TaskSculeduler::threads()
- Performance improved by 2x in a specific animation.
- Disable the thread feature in the Android build test due to system issues with OpenMP compilation.
2024-09-29 15:04:22 +09:00
Hermet Park
f08d7aa037
lottie: support layer effect & gaussian blur
...
issue: https://github.com/thorvg/thorvg/issues/2718
2024-09-29 15:04:22 +09:00
Hermet Park
2558e5dc10
renderer: introduced SceneEffect feature
...
Scene effects are typically applied to modify
the final appearance of a rendered scene,
such as adding a blur effect.
Each effect would have a different number of parameters
to control its visual properties. The Scene::push() interface
uses variadic arguments to accommodate various cases.
Users should refer to the SceneEffect API documentation
and pass the parameters exactly as required for the specific
effect type. For instance, GaussianBlur expects 3 parameters
which are:
- sigma(float)[greater than 0]
- direction(int)[both: 0 / horizontal: 1 / vertical: 2]
- border(int)[extend: 0 / wrap: 1]
- quality(int)[0 ~ 100]
and, scene->push(SceneEffect::GaussianBlur, 5.0f, 0, 0, 100);
New Experimental APIs:
- SceneEffect::ClearAll
- SceneEffect::GaussianBlur
- Result Scene::push(SceneEffect effect, ...);
Example:
- examples/SceneEffect
issue: https://github.com/thorvg/thorvg/issues/374
2024-09-29 15:04:22 +09:00
Hermet Park
e59c6046ec
renderer: ++TODO for optimization
2024-09-28 19:46:31 +09:00
Mira Grudzinska
c6384c3b8f
renderer: fix clipped clippers
...
Fast track was applied for clippers even if they
were also clipped. As a result their clips were
omitted.
@Issue: https://github.com/thorvg/thorvg/issues/2777
2024-09-28 19:40:09 +09:00
Mira Grudzinska
edf1cfe927
sw_engine: add support for 8bits gradient rectangles
...
Rastering for 32bits dst buffer was implemented,
but 8bits dst were not supported.
@Issue: https://github.com/thorvg/thorvg/issues/2765
2024-09-27 18:27:31 +09:00