Commit graph

2631 commits

Author SHA1 Message Date
Hermet Park
5a7de430e0 renderer/shape: refine the circle draw commands.
Adjusted the path's start point to 90 degrees
to align the origin consistently with other path commands.

No compatibility issue, this only could affect the trimpath effects.
2024-04-05 17:21:53 +09:00
Hermet Park
a10f6679a2 Update README.md 2024-04-05 17:21:48 +09:00
Hermet Park
3290efb7bb doc: added LVGL in the practice section 2024-04-05 17:21:42 +09:00
Hermet Park
a078f14bb3 loader: code refactoring
Ensure scene data is freed when it's dangled in the loader.
2024-04-05 17:21:18 +09:00
Gabor Kiss-Vamosi
c099ec94b1 fix another type mismatch 2024-04-05 17:20:59 +09:00
Gabor Kiss-Vamosi
bc3e6ec99d fix the prototype of mpoolInit 2024-04-05 17:20:46 +09:00
Hermet Park
29a0469e1c ttf: Fixed an invalid unicode encoding.
Ensured the data count is correctly multiplied by the data size.
2024-04-05 17:20:38 +09:00
JunsuChoi
7220ebba3c loader/svg: Skip check for quotes inside quotes
Single or double quotation marks that occur before
closing the quotation mark are ignored.
2024-04-05 17:20:32 +09:00
Jinny You
d06414400e web: Support save2png 2024-04-05 17:19:46 +09:00
Jinny You
958481b0cb web: Improve stop animation behavior
`stop` worked like `pause`, when stopping animation, frame should be at 0
2024-04-05 17:19:38 +09:00
Jinny You
1a81b26b4f web: Fix animation loading bug
when `lottie-player` has no `src` at first rendering, programmatical load wasn't working
2024-04-05 17:19:33 +09:00
Jinny You
2db16b5be8 web: Add extra feature & property
- Support `resize` method
- Add `resolution` prop
2024-04-05 17:19:18 +09:00
Hermet Park
aa5245ff27 infra: bumped up version v0.12, set it dev mode. 2024-04-05 17:12:19 +09:00
Hermet Park
25ea242d38 saver/tvg: removed an unstable condition.
this optimization breaks the scene composition, remove it.

Issue: https://github.com/thorvg/thorvg/issues/1750
2024-01-03 16:21:15 +09:00
Jinny You
f2b6b44bce web/examples: Add save2tvg 2024-01-03 14:15:47 +09:00
Jinny You
3e6edc3b70 web: Support file types
- added new exportable type `tvg`
- support jpg/png/svg/tvg load
2024-01-03 14:15:42 +09:00
Jinny You
959f45313e wasm: Revise saver methods 2024-01-03 14:15:23 +09:00
Hermet Park
cf76f2f604 ttf: removed the beta tag.
incorporate TTF support into the CI build tests.
2024-01-03 11:52:23 +09:00
Hermet Park
8c3c2ab652 ttf: fix the windows compilation errors. 2024-01-03 11:52:18 +09:00
Hermet Park
cfb9ea8a43 tvg picture: binary version up. 2024-01-02 20:34:12 +09:00
Hermet Park
09e6278aff docs: updated doxygen for 0.12 release 2024-01-02 20:34:12 +09:00
Sergii Liebodkin
4242485810 xides compilation issue with loaders (#1885) 2024-01-02 20:34:12 +09:00
Hermet Park
4ebbd0aefc examples: ++safety.
Guarantee the resource free at the termination.
2024-01-02 20:34:12 +09:00
Hermet Park
ab744fc164 svg: ensure that all allocated memory.
observed a memory leak at a corner case.
2024-01-02 20:34:12 +09:00
Hermet Park
38c625d070 renderer: enhanced shared surface handling with mutex implementation
Introduced a dedicated mutex for each surface instance
to ensure safe sharing between the loader, renderer, and engine.

This enhancement allows for secure modification and access to bitmap data,
addressing potential concurrency issues.

Multiple Picture instances can now safely share a single loader instance,
optimizing performance.

This change builds upon the previous Loader Cache improvements:
ff6ea4b6c4
2024-01-02 20:34:12 +09:00
Hermet Park
102414d56f lottie: resolve a thread sanitizer report.
Issue: https://github.com/thorvg/thorvg/issues/1874
2024-01-02 20:34:12 +09:00
Hermet Park
15d1def0ec renderer/loader: improve thread safety
activeLoaders can be accessed by loaders within the worker thread.

the issue came up with the Loader cache feature:
ff6ea4b6c4

Issue: https://github.com/thorvg/thorvg/issues/1874
2024-01-02 20:34:12 +09:00
Hermet Park
4d344c888e sw_engine: resolve a thread sanitizer report.
Synchronize before accessing the shared bbox.

Issue: https://github.com/thorvg/thorvg/issues/1874
2024-01-02 20:34:12 +09:00
Hermet Park
65ff0ba1b1 renderer/taskscheduler: Resolve a thread sanitizer report.
Since each thread worker accesses the 'threads.count' variable,
delay the thread starting until initialization is completed.
2024-01-02 20:34:12 +09:00
Hermet Park
60282f51f8 renderer/loader: code refactoring.
Removed internal unique_ptr usage for a more compact size.
2024-01-02 20:34:12 +09:00
Hermet Park
4997f55e6c Revert "svg: removed an unnecessary nested scene."
A regression bug is occured.
clipper is also required to be transformed with loader->resize()...

This reverts commit e62a8668e7.
2024-01-02 20:34:12 +09:00
Hermet Park
884a505d6a text/ttf: fixed all memory violations. 2024-01-02 20:34:12 +09:00
Hermet Park
56d4628ee1 svg: removed an unnecessary nested scene. 2024-01-02 20:34:12 +09:00
Jinny You
92288c8291 updated copyright date (#1866) 2024-01-02 20:34:12 +09:00
Hermet Park
2ae8613a25 gl_engine: fix a compiler warning.
../src/renderer/gl_engine/tvgGlRenderer.cpp:450:24: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
  450 |     for (auto i = 0; i < mComposePool.count; i++) {
      |
2024-01-02 20:34:12 +09:00
Hermet Park
9ef2288ae7 api: promote to official APIs.
New API:
- SwCanvas::Colorspace::ABGR8888S
- SwCanvas::ColorSpace::ARGB8888S
2024-01-02 20:34:11 +09:00
Hermet Park
0553729818 doc: remove unnecessary doxy guide. 2024-01-02 20:34:11 +09:00
Hermet Park
04e9e82dbf Update README.md 2024-01-02 20:34:11 +09:00
RuiwenTang
2db45c7ba0 gl_engine: fix svg gradient position not correct
* change the color and stop size to 16 in shader and buffer block
* calculate transform when upload gradient info to gpu pipeline
2024-01-02 20:34:11 +09:00
Hermet Park
43b85e4dae Update README.md 2024-01-02 20:34:11 +09:00
Hermet Park
5a31531db1 Update README.md 2024-01-02 20:34:11 +09:00
Hermet Park
0764de76fd doc: updated the guide. 2024-01-02 20:34:11 +09:00
Hermet Park
dab0380398 examples/text: Added Text example. 2024-01-02 20:34:11 +09:00
Hermet Park
54528b6ac9 renderer: introduce a ThorVG Text interface.
Introduced New APIs under the experimental tags.

- Result Text::font(const char* name, float size, const char* style = nullptr);
- Result Text::text(const char* text);
- Result Text::fill(uint8_t r, uint8_t g, uint8_t b);
- static Result Text::load(const std::string& path);
- static Result Text::unload(const std::string& path);
- static Text::std::unique_ptr<Text> gen();
- static Text::uint32_t identifier()

@Issue: https://github.com/thorvg/thorvg/issues/969
2024-01-02 20:34:11 +09:00
Hermet Park
e53ee5881f renderer/loader: support ttf loader.
Applied 2 more internal LoaderMgr interfaces for
gobally manage the font data resources.

The next function is introduced for lookup the existing loader
with the font name (key)
- static LoaderMgr::LoadModule* loader(const char* key);

The next function is introduced to free the existing loader
with the loader source(file path)
- static bool retrieve(const string& path);

Additionally implements the base loader to bind the ttf loader.
2024-01-02 20:34:11 +09:00
Hermet Park
03c53d3227 loader/ttf: introduce a new sfnt(scalable font) loader.
ttf is an industry standard format that is the most widely used
in the products. Now thorvg supports the basic features of
the font to supplement the text drawing.

The implementation is followed the ttf spec,
the covered features are:

- horizontal layouting with kerning.
- utf8 -> utf32 converted glyph drawing.

To use the feature, please enable ttf loader:
$meson -Dloaders="ttf_beta, ..."

@Issue: https://github.com/thorvg/thorvg/issues/969
2024-01-02 20:34:11 +09:00
Hermet Park
49d26691e5 common: Revise internal loader interfaces.
We are introducing the FontLoader, which slightly differs
from the ImageLoader in terms of features. To adequately
support both, we have separated the loader functionalities
into FontLoader and ImageLoader. This allows us to optimally
adapt the LoadModule for each case.
2024-01-02 20:34:11 +09:00
Hermet Park
6ef979f2a0 sw_engine/fill: fix a linear filling scaling issue.
The condition is not valid,
Let it draw the fill as it's requested.

Issue: https://github.com/thorvg/thorvg/issues/1834
2024-01-02 20:34:11 +09:00
Hermet Park
700af87a77 Update README.md 2024-01-02 20:34:11 +09:00
Sergii Liebodkin
5ba19a8a7f wg_engine: shape bbox based rendering (optimization)
Before the current changes, all surfaces were painted using a full-screen overlay, no matter how large the object was rendered. This approach is redundant and required reorganization. At the moment, all objects are rendered using an overlay equal to the box of the object itself, which reduces the cost of filling the surface.
Also surfaces and images were divided into different entities, which reduces the pressure on memory.
Also geometry data for rendering and geometry data for calculations in system memory were logically separated.
2024-01-02 20:34:11 +09:00