platform/core/graphics/tizenvg.git
2 years agobump up version v0.4.5 48/264348/2 submit/tizen/20210916.114427
JunsuChoi [Thu, 16 Sep 2021 08:27:45 +0000 (17:27 +0900)]
bump up version v0.4.5

Change-Id: I01805f967fff75c9d2051c95b38b8e9a7427f02a

2 years agoprepare to release tvg format feature.
Hermet Park [Thu, 16 Sep 2021 04:42:09 +0000 (13:42 +0900)]
prepare to release tvg format feature.

Change-Id: Ie0a9f66a1415dd8d4395e4b537f5b7c39821acb9

2 years agotvg_saver: code refactoring
Hermet Park [Thu, 16 Sep 2021 05:50:33 +0000 (14:50 +0900)]
tvg_saver: code refactoring

removed the duplicated given child transform code,

no logical changes actually.

Change-Id: I70a097cae89150b074fa2e12b1c7175acaf27c89

2 years agoexamples: updated tvg resources.
Hermet Park [Thu, 16 Sep 2021 03:47:05 +0000 (12:47 +0900)]
examples: updated tvg resources.

Change-Id: Ie825b6002eb4a8b8884b00e57b4cdad85d53aab7

2 years agotvg_saver: proper serialization of a grad fill
Mira Grudzinska [Sat, 11 Sep 2021 09:14:00 +0000 (11:14 +0200)]
tvg_saver: proper serialization of a grad fill

In the case when a gradinet fill is present, the transformation matrix
can't be preapplied.

Change-Id: I3346a351a488a7685443eae64c901f4cf185b005

2 years agosw_engine: Fixed build errors.
Michal Szczecinski [Wed, 15 Sep 2021 13:17:25 +0000 (15:17 +0200)]
sw_engine: Fixed build errors.

Change-Id: Id48353d69550fe6e5ec39216d2ba1562f5a0bdc7

2 years ago[Tizen] Remove html files for docs 21/264321/1
JunsuChoi [Thu, 16 Sep 2021 03:41:08 +0000 (12:41 +0900)]
[Tizen] Remove html files for docs

These are all generated files from DoxyWizard.

Change-Id: Id72ca009a991494b998ac90363271de3f6c2dfbf

2 years agotvg_saver: do not merge if the shapes have outlines.
Hermet Park [Wed, 15 Sep 2021 12:05:20 +0000 (21:05 +0900)]
tvg_saver: do not merge if the shapes have outlines.

Merged shapes with outlines expects the layered,
unfortunately tvg can't cover the situation.

@Issues: https://github.com/Samsung/thorvg/issues/783

2 years agoexamples: updated favorite tvg to fix position issue.
Hermet Park [Wed, 15 Sep 2021 11:06:20 +0000 (20:06 +0900)]
examples: updated favorite tvg to fix position issue.

2 years agoexamples: updated tvg resources
Hermet Park [Wed, 15 Sep 2021 10:40:59 +0000 (19:40 +0900)]
examples: updated tvg resources

these two resources were fixed by the positioning.

2 years agoexamples: updated tvg resources
Hermet Park [Wed, 15 Sep 2021 10:16:44 +0000 (19:16 +0900)]
examples: updated tvg resources

2 years agosvg_loader: proper svg resizing
Mira Grudzinska [Tue, 14 Sep 2021 23:43:45 +0000 (01:43 +0200)]
svg_loader: proper svg resizing

Solves the problem of 'vx' and 'vy' < 0 and cases with 'width'
and 'height' values different than widht and height from the 'viewBox'
attribute.

2 years agowasm: paint opacity in the layers list (#804)
Michal Maciola [Tue, 14 Sep 2021 12:27:39 +0000 (14:27 +0200)]
wasm: paint opacity in the layers list (#804)

2 years agoexamples: updated tvg sample
Hermet Park [Tue, 14 Sep 2021 10:52:44 +0000 (19:52 +0900)]
examples: updated tvg sample

2 years agoexamples: extends svg samples
Hermet Park [Mon, 13 Sep 2021 11:49:46 +0000 (20:49 +0900)]
examples: extends svg samples

2 years agosvg_saver: shifting 'preTransform' value changing
Mira Grudzinska [Fri, 10 Sep 2021 15:00:38 +0000 (17:00 +0200)]
svg_saver: shifting 'preTransform' value changing

'preTransform = false' makes sense in case a stroke exist,
so not only when the stroke-width > 0 but when it's color
is valid as well.

2 years agoexample images: added rotlines.svg (#796)
Michal Maciola [Fri, 10 Sep 2021 11:31:20 +0000 (13:31 +0200)]
example images: added rotlines.svg (#796)

2 years agowasm: improved bounds calculation (#795)
Michal Maciola [Fri, 10 Sep 2021 11:26:58 +0000 (13:26 +0200)]
wasm: improved bounds calculation (#795)

Improved bounds calculation in case a rotation is applied

2 years agoUpdate README.md
Hermet Park [Thu, 9 Sep 2021 13:30:03 +0000 (22:30 +0900)]
Update README.md

2 years agowasm: validate empty data (#790)
Michal Maciola [Thu, 9 Sep 2021 08:45:58 +0000 (10:45 +0200)]
wasm: validate empty data (#790)

2 years agowasm: remove default data (#789)
Michal Maciola [Thu, 9 Sep 2021 08:40:19 +0000 (10:40 +0200)]
wasm: remove default data (#789)

2 years agoapi: removed unused
Hermet Park [Thu, 9 Sep 2021 05:18:46 +0000 (14:18 +0900)]
api: removed unused

2 years agoWasm: allow iterator and add functions for layers revising (#730)
Michal Maciola [Thu, 9 Sep 2021 04:06:13 +0000 (06:06 +0200)]
Wasm: allow iterator and add functions for layers revising (#730)

* common: move iterator functionality into separate IteratorModule
* wasm: allow internal lib dependencies and iterator
* wasm: added functions for layers revising

This patch adds functions to thorvgwasm.cpp:
 layers() - that return a list of paints in a picture
 bounds() - that returns a bounds of a given paint
 setOpacity() - that sets the opacity of a given paint

2 years agowasm: pass mimetype on loading and store original size
Michal Maciola [Wed, 8 Sep 2021 15:05:10 +0000 (17:05 +0200)]
wasm: pass mimetype on loading and store original size

This patch adds the mimetype parameter for load() function and adds storing of
an original size after successful loading. Added function originalSize().

2 years agoapi: set default value nullptr for user convenience.
Hermet Park [Thu, 9 Sep 2021 02:57:07 +0000 (11:57 +0900)]
api: set default value nullptr for user convenience.

2 years agowasm: add force parameter for update() function
Michal Maciola [Wed, 8 Sep 2021 15:33:17 +0000 (17:33 +0200)]
wasm: add force parameter for update() function

2 years agosw_engine image: fix the clipped image issue.
Hermet Park [Wed, 8 Sep 2021 11:43:23 +0000 (20:43 +0900)]
sw_engine image: fix the clipped image issue.

there was a wrong condition introduced the bug that image was not updated,
because transformation is not re-applied after the first created the internal image data.

@Issues: https://github.com/Samsung/thorvg/issues/751

2 years agoexamples: updated a tvg resource.
Hermet Park [Thu, 9 Sep 2021 02:05:54 +0000 (11:05 +0900)]
examples: updated a tvg resource.

2 years agobump up version v0.4.4 25/263725/1 accepted/tizen/unified/20210910.004734 submit/tizen/20210909.021117
Hermet Park [Thu, 9 Sep 2021 01:56:31 +0000 (10:56 +0900)]
bump up version v0.4.4

Change-Id: I405b3b9bd42e72233226df279fb2b1a410f61bde

2 years agotvg_saver: fix the stroke width scaling factor
Mira Grudzinska [Wed, 8 Sep 2021 07:47:57 +0000 (09:47 +0200)]
tvg_saver: fix the stroke width scaling factor

To get the scaling factor from the transformation matrix we have
to use two of its elements.

2 years agoexamples tvg: added a new example to verify tvg resources.
Hermet Park [Wed, 8 Sep 2021 04:20:50 +0000 (13:20 +0900)]
examples tvg: added a new example to verify tvg resources.

These tvg resources might be updated before official release.

2 years agosw_engine: overlaping stroke cap
Mira Grudzinska [Tue, 7 Sep 2021 11:12:08 +0000 (13:12 +0200)]
sw_engine: overlaping stroke cap

A square or a round cap was mistakenly added to the parts
of the dashed lines that should be continuous. Fixed

@Issues: https://github.com/Samsung/thorvg/issues/777

2 years agotvg_saver: fix a wrong logic by mistake.
Hermet Park [Tue, 7 Sep 2021 09:54:42 +0000 (18:54 +0900)]
tvg_saver: fix a wrong logic by mistake.

an incorrect logic was introduced by mistake.

that breaks the tvg memory chunks.

now recover it.

@Issues: https://github.com/Samsung/thorvg/issues/774

2 years agotvg_loader: code refactoring.
Hermet Park [Tue, 7 Sep 2021 09:14:05 +0000 (18:14 +0900)]
tvg_loader: code refactoring.

no logical changes in the succesful cases,

change the code for better readibility.
and add log messages in the error scenario.

2 years agotvg_saver: fix the incorrect stroke transformation
Hermet Park [Tue, 7 Sep 2021 05:34:04 +0000 (14:34 +0900)]
tvg_saver: fix the incorrect stroke transformation

Saver tries to pre-transfom to skip the matrix data,
but it missed the case - transformed stroking,

we skip it also only when xy scaling factors are same excluding the dash properties,
because scaled of the stroking is depent on the engines,
we have no idea of the proper input data in advance.

@Issues: https://github.com/Samsung/thorvg/issues/773

2 years agosvg_loader: parsing flags in the elliptical arc curve
Mira Grudzinska [Mon, 6 Sep 2021 11:01:09 +0000 (13:01 +0200)]
svg_loader: parsing flags in the elliptical arc curve

Since the arc flags can have values 0 or 1, we reported as
an error cases, when a float value was given.
Since the EBNF grammar can be used, we misread some paths.
Removing the condition that prevents giving a float as a flag solves
this problem and is in agreement with the w3 specs.

2 years agotvg_saver: save the missing scene reserve count. (#771)
Hermet Park [Mon, 6 Sep 2021 06:38:18 +0000 (15:38 +0900)]
tvg_saver: save the missing scene reserve count. (#771)

This reserved count was just missed,
Aside from it, tvg_loader logic is not well organized (hard to expect)
We can refine it by recovering the data tree structure in the reverse order.

@Issues: https://github.com/Samsung/thorvg/issues/768

2 years agotvg_loader: code refactoring & optimization loading. (#772)
Hermet Park [Mon, 6 Sep 2021 06:35:11 +0000 (15:35 +0900)]
tvg_loader: code refactoring & optimization loading. (#772)

Skip the reassigning values by the flags,
We assume those property values are reserved,
leave to apis that handle the invalids if the exceptions.

2 years agosw_engine: handling clips from outside the render region
Mira Grudzinska [Thu, 2 Sep 2021 00:36:02 +0000 (02:36 +0200)]
sw_engine: handling clips from outside the render region

Clips from outside the rendering region were ignored resulting
in rendering shapes, which should be completely clipped.
In case of the clip fast track, the bounding box width/height
overflow occured and shape, that should be clipped, could be
visible (not always).

2 years agoRevert "sw_engine avx: the not aligned memory separated in the rasterRGBA32 func"
Hermet Park [Fri, 3 Sep 2021 02:07:30 +0000 (11:07 +0900)]
Revert "sw_engine avx: the not aligned memory separated in the rasterRGBA32 func"

This reverts commit dafc229a757b71feb3f67c8bf4f8073f662d6964.

2 years agosw_engine avx: the not aligned memory separated in the rasterRGBA32 func
Mira Grudzinska [Thu, 26 Aug 2021 23:50:00 +0000 (01:50 +0200)]
sw_engine avx: the not aligned memory separated in the rasterRGBA32 func

The aligned and not aligned memory parts handled separately.
This gives around 10% of the performance increase (tested on i7-8700 CPU)

2 years agoutc: testing loading and saving .tvg
Michal Maciola [Thu, 2 Sep 2021 12:57:22 +0000 (14:57 +0200)]
utc: testing loading and saving .tvg

Added tests of loading and saving .tvg.
Created testSavers.cpp. Created files tag.tvg and test.tvg. Minor change
in tag.svg.

2 years agotest SwEngine: increasing lines coverage (#767)
Mira Grudzinska [Thu, 2 Sep 2021 13:04:44 +0000 (15:04 +0200)]
test SwEngine: increasing lines coverage (#767)

All functions from tvgSwStroke.cpp called.

2 years agotest SwEngine: _rasterTranslucentRect added into the tests
Mira Grudzinska [Tue, 31 Aug 2021 10:33:56 +0000 (12:33 +0200)]
test SwEngine: _rasterTranslucentRect added into the tests

2 years agotest SwEngine: raster image functions included into the unit tests
Mira Grudzinska [Tue, 31 Aug 2021 12:40:58 +0000 (14:40 +0200)]
test SwEngine: raster image functions included into the unit tests

All image rastering funcions called in the 'Image Draw' test case.

2 years agosw_engine: calling avxRasterTranslucentRect instead of its c version
Mira Grudzinska [Tue, 31 Aug 2021 13:07:57 +0000 (15:07 +0200)]
sw_engine: calling avxRasterTranslucentRect instead of its c version

For avx vector support the avxRasterTranslucentRect should be called
instead of cRasterTranslucentRect (mischanged in 01e1fec367e0ed7cf2bb052089b12e9c406f30d8).

2 years agodocs: minor linguistic changes (#759)
Mira Grudzinska [Tue, 31 Aug 2021 13:15:03 +0000 (15:15 +0200)]
docs: minor linguistic changes (#759)

2 years agosvg2png: changed help message (#762)
Michal Maciola [Tue, 31 Aug 2021 09:19:18 +0000 (11:19 +0200)]
svg2png: changed help message (#762)

2 years agosvg2png: fixing the args interpretation (#760)
Mira Grudzinska [Tue, 31 Aug 2021 09:14:16 +0000 (11:14 +0200)]
svg2png: fixing the args interpretation (#760)

The background color was misinterpreted and its value was treated
as an svg file name (warning was returned).
The color format can not be passed in a `#ffffff` format, since
the '#' sign is used in bash to comment a line and nothiing after
it is loaded.

2 years agotvg_loader: guarantee the buffer ends with the null character
Hermet Park [Mon, 30 Aug 2021 12:21:11 +0000 (21:21 +0900)]
tvg_loader: guarantee the buffer ends with the null character

the issue is detected by asan.

2 years agosw_engine neon: refactoring
Mira Grudzinska [Mon, 30 Aug 2021 09:42:42 +0000 (11:42 +0200)]
sw_engine neon: refactoring

One if statement less.

2 years agosw_engine neon: fix the iterations number of 'neon calls'
Mira Grudzinska [Wed, 25 Aug 2021 08:49:51 +0000 (10:49 +0200)]
sw_engine neon: fix the iterations number of 'neon calls'

In the case, when the dst memory was not aligned,
we went out of the dst range in the 'neon loop'.

2 years agoREADME: updated svg2png section (#758)
Michal Maciola [Mon, 30 Aug 2021 10:40:29 +0000 (12:40 +0200)]
README: updated svg2png section (#758)

2 years agoUpdate README.md
Hermet Park [Mon, 30 Aug 2021 10:05:12 +0000 (19:05 +0900)]
Update README.md

2 years agosw_engine: code refactoring.
Hermet Park [Mon, 30 Aug 2021 07:54:43 +0000 (16:54 +0900)]
sw_engine: code refactoring.

simplify neon code and fix the wrong range access.

2 years agotvg_loader: fixed a wrong delete call. accepted/tizen/unified/20210831.143836 submit/tizen/20210830.065031
Hermet Park [Mon, 30 Aug 2021 06:35:27 +0000 (15:35 +0900)]
tvg_loader: fixed a wrong delete call.

delete is not expected here, malloc-free must be paired.

Change-Id: I25ee480a238fa86d9cd01a3d5850031c9b443a89

2 years agotvg saver: enabling gradient transformation
Mira Grudzinska [Sun, 29 Aug 2021 22:36:59 +0000 (00:36 +0200)]
tvg saver: enabling gradient transformation

A gradient transformation was omitted when saving
into the tvg format. Fixed

Change-Id: Ifca25ef9608b3cab279e645f817b2829f0b972bb

2 years agodoc: Enhance appendPath docs
JunsuChoi [Fri, 27 Aug 2021 05:14:36 +0000 (14:14 +0900)]
doc: Enhance appendPath docs

Added description according to api behavior change

Change-Id: I1abf748fa64d092e39199cbf99315586865e78a0

2 years agobump up version v0.4.3 35/263235/1 submit/tizen/20210830.054133
jykeon [Mon, 30 Aug 2021 05:54:54 +0000 (14:54 +0900)]
bump up version v0.4.3

Change-Id: Iaeecd0a7fcf617a00f1fc70e98e5914e0a9b300a
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agotvg_format: fix broken clippath region.
Hermet Park [Sat, 28 Aug 2021 12:55:51 +0000 (21:55 +0900)]
tvg_format: fix broken clippath region.

there some multiple wrong calculation about size during tvg optimiation.
this patch fixes them.

1. picture needs to return the current desired size because
it will save the transformed the geometry. the final size should be
recorvered as the base size from the loader.

2. clippath missed to multiply parents transform, it's fixed.

@Issue: https://github.com/Samsung/thorvg/issues/752

2 years agowasm: fix loading for binary files
Michal Maciola [Tue, 24 Aug 2021 12:31:26 +0000 (14:31 +0200)]
wasm: fix loading for binary files

This patch changes load function in thorvgwasm.cpp for using size()
instead of strlen(). It fixes loading of binary files like .tvg.

2 years agosw_engine shape: prevent crash when wrong pair of commands & points.
Hermet Park [Tue, 24 Aug 2021 06:04:06 +0000 (15:04 +0900)]
sw_engine shape: prevent crash when wrong pair of commands & points.

add an exception handling,
if the given points count is not matched with expected points count from commands.

@Issue: https://github.com/Samsung/thorvg/issues/735

2 years agosw_engine avx: addad ALPHA_BLEND and avxRasterTranslucentRect functions
Mira Grudzinska [Tue, 24 Aug 2021 23:19:25 +0000 (01:19 +0200)]
sw_engine avx: addad ALPHA_BLEND and avxRasterTranslucentRect functions

Both functions implemented using 128-bit registers.
avxRasterTranslucentRect is around 5 times faster than cRasterTranslucentRect (i7-8700 CPU - Coffe Lake)

2 years agowasm: intoduce saveTvg via File System API
Michal Maciola [Wed, 25 Aug 2021 12:36:35 +0000 (14:36 +0200)]
wasm: intoduce saveTvg via File System API

This patch adds saveTvg() function into thorvgwasm.cpp.
Functions saves tvg using File System API.
To enable fs, changed build flag: -s FORCE_FILESYSTEM=1.
Increase in result thorvg-wasm.js size: about 68kB to about 125kB.

2 years agotvg_loader: make sure the pointer does not exceed the size
Michal Maciola [Tue, 24 Aug 2021 12:59:54 +0000 (14:59 +0200)]
tvg_loader: make sure the pointer does not exceed the size

2 years agotvg format: fix broken encoding/decoding.
Hermet Park [Wed, 25 Aug 2021 12:41:02 +0000 (21:41 +0900)]
tvg format: fix broken encoding/decoding.

a regression bug was introduced by 52a7a257b2fb863f1e9e9292de7291b7e2986adf
in size calculation of data in case of uncompressed version.

@Issue: https://github.com/Samsung/thorvg/issues/739

2 years agocommon picture: quick fix the broken bounds() interface.
Hermet Park [Wed, 25 Aug 2021 06:17:25 +0000 (15:17 +0900)]
common picture: quick fix the broken bounds() interface.

picture must return the boundary info - 0, 0, w, h
We assume that it has a designated picture size.

Aside from this issue,
bounds() api must be reviewed, its behavior is quite in a trouble...
unless the result is not transformed, its information is useless...

@Issue: https://github.com/Samsung/thorvg/issues/741

2 years agosvg: fix opacity percentage value parsing
Michal Maciola [Thu, 19 Aug 2021 07:37:57 +0000 (09:37 +0200)]
svg: fix opacity percentage value parsing

Percentage values wasn't handled by _toOpacity() function. Other incorrect values
was handled wrongly. Now fixed.

2 years agoUpdate CONTRIBUTING.md
Hermet Park [Tue, 24 Aug 2021 11:35:06 +0000 (20:35 +0900)]
Update CONTRIBUTING.md

2 years agosw common: Added neon translucent rect API implementation.
Michal Szczecinski [Thu, 12 Aug 2021 14:02:40 +0000 (16:02 +0200)]
sw common: Added neon translucent rect API implementation.

Changes:
Added neonRasterTranslucentRect implementation. Rendering was tested on
32 lottie fiels. Without neon ~ 18.1 FPS was measured. With neon ~ 20.1
FPS was measured.

2 years agotvg_format: newly introduced for tvg data compression.
Hermet Park [Thu, 19 Aug 2021 09:37:51 +0000 (18:37 +0900)]
tvg_format: newly introduced for tvg data compression.

By choosing compress option, tvg tries to compress the data to reduce the binary size.
Since the compression has the double-edges sword, we provides an option to users
to select it by their demand. Basically, compression is better than non-compression.

After profiling, we decided to use the encoder/decoder of Guilherme R. Lampert's.

Here is the profiling result:

test.tvg: 296037 -> 243411 (-17%)
tiger.tvg: 54568 -> 50622 (-7%)
image-embedded.tvg: 2282 -> 1231 (-46%)

@Issue: https://github.com/Samsung/thorvg/issues/639

About compression method:

Lempel–Ziv–Welch (LZW) encoder/decoder by Guilherme R. Lampert

This is the compression scheme used by the GIF image format and the Unix 'compress' tool.
Main differences from this implementation is that End Of Input (EOI) and Clear Codes (CC)
are not stored in the output and the max code length in bits is 12, vs 16 in compress.

EOI is simply detected by the end of the data stream, while CC happens if the
dictionary gets filled. Data is written/read from bit streams, which handle
byte-alignment for us in a transparent way.

The decoder relies on the hardcoded data layout produced by the encoder, since
no additional reconstruction data is added to the output, so they must match.
The nice thing about LZW is that we can reconstruct the dictionary directly from
the stream of codes generated by the encoder, so this avoids storing additional
headers in the bit stream.

The output code length is variable. It starts with the minimum number of bits
required to store the base byte-sized dictionary and automatically increases
as the dictionary gets larger (it starts at 9-bits and grows to 10-bits when
code 512 is added, then 11-bits when 1024 is added, and so on). If the dictionary
is filled (4096 items for a 12-bits dictionary), the whole thing is cleared and
the process starts over. This is the main reason why the encoder and the decoder
must match perfectly, since the lengths of the codes will not be specified with
the data itself.

2 years agoUpdate README.md
Hermet Park [Tue, 24 Aug 2021 05:22:28 +0000 (14:22 +0900)]
Update README.md

2 years agores: updated images
Hermet Park [Tue, 24 Aug 2021 05:20:56 +0000 (14:20 +0900)]
res: updated images

2 years agores: updated images.
Hermet Park [Tue, 24 Aug 2021 05:19:20 +0000 (14:19 +0900)]
res: updated images.

documentation images are not updated,
remove the file first and add again.

2 years agores: updated images.
Hermet Park [Tue, 24 Aug 2021 05:13:23 +0000 (14:13 +0900)]
res: updated images.

2 years agoUpdate README.md
Hermet Park [Tue, 24 Aug 2021 05:13:02 +0000 (14:13 +0900)]
Update README.md

2 years agodisable simd option. 79/263079/2 accepted/tizen/unified/20210827.122304 submit/tizen/20210826.024535
Hermet Park [Thu, 26 Aug 2021 02:35:27 +0000 (11:35 +0900)]
disable simd option.

it has some corruption issue on tizen mobile emulator
until stabilizing it, we turn off it

Change-Id: Iaa5aaa3ef270534f4672b4dc241d9b695ad01185

2 years ago[Tizen] Enable png, jpg loader 24/262824/4
JunsuChoi [Fri, 20 Aug 2021 06:56:54 +0000 (15:56 +0900)]
[Tizen] Enable png, jpg loader

NUI's Picture class has been added, so png and jpg loaders are required.

Change-Id: If246d4105978048ea0d6d8afb3fb7f4314afba0a

2 years agoutc: increase coverage of picture and fill
Michal Maciola [Thu, 19 Aug 2021 08:57:51 +0000 (10:57 +0200)]
utc: increase coverage of picture and fill

2 years agoutc: increase coverage SwEngine
Michal Maciola [Thu, 19 Aug 2021 09:53:54 +0000 (11:53 +0200)]
utc: increase coverage SwEngine

2 years agowasm: turn off the vectorization.
Hermet Park [Fri, 20 Aug 2021 03:33:18 +0000 (12:33 +0900)]
wasm: turn off the vectorization.

We can visit this feature later when it's stable.

2 years agoutc: increase coverage up #1
Michal Maciola [Wed, 18 Aug 2021 15:07:51 +0000 (17:07 +0200)]
utc: increase coverage up #1

2 years agoutc: increase coverage up
Michal Maciola [Wed, 18 Aug 2021 13:56:59 +0000 (15:56 +0200)]
utc: increase coverage up

2 years agoinfra: simplify vector meson option.
Hermet Park [Wed, 18 Aug 2021 11:47:21 +0000 (20:47 +0900)]
infra: simplify vector meson option.

neon/avx can't be resided in together,
we replace it with a string variable.

2 years agosvg2png: enhance the feature.
Michal Maciola [Wed, 18 Aug 2021 11:29:10 +0000 (13:29 +0200)]
svg2png: enhance the feature.

Svg2png fully redesigned.
Introduced whole directory parsing. Created flags interface.

Usage:
   svg2png [svgFileName] [-r resolution] [-b bgColor]

Flags:
    -r set output image resolution.
    -b set output image background color.

Examples:
    $ svg2png input.svg
    $ svg2png input.svg -r 200x200
    $ svg2png input.svg -r 200x200 -b ff00ff
    $ svg2png input1.svg input2.svg -r 200x200 -b ff00ff

2 years agopicture: fix reloading images
Michal Maciola [Tue, 17 Aug 2021 13:03:19 +0000 (15:03 +0200)]
picture: fix reloading images

Calling picture->load after it was already once called resulted in
segmentation fault or memory leak (depending on whether the vector (svg, tvg)
or raster (jpg, png, raw) file was loaded).
This patch checks the image has already been loaded. If so, the load()
returns InsufficientCondition.

@issue: fixes #719

2 years agobuild: renamed the cpu vectorization option. accepted/tizen/unified/20210822.213320 submit/tizen/20210819.014835
Hermet Park [Wed, 18 Aug 2021 10:00:48 +0000 (19:00 +0900)]
build: renamed the cpu vectorization option.

Change-Id: Id4de4fe05dcdfc550e81479ffe93e973ef958c94

2 years agobuild: Fixed simd options detection
Michal Szczecinski [Wed, 18 Aug 2021 07:49:50 +0000 (09:49 +0200)]
build: Fixed simd options detection

Change-Id: I58816d8b8a5bedffb9d9986f96f45ddc1ca0069b

2 years agoUpdate README.md
Hermet Park [Tue, 17 Aug 2021 05:14:48 +0000 (14:14 +0900)]
Update README.md

2 years agobump up version v0.4.1 29/262629/1 submit/tizen/20210818.053418 submit/tizen/20210818.071831
Hermet Park [Tue, 17 Aug 2021 04:02:49 +0000 (13:02 +0900)]
bump up version v0.4.1

Change-Id: I7d35e83af8e3c0be08457a22c835cac85b5e2798

2 years agosw_common neon: Fix issue with unaligned memory.
Michal Szczecinski [Wed, 11 Aug 2021 14:23:04 +0000 (16:23 +0200)]
sw_common neon: Fix issue with unaligned memory.

Neon operations should be performed on memory aligned to 8 bytes.
This commit fixes this issue and increase stability of neon rasterizer.

Change-Id: I348d18137dcd973d26948916758e1e523f565503

2 years agoAdd files via upload
Hermet Park [Wed, 11 Aug 2021 15:39:36 +0000 (00:39 +0900)]
Add files via upload

2 years agoDelete example_tvgsize.png
Hermet Park [Wed, 11 Aug 2021 15:38:31 +0000 (00:38 +0900)]
Delete example_tvgsize.png

2 years agoFix build error with log option 62/262562/1
JunsuChoi [Fri, 13 Aug 2021 08:06:11 +0000 (17:06 +0900)]
Fix build error with log option

Change-Id: I716b8b72a1d050d414d6664491144d1a800bd838

2 years agosw_engine: memory optimization.
Hermet Park [Thu, 12 Aug 2021 11:06:07 +0000 (20:06 +0900)]
sw_engine: memory optimization.

Save the size of the Countour array,
16 bits is large enough to count the points number in one Shape.

2 years agosw_engine shape: fix a corner case that close tag is overwritten with a wrong value.
Hermet Park [Thu, 12 Aug 2021 10:40:59 +0000 (19:40 +0900)]
sw_engine shape: fix a corner case that close tag is overwritten with a wrong value.

if the last contour dispatching is dealt with closed command but actual command
is not the closed, the close tag is written with the opened

In this case, stroking rendering is buggy.

2 years agotvg_saver: optimize tvg format.
Hermet Park [Tue, 10 Aug 2021 08:43:28 +0000 (17:43 +0900)]
tvg_saver: optimize tvg format.

So this optimization stragtegy is to merging shapes.
If two shapes have the same layer, having save properties except the paths,
we can integrate two shapes to one, this helps to build up a simpler
scene-tree, reduce the runtime memory, helps for faster processing for rendering.

As far as I checked tiger.svg, it removes 142 shape nodes,
decreased the binary size: 60537 -> 54568.

Overall, avg 4% binary size can be reduced among our example svgs by this patch.

2 years agosw_engine: allow sharing shapes & connected strokes all in one.
Hermet Park [Thu, 12 Aug 2021 04:09:47 +0000 (13:09 +0900)]
sw_engine: allow sharing shapes & connected strokes all in one.

This patch enhanced the sw raster engine to allow the both closed & open pathes
in one shape rendering.

@Issue: https://github.com/Samsung/thorvg/issues/266

2 years agoAdd files via upload
Hermet Park [Wed, 11 Aug 2021 15:39:36 +0000 (00:39 +0900)]
Add files via upload

2 years agoDelete example_tvgsize.png
Hermet Park [Wed, 11 Aug 2021 15:38:31 +0000 (00:38 +0900)]
Delete example_tvgsize.png