Hermet Park [Fri, 30 Apr 2021 10:33:17 +0000 (19:33 +0900)]
enable capi binding in tizen.
Tizen needs to use capi for efl integration.
Change-Id: I238e416c9397a6596ae0e028a304569411baefee
Hermet Park [Fri, 30 Apr 2021 10:02:06 +0000 (19:02 +0900)]
infra: disable capi in default.
capi is not mandatory option in v0.1.
we can manually toggle it on when it's necessary.
Change-Id: If76d310b411e27129b2bf2a3c728872b305b6b4b
Hermet Park [Fri, 30 Apr 2021 09:53:20 +0000 (18:53 +0900)]
doc: polish up api documentation.
JunsuChoi [Thu, 29 Apr 2021 06:05:30 +0000 (15:05 +0900)]
doc common: Add enum and struct docs in capi
JunsuChoi [Thu, 29 Apr 2021 05:21:07 +0000 (14:21 +0900)]
doc common: Groupping c APIs
C APIs
- Initializer
- Canvas
- SwCanvas
- Paint
- Shape
- Gradient
- Picture
- Scene
Mira Grudzinska [Wed, 28 Apr 2021 12:10:25 +0000 (14:10 +0200)]
sw_engine: fixing overlapping masks
The buffer to which the mask is rastered is only partially cleared.
If the object to which the mask is applied overlaps an area where
another mask was used, an erroneous image is generated. The buffer
clearing area has been increased to the size of the object to which
the mask is applied.
JunsuChoi [Thu, 29 Apr 2021 02:36:12 +0000 (11:36 +0900)]
doc common: Add grouping of C++ api and C api
group ThorVG C++ APIs
group ThorVGCapi C APIs
Michal Szczecinski [Fri, 16 Apr 2021 06:37:40 +0000 (08:37 +0200)]
capi: Added Inverted Alpha Mask composition enumeration.
Added missing composite method. Backend supports this compostion type.
Change-Id: I941e9da3ef325e639c2168b8d0ddc59aba8c2d7a
Mira Grudzinska [Wed, 28 Apr 2021 13:03:37 +0000 (15:03 +0200)]
doc common: change of the return value in the composite API
Mira Grudzinska [Sun, 25 Apr 2021 21:40:03 +0000 (23:40 +0200)]
common paint: changed result in composite API
A possible error is due to erroneous arguments, so
InvalidArgument is return instead of InsufficientCondition
JunsuChoi [Mon, 26 Apr 2021 07:20:35 +0000 (16:20 +0900)]
infra Actions: If no coding style error, no comment
and change action name
Mira Grudzinska [Mon, 26 Apr 2021 19:18:44 +0000 (21:18 +0200)]
doc common: adding the documentation for the C++ APIs
Added the missing descriptions for Sw/Gl/Canvas and Initializer.
@retval command applied.
JunsuChoi [Tue, 27 Apr 2021 00:39:03 +0000 (09:39 +0900)]
doc README: Update build status badge
The badge provided by travis-ci is no longer used.
Use the badge provided by github action.
Hermet Park [Wed, 28 Apr 2021 04:40:14 +0000 (13:40 +0900)]
bump up v0.1.3
Change-Id: If6c037defcf1c240797ae315614aad89dad365a6
JunsuChoi [Tue, 27 Apr 2021 02:21:16 +0000 (11:21 +0900)]
doc common: Fix typo and missing parameter
JunsuChoi [Mon, 26 Apr 2021 07:25:21 +0000 (16:25 +0900)]
infra Travis: Remove travis-ci build test
We don't need to build test with travis-ci.
The build test is already being worked in the github-action.
In addition, travis-ci causes unnecessary failures because the recent request count is not properly counted.
Mira Grudzinska [Fri, 23 Apr 2021 01:05:24 +0000 (03:05 +0200)]
doc common: adding the documentation for the C++ APIs
The descriptions have been changed and new ones added.
There are still few apis for which descriptions are missing.
JunsuChoi [Thu, 15 Apr 2021 09:32:58 +0000 (02:32 -0700)]
doc common: Draft documentation for C++ header APIs
Write documentation for some of the APIs that have already been cleared up.
Hermet Park [Tue, 20 Apr 2021 11:32:22 +0000 (20:32 +0900)]
loaders svg: code refactoring
split functions as its purpose.
JunsuChoi [Thu, 15 Apr 2021 06:24:56 +0000 (23:24 -0700)]
loader SvgLoader: Fix wrong debug log
1.
Modify that attribute information used for use type
looks like it was used for g type.
2.
Fix clippath node looking like setting "none"
(clippath's display = false is intentional)
Hermet Park [Tue, 20 Apr 2021 11:12:05 +0000 (20:12 +0900)]
Revert "** Temporary patch for diagnosing some hideous bugs in Tizen **"
This reverts commit
9996be4c047b5b3b9ced9fabe3c4b888ed795cff.
Change-Id: Ib5f0ee8c5d63012863d22e3ba051278be6e99982
JunsuChoi [Tue, 20 Apr 2021 09:01:04 +0000 (18:01 +0900)]
loader SvgLoader: add locale-independent strtof function
strtof's behavior is changed by system locale.
https://linux.die.net/man/3/strtof
Because of this, strtof(10.0000) returns 0.0 in some locales.
When a given value string is locale-independent, strtof has to be
replaced to custom function.
Change-Id: I0166c434990ef8b692f0007d24112aa61c6ef679
Hermet Park [Tue, 20 Apr 2021 08:55:18 +0000 (17:55 +0900)]
bump up v0.1.2
Change-Id: Ia351fa777c21654308ae0d717feddbcfa24592ab
Hermet Park [Tue, 20 Apr 2021 08:43:16 +0000 (17:43 +0900)]
loaders svg: ++safety
prevent buffer overflow just in case.
Change-Id: I58e079d00b4840437632716c3cdd0deea144c5c6
Hermet Park [Mon, 19 Apr 2021 02:45:14 +0000 (11:45 +0900)]
resolve some unpexpected code involving while upstream code sync.
Change-Id: Ie818f1db73e997bf6d7eaae24cf55303c55eceba
Hermet Park [Mon, 19 Apr 2021 01:48:56 +0000 (10:48 +0900)]
bump up v0.1.2
Change-Id: Ia3f1dddf6c27fbe3894df637f15d8d9b55f7710c
Mira Grudzinska [Tue, 13 Apr 2021 23:19:33 +0000 (01:19 +0200)]
loader svg: displaying SVG images without the specified viewBox attribute
If no viewBox attribute is given, the height and width attributes are used
to establish the viewBox size. However, this information was not available
inside the scene builder, even though it was needed.
Change-Id: Icf5a74936d26de5f10c3a3eb428c7800749c1e9d
Hermet Park [Thu, 15 Apr 2021 09:26:11 +0000 (18:26 +0900)]
common: code refactoring.
renamed internal function, no logical changes.
Change-Id: Iea738826315a2f02f6d4f9d56b81a55379c09738
Mira Grudzinska [Wed, 14 Apr 2021 12:45:52 +0000 (14:45 +0200)]
sw_engine: adding a check before stroke fill dereference
The crash was observed for empty shapes.
Change-Id: Ie1a38ebae6a6877caaf307bddcf93dd4ee07bd8d
Hermet Park [Wed, 14 Apr 2021 11:16:19 +0000 (20:16 +0900)]
common initializer: counting engine init count properly.
Manage the reference count in common so that
all common resources can be initialized/terminated identically.
Change-Id: Ica05c031774d212c068bb055aa8f74123d9915dc
Mira Grudzinska [Tue, 13 Apr 2021 11:12:53 +0000 (13:12 +0200)]
examples: ignoring pictures other than svgs in Stress.cpp
The picture->size() function does not work for raw/png pictures.
As a consequence enabling both, the svg and png file loaders,
resulted in the unintended behavior of the example.
Hermet Park [Wed, 14 Apr 2021 02:50:09 +0000 (11:50 +0900)]
** Temporary patch for diagnosing some hideous bugs in Tizen **
This patch puts some prints for analizing a crash issue,
it must be reverted after fixing it.
Change-Id: Iac2db25da27aa85dcfef19d05ced887d821584de
JunsuChoi [Tue, 13 Apr 2021 09:34:14 +0000 (18:34 +0900)]
loader SvgLoader: Fix for coding convention
Change-Id: I0c6852eef9d19a8a58d1912ff54084a9c2b2c13d
JunsuChoi [Tue, 13 Apr 2021 09:30:04 +0000 (18:30 +0900)]
loader SvgLoader: return null if transform attribute invalid
In transform matrix parsing, null is returned if any of the matrices are invalid.
Hermet Park [Tue, 13 Apr 2021 08:17:13 +0000 (17:17 +0900)]
loaders svg: fix a wrongly handles the corner case.
Stop the internel loop quick as possible, and state must be reset.
Hermet Park [Tue, 13 Apr 2021 08:05:08 +0000 (17:05 +0900)]
loaders svg: code refactoring.
keep it clean & neat within tvg coding convention.
Hermet Park [Fri, 9 Apr 2021 13:18:57 +0000 (22:18 +0900)]
wasm: fix compile errors.
Hermet Park [Fri, 9 Apr 2021 12:42:12 +0000 (21:42 +0900)]
sync versioning 0.1.0
Change-Id: I6b4eb3d603963d68b01bcf398f59e336ad18e46d
Hermet Park [Fri, 9 Apr 2021 12:27:38 +0000 (21:27 +0900)]
bump up v0.0.7
Change-Id: I3e8d10dc94f2931b2898a02c86d851a964f0acb6
Hermet Park [Fri, 9 Apr 2021 11:50:01 +0000 (20:50 +0900)]
loader svg: fix composition(mask/clip) issue.
composition target missed transform of its source.
That brings incorrect composition area.
This fixes it.
Change-Id: I7e1adc225af2c0177581b3505288de50d77cc411
Mira Grudzinska [Fri, 9 Apr 2021 10:34:56 +0000 (12:34 +0200)]
sw_engine: fixing stroke gradient
Instead of checking the stroke's fill, the shape's fill was checked.
As a result the improper rastering function was called (or none).
Hermet Park [Fri, 9 Apr 2021 07:44:46 +0000 (16:44 +0900)]
loaders svg: set default color for composition paint.
not only clippath but alpha compositions might also have any valid color.
Set it default and let it override values while appending shapes if it's necessary.
Hermet Park [Fri, 9 Apr 2021 06:57:32 +0000 (15:57 +0900)]
loaders svg: prevent composition setting if the result shape is invalid.
Current loader could return invalid shapes -default, from _appendShape()-
by a certain interpretation result,
Though it's a wrong or exception case, we can prevent worse case by avoiding it.
Hermet Park [Fri, 9 Apr 2021 06:34:34 +0000 (15:34 +0900)]
loaders svg: code refactoring
clean up code and remove unnecessary internal class.
this also helps to reduce binary size by 5.5kb
no logical changes.
Hermet Park [Fri, 9 Apr 2021 02:02:35 +0000 (11:02 +0900)]
loaders svg: ++ log info for wrong situation.
if either log is printed, we need to improve the composition method.
Hermet Park [Thu, 8 Apr 2021 11:47:57 +0000 (20:47 +0900)]
loaders svg: code refactoring
++ clean code.
Hermet Park [Thu, 8 Apr 2021 08:39:51 +0000 (17:39 +0900)]
loaders svg: fix invalid clip path result.
tvg engine expects the valid clippath with valid colors,
loaders set any colors values to enable it.
this fixes invalid clippath behavior.
Hermet Park [Thu, 8 Apr 2021 05:15:23 +0000 (14:15 +0900)]
sw_engine: fix GradientStroke crash
++ strict null check.
Mira Grudzinska [Wed, 7 Apr 2021 13:29:22 +0000 (15:29 +0200)]
sw_engine raster: adding antialiasing to the gradient rastering functions
The gradient rastering functions with composition did not take
antialiasing into account. The missing part has been added.
Mira Grudzinska [Wed, 7 Apr 2021 13:16:42 +0000 (15:16 +0200)]
sw_engine raster: refactoring the gradient rastering functions
The gradient rastering functions have been splitted into translucent
and opaque.
Mira Grudzinska [Sun, 4 Apr 2021 15:09:00 +0000 (17:09 +0200)]
sw_engine: rastering the opaque radial gradient with masking
In the radial gradient rastering functions, the part supporting
the (inverse) masking was added.
Mira Grudzinska [Thu, 1 Apr 2021 23:41:51 +0000 (01:41 +0200)]
sw_engine: removed unnecessary function parameter
In the fillFetchLinear function the offset parameter was removed.
The destination address may be shifted directly in the dst parameter,
it doesn't need to be passed separately.
Hermet Park [Wed, 7 Apr 2021 12:13:29 +0000 (21:13 +0900)]
binary optimization
remove inlining to reduce size by 22kb.
Change-Id: I1036e28cac2de5d42f8a7a08b09897c1fb3dc5a6
Hermet Park [Tue, 6 Apr 2021 13:27:05 +0000 (22:27 +0900)]
common paint: fix wrong fast clippath logic.
it missed to check clippath's transform in fasttrack logic.
now it additionally check it...
Hermet Park [Mon, 5 Apr 2021 13:33:05 +0000 (22:33 +0900)]
Update README.md
Hermet Park [Mon, 5 Apr 2021 08:15:37 +0000 (17:15 +0900)]
sw_engine raster: ++ precise alpha multiplying
previously alpha multiplying operation doesn't have perfect precision,
could loss 1 pixel since it divides 255 values by 256.
This improved operation comply with both precision & performance.
Hermet Park [Fri, 2 Apr 2021 04:30:53 +0000 (13:30 +0900)]
Update CONTRIBUTING.md
Hermet Park [Thu, 1 Apr 2021 12:09:41 +0000 (21:09 +0900)]
loader png: code refactoring
Seperate behaviors open/read/close,
free/close pngimage properly,
add copyright for files.
There still left one optimization point by applying Task.
Hermet Park [Fri, 2 Apr 2021 03:49:18 +0000 (12:49 +0900)]
meson: revise png loader meson script.
We hate spagettie code, not even build script.
this revise it to keep the build script consistency.
Mira Grudzinska [Wed, 31 Mar 2021 23:26:54 +0000 (01:26 +0200)]
sw_engine: unnecessary memory allocation and variables has been removed
Hermet Park [Thu, 1 Apr 2021 11:34:54 +0000 (20:34 +0900)]
loader loaderMgr: add a useful debug message.
Print info if file format is not supported.
Hermet Park [Thu, 1 Apr 2021 11:03:57 +0000 (20:03 +0900)]
examples: revise picture sample code.
Mateusz Palkowski [Mon, 22 Mar 2021 09:33:51 +0000 (10:33 +0100)]
minor fixes
Mateusz Palkowski [Thu, 11 Mar 2021 12:52:24 +0000 (13:52 +0100)]
Added png loading example
Mateusz Palkowski [Mon, 8 Mar 2021 12:38:37 +0000 (13:38 +0100)]
Added libpng based png loading
Hermet Park [Thu, 1 Apr 2021 07:00:39 +0000 (16:00 +0900)]
bump up version
Change-Id: I96c3b3c8d32e0d9d62fdff44a3f6329c0abcb31b
Mira Grudzinska [Thu, 1 Apr 2021 01:09:43 +0000 (03:09 +0200)]
sw_engine: fixing linear gradient rastering for shapes with composition
Masking and Inverse masking are for now rastered properly only for the linear
gradients without the opacity.
Change-Id: Ie37ac7650586e199083affdf8c52b62dbb41c160
Patryk Kaczmarek [Sun, 21 Mar 2021 00:56:33 +0000 (01:56 +0100)]
gradients: paint linerar gradients properly with mask composition method
@Issues: 243
Change-Id: Ie26a0b903af94a46683348e3fb7d8b554576997c
Mira Grudzinska [Tue, 30 Mar 2021 23:24:32 +0000 (01:24 +0200)]
capi: changing function name
For uniformity of the functions naming the function name
tvg_shape_stroke_get_gradient changed to tvg_shape_get_stroke_gradient.
Change-Id: Iebceab1c01e135534c182d00f88b2bda4d5fea4a
Hermet Park [Mon, 29 Mar 2021 02:26:03 +0000 (11:26 +0900)]
bump up version
Change-Id: I3d781585fb50498ab660c0d38a41866dedfa20eb
Hermet Park [Fri, 26 Mar 2021 10:37:48 +0000 (19:37 +0900)]
doc: update sample images.
Change-Id: Idc5035f61452f2dd39115c4deb994bd587fe1569
Hermet Park [Fri, 26 Mar 2021 10:35:26 +0000 (19:35 +0900)]
Update README.md
Hermet Park [Fri, 26 Mar 2021 08:24:43 +0000 (17:24 +0900)]
common: fix wrong viewport region.
in the clip rect, viewport must be accumulated to the smaller one.
this patch improves that corner-case.
Hermet Park [Fri, 26 Mar 2021 07:59:52 +0000 (16:59 +0900)]
common sw_engine: optimize single rectangle ClipPath.
If ClipPath is a singular rectangle,
we don't need to apply this to all children nodes to adjust rle span regions.
Rather than its regular sequence,
we can adjust render region as merging viewport that is introduced internally,
All in all,
If a Paint has a single ClipPath that is Rectangle,
it sets viewport with Rectangle area that viewport is applied to
raster engine to cut off the rendering boundary.
In the normal case it brings trivial effects.
but when use SVGs which has a viewbox, it could increase the performance
up to 10% (profiled with 200 svgs rendering at the same time)
Note that, this won't be applied if the Paint has affine or rotation transform.
@Issues: 294
Hermet Park [Wed, 24 Mar 2021 09:48:39 +0000 (18:48 +0900)]
sw_engine: code refactoring
1. unified clip & bounding box in rle processing
2. unified outline boundingbox functions between shape & image.
Hermet Park [Wed, 24 Mar 2021 05:19:01 +0000 (14:19 +0900)]
examples: allow a desianted main thread capacity.
Maximum threads is not always peak the highest performance,
tvg examples guide user the proper threads count.
Hermet Park [Tue, 23 Mar 2021 07:35:22 +0000 (16:35 +0900)]
common paint: fix memory leak case.
free the previous composition target if any,
before reset with the new one.
Hermet Park [Tue, 23 Mar 2021 05:31:58 +0000 (14:31 +0900)]
updated copyright
Hermet Park [Tue, 23 Mar 2021 05:18:17 +0000 (14:18 +0900)]
common engines: code refactoring
Introduce RenderRegion structure for region data
to simplify the methods paratemers.
also depends on the NRVO for the return data.
Mira Grudzinska [Tue, 23 Mar 2021 00:22:46 +0000 (01:22 +0100)]
svg_loader: ommiting xml entities in the svg file (#278)
SVG files created using 'sketch' may contain xml entities,
which are not understandable by the svg loader.
For now only '"' is ommited.
Hermet Park [Mon, 22 Mar 2021 07:28:08 +0000 (16:28 +0900)]
loader svg: fix coding convention
Hermet Park [Mon, 22 Mar 2021 04:52:43 +0000 (13:52 +0900)]
examples: revise StrokeGradient
renamed GradientStroke & repositioned visuals.
Hermet Park [Mon, 22 Mar 2021 04:19:49 +0000 (13:19 +0900)]
bump up version
Change-Id: I0026c758712b068949d61556ca202786627a9fe5
Mira Grudzinska [Thu, 11 Mar 2021 16:20:41 +0000 (17:20 +0100)]
svg_loader: applying AlphaMask during scene building
The AlphaMask composition case was omitted in the _sceneBuilderHelper().
Hermet Park [Fri, 19 Mar 2021 07:30:45 +0000 (16:30 +0900)]
initializer: add reference counting for the engines initialization.
Introduced the reference counting for the backend engines so that
tvg prevents unpaired engine initialization/termination calls by user mistake.
@Issues: 296
Hermet Park [Fri, 19 Mar 2021 10:41:18 +0000 (19:41 +0900)]
common picture: fix crash at picture duplication.
A duplicated picture needs to access internal picture loader data
to get its properties while rasterizing.
But it missed the loader since it's not copied from origin.
Thus, we fix this by sharing the internal loader among the duplications and origin.
@Examples: Duplicate
Mira Grudzinska [Sun, 14 Mar 2021 20:50:00 +0000 (21:50 +0100)]
paint: clip was substracted from the array for any composite method
Only ClipPath composite method should cause clips subtraction.
Michal Szczecinski [Tue, 16 Mar 2021 11:00:00 +0000 (12:00 +0100)]
common shape: Fixed appendArc for negative values.
Description:
Fixed appendArc API for -90 angles. In that case it was drawn in wrong
direction.
@Examples
```cpp
float x = 40.0, y = 40.0;
auto shape1 = tvg::Shape::gen();
//OK
shape1->appendArc(x + 50, y, 25, 0, -91, false);
//NOK
shape1->appendArc(x + 100, y, 25, 0, -90, false);
//OK
shape1->appendArc(x + 150, y, 25, 0, -89, false);
```
Change-Id: Ic9cba89b44e170b3a1411e7d126c912a9fb135d5
Hermet Park [Tue, 16 Mar 2021 04:29:16 +0000 (13:29 +0900)]
loaders svg: remove unnecessary move call, move is guaranteed at the return value.
warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
Hermet Park [Tue, 16 Mar 2021 01:23:11 +0000 (10:23 +0900)]
sw_engine: optimize rle clipping
We don't need to copy the rle data unecessarily,
we can just replace the completed clip rle.
Change-Id: I099a071bdc83937d3a942fc5d08ff2c2d72f96ac
Hermet Park [Mon, 15 Mar 2021 10:19:54 +0000 (19:19 +0900)]
examples: clean up mask resources.
These are not proper for our svg examples.
JunsuChoi [Mon, 15 Mar 2021 06:05:24 +0000 (15:05 +0900)]
sw_engine rleClipPath: Modify clippath spans creation size.
When updating rle for clipped area, realloc size should be larger than spans size.
so this patch prevents the problem while realloc.
JunsuChoi [Mon, 15 Mar 2021 05:56:36 +0000 (14:56 +0900)]
loader SvgSceneBuilder: Add root node to clipping viewBox.
If the boundary of scene created through the scenebuilder is larger than the viewbox,
scene(SVG's root) should be clipped to the size of the viewbox.
So, if scene need a clip, add a parent root and add clippath composition to that root.
Hermet Park [Mon, 15 Mar 2021 05:50:29 +0000 (14:50 +0900)]
bump up version.
Change-Id: I33545ca3d2e437d43471b080cc60a39e52a28bf6
Hermet Park [Fri, 12 Mar 2021 09:00:47 +0000 (18:00 +0900)]
common shape: revise Shape::reset() api.
reset Path is useful rather than reset all properties.
Change-Id: Ic62eaecf9e4129f2ada790ebef6745e7be85db4c
Hermet Park [Fri, 12 Mar 2021 09:09:19 +0000 (18:09 +0900)]
This is too untable.... Stress in example is crashed by this.
Revert "svg_loader: limiting the ploted area of svg to viewBox"
This reverts commit
2bb108b2f13432ac140d9be08daae189fe9c61c5.
Change-Id: Iec82290d6ca080d868471275bc83663adbaf4b56
Hermet Park [Fri, 12 Mar 2021 02:50:46 +0000 (11:50 +0900)]
common canvas: initialize member variable.
to shutdown the static code analizer report.
Change-Id: Id32127ab3caf64f1b8e34e5f3abf6780ac0d3b71
Mira Grudzinska [Sun, 7 Mar 2021 15:02:04 +0000 (16:02 +0100)]
svg_loader: limiting the ploted area of svg to viewBox
The 'viewBox' element given in the svg file determines
the coordinates of the plotted area. ClipPath used in Svg loader.
Change-Id: Idddcbce7cddfe46e2049d6741379c747e76482ed
Hermet Park [Thu, 11 Mar 2021 11:10:11 +0000 (20:10 +0900)]
sw_engine fill: correct value loss by data conversion.
Hermet Park [Thu, 11 Mar 2021 10:05:18 +0000 (19:05 +0900)]
revert unintended code changes while upstream code sync.
Change-Id: I5c95954a470d5a1f330f3044e254b896d445426c