Commit graph

2053 commits

Author SHA1 Message Date
Hermet Park
7c58d7afaa common frame_module: adds FrameModule interface.
This interface is designed for controlling animation frames.
2023-07-27 00:31:27 +09:00
Hermet Park
0f40eb90ae common loader: adds animatable() interface
This interface returns a value indicating
whether the current loader supports animation or not.
2023-07-27 00:31:27 +09:00
Hermet Park
250e2d7d34 loader lottie: +rapidjson for lottie json parser.
We've investigated two json parsers, simdjson & rapidjson.
Since the size is higer priorty for thorvg, we adopted rapidjson.

It's under MIT license.

See: https://github.com/Tencent/rapidjson
2023-07-27 00:31:27 +09:00
Hermet Park
de6df1fb21 loader svg: --compiler warning
warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
2023-07-26 00:46:30 +09:00
Mira Grudzinska
de41853bcf svg_loader: custom strndup moved into utils
The custom _strndup was used only in one file
as an internal function and wasn't accessible
in other parts of the code. Now function
is available as svgUtilStrndup.
2023-07-26 00:21:56 +09:00
Hermet Park
a1f0b06f41 common array: revise code.
maintain code with an optimial size.
2023-07-25 19:57:12 +09:00
Hermet Park
055daed3f3 common shape: add an internal method to forcibly update the properties.
This internal access assists in performing direct property updates
among the engine's internal objects.
2023-07-25 19:57:12 +09:00
Hermet Park
192d29fa8a common array: enhance the features.
Add a push() method that appends a whole array instance.
2023-07-25 19:57:12 +09:00
Hermet Park
d53d8d726f common bezier: enhancement to the common Bezier function
Add a method that returns the angle at position 't'.
also revise bezAt() method to allow optimal usages.
2023-07-25 19:57:12 +09:00
Mira Grudzinska
20cf8c6725 sw_engine: fix compiler warning
Warning: comparison of integer expressions of different signedness

@Issue: https://github.com/thorvg/thorvg/issues/1526
2023-07-24 01:44:24 +02:00
Hermet Park
ea4f28e5db
Update README.md 2023-07-23 14:32:24 +09:00
Hermet Park
56deda19fd
Update README.md 2023-07-23 14:27:48 +09:00
Hermet Park
0e86cfebba sw_engine raster: ++strict types. 2023-07-19 21:57:04 +09:00
Hermet Park
251c97b2d8
Update README.md 2023-07-19 20:30:56 +09:00
Hermet Park
5f8c79f593
Update README.md 2023-07-19 20:29:45 +09:00
Hermet Park
d99d8a565f common array: fix a wrong size. 2023-07-18 15:09:21 +09:00
Hermet Park
463fc853be examples webp: --compiler warning.
1 warning generated.
[122/183] Compiling C++ object src/examples/PictureWebp.p/PictureWebp.cpp.o
../thorvg-git/src/examples/PictureWebp.cpp:38:18: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
    canvas->push(move(bg));
                 ^
                 std::
../thorvg-git/src/examples/PictureWebp.cpp:53:26: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        if (canvas->push(move(picture)) != tvg::Result::Success) return;
                         ^
                         std::
../thorvg-git/src/examples/PictureWebp.cpp:77:18: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
    canvas->push(move(picture));
                 ^
                 std::
2023-07-18 11:02:26 +09:00
Hermet Park
952bc01c41 sw_engine: fix clang compiler warnings.
[29/73] Compiling C++ object src/libthorvg.a.p/lib_sw_engine_tvgSwStroke.cpp.obj
../src/lib/sw_engine/tvgSwStroke.cpp(258): warning C4244: 'argument': conversion from 'float' to 'int64_t', possible loss of data
[32/73] Compiling C++ object src/libthorvg.a.p/lib_sw_engine_tvgSwRaster.cpp.obj
../src/lib/sw_engine/tvgSwRaster.cpp(259): warning C4244: 'initializing': conversion from 'float' to 'uint32_t', possible loss of data
../src/lib/sw_engine/tvgSwRaster.cpp(260): warning C4244: 'initializing': conversion from 'float' to 'uint32_t', possible loss of data
2023-07-18 10:45:52 +09:00
Hermet Park
cf09ba5abd common sw_engine: code refactoring
Even though this enlarges the binary size by 300bytes,
use the array instead of individual implementations for better maintenance.
2023-07-17 20:14:58 +09:00
Hermet Park
5528eb9831 common array: code chores.
remove duplicated logic
this also changes the default grow size: N*2 -> N+(N/2)
2023-07-17 20:14:58 +09:00
Vincenzo Pupillo
c3af682f68 Refactoring of GlGeometry::decomposeOutline due to an internal change in RenderShape data structure. 2023-07-15 11:13:56 +09:00
Hermet Park
d7058e41e4 common bezier: fix a regression bug.
revert issued code from def6393d82.
2023-07-12 20:50:58 +09:00
Hermet Park
def6393d82 common bezier: Add a function that returns the position.
A utility for common use of the Bezier curve.
2023-07-11 18:35:33 +09:00
Hermet Park
81afba5035 infra: updated git setting.
@Issue: https://github.com/thorvg/thorvg/issues/1519
2023-07-10 12:36:46 +09:00
Hermet Park
3db78984da
Update README.md 2023-07-05 23:12:32 +09:00
Hermet Park
e3b1cd86f9
Update README.md 2023-07-05 23:09:13 +09:00
Hermet Park
46aa29781a common math: enhance matrix functions.
Accumulating matrix value factors would have broader usage.
2023-07-05 15:17:04 +09:00
Hermet Park
b81b23af62 common array: allow it to modify values. 2023-07-05 15:17:04 +09:00
Hermet Park
accb8c5699 svg loader: --compiler warnings
../src/loaders/svg/tvgSvgLoader.cpp: In function ‘void _copyAttr(SvgNode*, const SvgNode*)’:
../src/loaders/svg/tvgSvgLoader.cpp:2911:44: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
 2911 |             if (to->node.polygon.pts.count = from->node.polygon.pts.count) {
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/loaders/svg/tvgSvgLoader.cpp:2917:45: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
 2917 |             if (to->node.polyline.pts.count = from->node.polyline.pts.count) {
2023-07-04 01:17:25 +09:00
Hermet Park
d72d6aa51f loader svg: code cleanup
Use array instead of individual dynamic array implementation.
This also fixes wrong polygon & polyline data access during copy & paste...
2023-07-04 01:09:23 +09:00
Hermet Park
95ebbe4339 common array: + copy constructor
introduce the copy constructor to prevent duplicated code.
2023-07-04 01:09:23 +09:00
Hermet Park
b7dfe661b5 common: --unnecessary null check. 2023-07-03 15:49:16 +09:00
Hermet Park
1c824ed191 common: code refactoring
Replace individual array implementation with a common feature.
2023-07-03 14:20:05 +09:00
Vincenzo Pupillo
5f64baf642 Avx raster refactoring due to an internal change to support blending
methods.
2023-07-01 12:42:24 +09:00
Vincent Torri
dabd15c4c5 tvgArray: return a const reference for const methods 2023-06-30 17:18:04 +09:00
Hermet Park
36b311f0ca
Update README.md 2023-06-29 23:27:49 +09:00
Hermet Park
80f1720821
Update README.md
+codefactor badge
2023-06-29 23:26:55 +09:00
Hermet Park
b876427325 common array: revise the interface.
Implement a pair of access methods: last() and first().
2023-06-29 20:40:16 +09:00
Hermet Park
65f178620e
Update CODEOWNERS 2023-06-29 20:36:37 +09:00
Hermet Park
ec30301aec common shape: +tiny opimization.
don't update a frame, if the color is not changed.
2023-06-27 18:44:02 +09:00
Hermet Park
dce14a8449 common: promote MULTIPLY() to a common helper macro.
it's useful among the modules.
2023-06-27 18:44:02 +09:00
Hermet Park
4482664740 common array: ++enhance the usability.
+ end() which indicates the end of the data pointer.
2023-06-26 14:58:30 +09:00
Hermet Park
bd87f1398c common array: ++enhance the usability.
add last() which indicates the last element pointer.
2023-06-23 16:49:39 +09:00
Hermet Park
3fa33c0315
Update README.md
+ binary size badge
2023-06-20 23:56:46 +09:00
Hermet Park
be1984982e example stack: updated sample.
use paints() method instead of grabbing a manual list.

@Issue: https://github.com/thorvg/thorvg/issues/1501
2023-06-20 15:48:02 +09:00
Hermet Park
caa214e4db sw_engine: code refactoring.
Renamed internal methods; the name 'RGBA' is sometimes confusing
because the channel composition does not accurately reflect it.

Therefore, it should be removed or replaced with 'Pixel'.
2023-06-20 14:57:01 +09:00
Hermet Park
00a87825b9 sw_engine: optimize code.
Considering the fundamental scenario,
the masking feature would likely be used less frequently.

We sacrifice a small amount of performance
by substituting the multiple implementations with blender calls.

However, this trade-off can result in a reduction in binary size.

Bin size: 212089 -> 205907 (-6kb)
2023-06-20 14:57:01 +09:00
Hermet Park
5f4ee24dc6 updated AUTHORS 2023-06-20 11:40:50 +09:00
Hermet Park
3512beab9f test: ++blending 2023-06-20 11:30:18 +09:00
Hermet Park
f36455048a examples: add SceneBlending 2023-06-20 11:30:18 +09:00