Commit graph

91 commits

Author SHA1 Message Date
Hermet Park
0b77659136 infra: added opengl_es extra option for explicit selection
usages:
meson setup build -Dengines="gl"  //opengl
meson setup build -Dengines="gl" -Dextra="opengl_es"  //opengl es
2025-05-08 12:00:22 +03:00
Fabian Blatz
29b612237d infra: added double-precison promotion warning
Note that, for our dev-convenient, this option
is only toggled on when the logging is off.

Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
2025-02-12 19:12:06 +09:00
Hermet Park
1422c4ca5f renderer: make the file io configurable
certain systems, may not support file I/O operations.
ThorVG should provide users with an option to configure
builds according to their requirements.

This ensures that file I/O calls are avoided,
preventing potential crashes.

Please use the meson '-Dfile=true/false' option for this.

Please note that "THORVG_FILE_IO_SUPPORT" might be expected
for your thorvg manual build.

issue: https://github.com/thorvg/thorvg/issues/3008
2024-12-02 11:50:59 +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
145195baac infra: removed beta tag from WebGPU
Removed beta tag for dev convenience. Also, ensures that
ThorVG will officially release WebGPU in the next version (v1.0)
2024-10-07 21:08:52 +09:00
Hermet Park
1b599d82c4 release: bump up version v0.15
set dev mode for the next 1.0 release
2024-10-04 11:29:05 +09:00
Elliott Sales de Andrade
5f08b9ade4 build: Remove redundant comparisons
If a Meson option is typed as `boolean`, the `get_option` returns a
boolean, and comparing it with `true` is redundant. Meson also errors if
you try to compare across types, so it couldn't _not_ be a boolean.

Also, Meson is not C, so no need for parentheses around `if` conditions.
2024-08-19 17:42:40 +09:00
Hermet Park
5ebe33af90 infra: switch the optimization option to level 3
In case of modern systems, size is not a big problem,
so we turn the optimization option to default
for better performance.

FPS: ~20% enhanced
Size: ~25% increased

Note that this doesn't affect to the web player.
2024-08-08 14:47:01 +09:00
Hermet Park
38852538f5 infra: bumped up version v0.14, set it dev mode 2024-06-27 15:12:58 +09:00
Hermet Park
af1f3cb59d gl_engine: revise the gl portability
- guarantee minimum gl version requirement
- removed glesv2 dependency
- corrected gl ver dependency

issue: https://github.com/thorvg/thorvg/issues/2282
2024-06-24 11:08:28 +09:00
Hermet Park
ec792d2e9a infra: promote the GL engine to an official one.
The ThorVG OpenGL/ES engine has been stabilized and improved
significantly. Now, as a graphics engine, its drawing features
are quite functional. It is time to officially release the
engine and maintain it in the release process.

Thanks @Ruiwen for going above and beyond!

issue: https://github.com/thorvg/thorvg/issues/2435
2024-06-21 11:53:37 +09:00
Hermet Park
de693c3e3e infra: relocate the tools folder.
Collect only library source code in src
2024-06-13 17:52:14 +09:00
Hermet Park
db71bc5b55 infra: add extra build options for flexible ThorVG composition
this commit introduces an additional build options:

- lottie expressions: this advanced feature in Lottie can
significantly increase binary size. Users now have the option
to enable or disable it based on their requirements.

Note that, this change introduces one config definitions:

- THORVG_LOTTIE_EXPRESSIONS_SUPPORT
2024-05-09 10:27:39 +09:00
Vincent Torri
b1912e2ef9 infra: fix build failure using c++17 (or later) with MSVC.
the WIN32_LEAN_AND_MEAN definition will remove the unused
features in windows.h that helps to improve the build-speed
as well as fixing the issue.

Issue: https://github.com/thorvg/thorvg/issues/2225

Co-Authored-By: Hermet Park <hermet@lottiefiles.com>
2024-05-02 16:09:01 +09:00
Hermet Park
e62b144afe lottie: integrate JerryScript engine for expressions
introduced the JerryScript engine to interpret Lottie
expressions, enhancing the capability to support runtime
programmable animation logic within Lottie expressions
spec. This feature, based on js scripting, represents
the most complicated addition to the Lottie spec so far.

ThorVG probably could includes an option to toggle
this feature at build time, allowing for customizable user
configurations according to specific requirements.

removed unused features for the optimal size:
- DEBUGGER
- MEM_STATS
- SNAPSHOT
- BUILTIN_JSON
- BUILTIN_PROXY
- BUILTIN_REFLECT
- BUILTIN_ATOMICS
- PROMISE_CALLBACK
- MODULE_SYSTEM
- SYSTEM_PORT

This is an experimental version.
Please manually enable the 'lottie-expressions' in meson.build
when you wish to use it.

See: https://jerryscript.net/
2024-04-30 15:26:37 +09:00
Hermet Park
3399b36679 infra: meson code clean up 2024-04-22 11:10:44 +09:00
Mira Grudzinska
568846491d build: enforcing saver/loader usage for given tool
Selecting a tool without choosing the required tools
resulted in a usage error. Now, the activation
of the appropriate saver/loader for a given tool
is enforced.
2024-04-19 10:01:30 +09:00
Hermet Park
fa4b2cb704 infra: revise the vector build script
Note that this change renames the Meson option from 'vector' to 'simd',
separates the NEON types into 'neon-arm' and 'neon-aarch',
and designates the 'mfpu' option solely for 'neon-arm'.
2024-04-15 00:08:34 +09:00
Hermet Park
c4d547c148 infra: bumped up version v0.13, set it dev mode. 2024-04-06 15:13:35 +09:00
Hermet Park
e8e9ba5ea0 infra: move the examples folder outside of the source directory.
examples are not considered a feature of ThorVG;
hence, they are excluded from the src directory.

This change allows developers to concentrate more effectively
on the core ThorVG sources for practical usages.
2024-04-01 10:52:22 +09:00
Junsu Choi
df4f93e79f loader/webp: Support static webp loader
Built to libwebp code in to support the static option of webp loader.
Code from :https://github.com/jacklicn/libwebp

This forking version only contains the minimal webp decoding feature.

Binary Size: +68kb

Co-authored-by: Hermet Park <hermet@lottiefiles.com>

issue: https://github.com/thorvg/thorvg/issues/1427
2024-02-07 10:58:25 +09:00
Hermet Park
a49532a818 common: STM32 portability enhancement
Some systems such as micro-processor might not support
the thread feature on the system.

Enhance the portability by compiling the thorvg with toggling the
threading depepdency through the build option.

For this, thorvg newly introduced the internal Key/ScopedLock abstraction
for transparent thread-locking dependnecy.

To turn off the thread feature, please use the next build option:

$meson setup build -Dthreads=false ...

Note that, the thread feature is enabled in default.
Turning off the thread feature could reduce the binary size by 7kb.

issue: https://github.com/thorvg/thorvg/issues/1900
2024-01-18 10:20:21 +09:00
Hermet Park
bacbd575b9 infra: bumped up version v0.12, set it dev mode. 2024-01-04 16:26:02 +09:00
Hermet Park
8375c53461 ttf: removed the beta tag.
incorporate TTF support into the CI build tests.
2024-01-03 12:57:07 +09:00
Hermet Park
24901e7d59 docs: updated doxygen for 0.12 release 2024-01-02 20:39:19 +09:00
Hermet Park
3c4e434b39 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
2023-12-25 12:40:12 +09:00
Hermet Park
7ab5cb90aa infra: renamed the folders, images -> resources.
these folders might have more than images.
2023-12-12 08:57:44 +09:00
Hermet Park
024e879ee6 tools/lottie2gif: introduce a new converter tool.
Usage:
   lottie2gif [Lottie file] or [Lottie folder] [-r resolution] [-f fps]

Examples:
    $ lottie2gif input.json
    $ lottie2gif input.json -f 30
    $ lottie2gif input.json -r 600x600 -f 30
    $ lottie2gif lottiefolder
    $ lottie2gif lottiefolder -r 600x600
    $ lottie2gif lottiefolder -r 600x600 -f 30
2023-11-03 17:19:05 +09:00
JunsuChoi
d03bf7a089 saver GifSaver: Introduce GifSaver for animation
Add save() API that takes tvg::Animation as a parameter.
This API uses gif.h to create each animation frame as a gif frame.
Gif creation do not support threads because they must be added sequentially.
Please see example/GifSaver.cpp

ex)
auto animation = tvg::Animation::gen();
auto picture = animation->picture();
picture->load(EXAMPLE_DIR"/walker.json");
auto saver = tvg::Saver::gen();
saver->save(std::move(animation), EXAMPLE_DIR"/test.gif");
saver->sync();

New API:
Result Saver::save(std::unique_ptr<Animation> animation, const std::string& path, uint32_t quality = 100, uint32_t fps = 0);

Issue: https://github.com/thorvg/thorvg/issues/1712
2023-11-02 17:50:27 +09:00
SergeyLebedkin
8d5c728119
wg_engine: introduce a webgpu canvas(engine)
WebGPU is a Render Hardware Interface built on top of the various APIs 
provided by the driver/OS depending on your platform. 

WebGPU exposes an API for performing operations, 
such as rendering and computation, on a Graphics Processing Unit.

WebGPU official documentation: https://www.w3.org/TR/webgpu/

The new engine type introduced: tvg::CanvasEngine::Wg

The new canvas type introduced: tvg::WgCanvas

Example:
$meson setup build -Dengines=wg_beta

`
    // init engine webgpu
    tvg::Initializer::init(tvg::CanvasEngine::Wg, 0);

    // create wg canvas
    auto canvasWg = tvg::WgCanvas::gen();
    canvas_wg->target(glfwGetWin32Window(window), width, height);

    // ...

    // terminate engine and window
    tvg::Initializer::term(tvg::CanvasEngine::Wg);
`
Still this feature is under the beta

Issue: https://github.com/thorvg/thorvg/issues/1479
2023-10-13 22:59:32 +09:00
Hermet Park
3fabf9f19d infra: changed to dev mode 2023-09-28 08:36:54 +09:00
Hermet Park
12260198d1 release: bump up version v0.11.0 2023-09-28 08:30:34 +09:00
Hermet Park
da1b036e4f loader lottie: -- beta tag.
Now, it's quite workable. Include it in our default integration test suite.
2023-08-07 10:56:35 +09:00
Hermet Park
052cfea4b1 binding wasm: tag it as beta version.
wasm interfaces are fragile now.
we dont'guarantee compatibility yet.
2023-08-04 15:09:28 +09:00
Hermet Park
6ab32cae0b infra wasm: migrate wasm into bindings. 2023-08-04 15:09:28 +09:00
Hermet Park
77c7aa04f5 release: bump up version v0.10 2023-07-29 14:24:37 +09:00
Hermet Park
60f81b7da7 loader lottie: added empty interface body
This marks the first step towards implementing the Lottie feature.
2023-07-27 00:31:27 +09:00
JunsuChoi
595cc56e86 webp_loader: Introduce Webp image loader
Add external_webp loader which uses libwebp library.
2023-06-09 10:58:01 +09:00
Hermet Park
42e0f8c3a3 infra: enable strip flag only when it's requeted.
$meson . build -Dstrip=false  //off
$meson . build -Dstrip=true   //on
2023-05-17 22:17:10 +09:00
Hermet Park
0dec5a44b6 engine gl: specify gl as beta
The engine hasn't been maintained propelry and it's not functional.
2023-05-12 12:06:00 +09:00
Hermet Park
e84b181da8 released v0.9.0 2023-05-10 14:35:42 +09:00
Hermet Park
b2692484b7 infra - add 'all' option for savers.
ex) meson . build -Dsavers="all", ...
2023-04-07 13:54:29 +09:00
Hermet Park
d120084b7c just released v0.8.0 2022-03-08 19:03:21 +09:00
Hermet Park
5fd32acf73 infra: just released v0.7.0 2021-12-22 19:10:58 +09:00
Hermet Park
6f42007f29 infra: just released v0.6.0 2021-11-02 20:06:06 +09:00
Hermet Park
f4d284df2a infra: add "all" option for tools.
just for developer convenience.
2021-10-14 14:54:24 +09:00
projectitis
a04349ac71
examples, tests: replace backslashes with forward slashes for portability (#880)
* Replace backslashes with forward slashes

* Downgrade to older meson syntax
2021-10-06 22:18:56 +09:00
Hermet Park
a2ac28d0c5
infra: add all option to enable all loader formats.
just for developer convenience (including me)

ex) $meson . build -Dloaders="all" ...
2021-10-06 11:13:49 +09:00
JunsuChoi
5124a9ad6b infra: Add window build test in CI
Add build test for normal build
2021-10-06 10:44:51 +09:00
Mira Grudzinska
78363c3aad Revert "sw_engine: border cases for gradients"
This reverts commit 284298445b.
2021-10-06 01:13:02 +02:00