Commit graph

64 commits

Author SHA1 Message Date
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
Mira Grudzinska
284298445b sw_engine: border cases for gradients
According to the svg standard, in a case when 'x1==x2 and y1==y2'
for a linear gradient or when 'r==0' for a radial gradient, the area
should be painted as a single color - the last gradient stop color.
2021-10-05 15:24:07 +02:00
Hermet Park
5ad17c6ccf infra: just released v0.5.0 2021-09-24 12:19:02 +09:00
Hermet Park
75e1310c7a prepare to release tvg format feature. 2021-09-16 17:46:10 +09:00
Hermet Park
6f95e9dbe7 infra: simplify vector meson option.
neon/avx can't be resided in together,
we replace it with a string variable.
2021-08-19 14:46:59 +09:00
Hermet Park
ca16e8b403 build: renamed the cpu vectorization option. 2021-08-18 19:00:48 +09:00
Michal Szczecinski
e3eaa05548 build: Fixed simd options detection 2021-08-18 18:58:12 +09:00
Michal Maciola
5f25154ba8 common: meson.build added default_options cpp_std=gnu++14 2021-08-09 18:08:38 +09:00
Hermet Park
4b54d7fcb6 infra: just released v0.4.0 2021-08-09 15:21:32 +09:00
Hermet Park
ae8120bb29 infra: fix missing tvg -> tvg_beta tag.
breakage was introduced by 6ad1b1bf73
2021-08-09 12:57:00 +09:00
Hermet Park
148b4fbfe0 infra: updated meson summary. 2021-08-04 19:58:15 +09:00
Hermet Park
a042e771e4
tvg_format: force to check for compatibility by version comparision.
tvg file stores the version info of thorvg when it's generated,
in order to compare it with the runtime thorvg version when it's loaded.

For this, thorvg builds up the current version of symbol on the initilaization step,
that can be referred by the tvg loader.
2021-08-04 15:31:06 +09:00
Michal Szczecinski
1acc25b5ac sw_engine common: Added neon version of rasterRGBA32 API.
Changes:
- Added 'neon' vector option in build system
- Introduced neon version of rasterRGBA32 API, which improves
speed of the funciton on ARM cpu's around ~35%
2021-07-28 19:17:23 +09:00
Hermet Park
fe00e54257 tvg_saver: introduce a new module tvg saver
tvg saver is a new module to export tvg files.

In this patch, it also contains the infrastructure of saver module
to expand other types of savers such as png, jpg, etc.

To save the tvg file from a paint, you can use the Saver feature, for example:

auto saver = tvg::Saver::gen();
saver->save(paint, "sample.tvg");
saver->sync();

Later, you can read the "sample.tvg" using Picture.

auto picture = tvg::Picture::gen();
picture->load("sample.tvg");
...

The behavior of the saver will work on sync/async based on the threading setting of the initializer.
Thus if you wish to have a benefit of it, you must call sync() after the save() in the proper delayed time.

Otherwise, you can call sync() immediately.

Note that, the asynchronous tasking is depent on the saver module implementation.
Also, you need to enable tvg saver/loader modules from meson option. (yet this feature is under the beta)

@API Addition:
Result Saver::save(std::unique_ptr<Paint> paint, const std::string& path) noexcept;
Result Saver::sync() noexcept;

@Examples: tvgSaver

@Co-author: Mira Grudzinska <m.grudzinska@samsung.com>
2021-07-21 19:30:15 +09:00
Hermet Park
94eeb92dbe infra: seprate test image resources from the examples.
change for removing dependency.
2021-07-19 14:43:26 +09:00
Hermet Park
90a8c9d197 infra: ++ jpg support meson message 2021-07-07 13:48:27 +09:00
Michal Maciola
0435f29f11 jpg_loader: introduced jpg decode using libjpeg-turbo
This patch introduces a jpg loader.
For decoding the image, libjpeg-turbo library is used. Library was found to be
fast (SIMD instructions accelerated) and portable.

@issue: #517
2021-07-07 13:44:16 +09:00
Hermet Park
8d31496648 infra: print enabled features in the meson summary list.
instead removed individual messages.
2021-07-03 14:58:17 +09:00
Hermet Park
935b8592f1 infra: just released v0.3.0 2021-07-03 13:08:50 +09:00
Hermet Park
5bbe713ca5 infra: add memory sanitize option in meson
for optimial library, we removed some peripheral information in default,
this breaks asan environment.

This patch changes it to make it both.

if you want to use asan, please change the meson option.

default is disabled.

example)
$meson . build -Db_sanitize=address
$meson . build -Db_sanitize=address,undefined
2021-06-23 11:55:52 +09:00
Hermet Park
4795927dc1 fix build break.
regression by - 15b56a66de
2021-06-11 21:04:43 +09:00
Hermet Park
73ea4abf51 infra: just released v0.2.0 2021-06-06 17:36:48 +09:00
Hermet Park
59198d2735 infra: set higher version to try the devel symbols with higher priority than released ones. 2021-06-06 17:12:41 +09:00
Hermet Park
6b7aa8ad9e
tests: introduce catch2 unit tests infrastructure.
Catch2 is a multi-paradigm test framework for C++.
It is primarily distributed as a single header file,
very easy and simple to adopt this to thorvg project.

This patch introduces catch2 infrastsructure and one prototype as a sample.

You can refer "testInitializer.cpp", how to add unit test!
while ignoring else files such as "catch2.hpp", "testMain.cpp"

Also, enable Unit-tests with meson option when you change any thorvg code.

$meson build -Dtests=true.

launch tvgUnitTest in the build result then verify 100% coverage
before submitting any patches.
2021-06-04 16:46:34 +09:00
Hermet Park
bbfbe95ecc test: remove gtest & its infra.
thorvg is going to use catch2 framework, this is a cleanup work
before introducing catch2 utc.

See Catch2:
https://github.com/catchorg/Catch2/tree/v2.x
2021-06-03 17:38:07 +09:00
Hermet Park
9e725226da
meson: revise png loader meson script.
We hate spagettie code, not even build script.
this revise it to keep the build script consistency.
2021-04-02 12:49:18 +09:00
Mateusz Palkowski
832568e07a Added libpng based png loading 2021-04-01 19:38:00 +09:00
Hermet Park
cee1348a44 svg_loader XmlParser: code refactoring.
just renamed _nodeTypeToString() -> xmlParserNodeTypeToString()

+ print meson message if log is enabled.
2020-12-17 16:11:09 +09:00