JunsuChoi [Thu, 11 Nov 2021 08:57:01 +0000 (17:57 +0900)]
README: Update Badge
This badge is updated when a patch is pushed to the master branch.
JunsuChoi [Thu, 11 Nov 2021 04:27:30 +0000 (13:27 +0900)]
infra: Add build test after patch merged
This test works after the patch is merged into the master branch.
Hermet Park [Thu, 11 Nov 2021 05:38:13 +0000 (14:38 +0900)]
sw_engine raster: code refactoring.
keep the code clean & neat.
Hermet Park [Wed, 3 Nov 2021 06:40:40 +0000 (15:40 +0900)]
apis: promote beta apis to the official ones.
these apis are good to open in the next release.
Hermet Park [Thu, 11 Nov 2021 05:13:00 +0000 (14:13 +0900)]
common render: code refactoring.
correct wrong coding convention.
Hermet Park [Thu, 11 Nov 2021 04:04:16 +0000 (13:04 +0900)]
common paint: code refactoring
renamed internal variable. no logical changes.
Mira Grudzinska [Wed, 10 Nov 2021 11:29:44 +0000 (12:29 +0100)]
sw_engine: missing implementations added
Rastering functions for masked images that are not rectangular
(clipped) were implemented.
Hermet Park [Wed, 10 Nov 2021 10:38:37 +0000 (19:38 +0900)]
sw_engine raster: code refactoring
--remove parameter
Hermet Park [Wed, 10 Nov 2021 10:21:51 +0000 (19:21 +0900)]
sw_engine raster: code refactoring
unify several function paramters with one structure.
Hermet Park [Wed, 10 Nov 2021 09:24:45 +0000 (18:24 +0900)]
sw_engine raster: code refactoring
keep it neat & clean code with descriptions.
Hermet Park [Wed, 10 Nov 2021 08:31:05 +0000 (17:31 +0900)]
sw_engine raster: code refactoring
renamed internal variables, no logical changes.
Hermet Park [Wed, 10 Nov 2021 07:57:36 +0000 (16:57 +0900)]
sw_engine raster: code refactoring.
keep the code thorvg convention.
Mira Grudzinska [Tue, 9 Nov 2021 01:39:59 +0000 (02:39 +0100)]
sw_engine: unification of mask and inv mask functions
The function pointers used to pass the proper blending method - mask
or inverse mask.
jykeon [Wed, 10 Nov 2021 23:35:30 +0000 (08:35 +0900)]
bump up version v0.5.3
Change-Id: I34ba3c0ba4fe7b1b4cb150ae8c0ebafcbe31b5b5
Signed-off-by: jykeon <jykeon@samsung.com>
Hermet Park [Wed, 10 Nov 2021 02:06:44 +0000 (11:06 +0900)]
Remove html to avoid annoying license violation detection
Change-Id: I394457f423c0de912dd3d5eeb7b1515fc18158b5
Hermet Park [Tue, 9 Nov 2021 07:50:20 +0000 (16:50 +0900)]
sw_engine renderer: fix the invalid memory access in the corner case.
Tasks can be disposed while the renderer referencing it.
Now, we can delete the tasks with lazy approach by introducing some tags.
@Issue: https://github.com/Samsung/thorvg/issues/995
Mira Grudzinska [Sat, 6 Nov 2021 08:59:29 +0000 (09:59 +0100)]
tvg_saver: fix memory leaks
In the cae when Result::InsufficientCondition was retured by the save()
api, the user had to remember to delete the passed paint - fixed.
Also path was not released.
Hermet Park [Tue, 9 Nov 2021 08:11:10 +0000 (17:11 +0900)]
tvg_loader: fix asan report.
revert
c31c77c0fb884f79c6d52b5971f21be6fe4e92f2
memory mis-alignment is detected by asan tool.
Hermet Park [Tue, 9 Nov 2021 07:09:44 +0000 (16:09 +0900)]
sw_engine renderer: code refactoring
free the member resources in the destructor.
Hermet Park [Tue, 9 Nov 2021 06:05:55 +0000 (15:05 +0900)]
test capi: fix the memory leak.
target is dangled without any proper deletion...
Hermet Park [Tue, 9 Nov 2021 05:52:29 +0000 (14:52 +0900)]
Revert "test capi: fix memory leak."
This reverts commit
651a98a2d899620bd74a0162127bbdfe572368c6.
Applied the alternative solution instead of this patch.
37e39866dd81eb1ec57b887aebd7a58b5d26a781
Hermet Park [Tue, 9 Nov 2021 05:32:04 +0000 (14:32 +0900)]
common paint: fix a memory leak.
delete dangling object properly in the corner case.
Unfortunately, this brings to correct the capi test cases.
we assume the paints is deleted whenever its result is successful or not.
@Issue: https://github.com/Samsung/thorvg/issues/995
Hermet Park [Tue, 9 Nov 2021 05:11:53 +0000 (14:11 +0900)]
test initializer: remove a invalid test case.
This test depends on the machine environment.
it's not guaranteed the same result so we remove it.
Hermet Park [Fri, 5 Nov 2021 12:04:51 +0000 (21:04 +0900)]
common: ++exception handling.
fix the memory leak in the corner case
detected by tvg test suites
@Issue: https://github.com/Samsung/thorvg/issues/995
JunsuChoi [Mon, 8 Nov 2021 05:15:59 +0000 (14:15 +0900)]
test Array: Remove too big size test
On large memory machines, if machine have enough memory,
tests failed because it doesn't return null.
JunsuChoi [Mon, 8 Nov 2021 06:05:16 +0000 (15:05 +0900)]
tvg_saver TvgSaver: Initialize local value
If paint has no path information or stroke information,
it is not referenced inside bounds.
This will access the uninitialized variable at line 759, 760.
Hermet Park [Fri, 5 Nov 2021 11:53:39 +0000 (20:53 +0900)]
common array: + exception handling.
properly handle if the realloc() is failed.
@Isssue: https://github.com/Samsung/thorvg/issues/995
Mira Grudzinska [Sun, 7 Nov 2021 23:36:47 +0000 (00:36 +0100)]
tests: capi - buffer was not freed
Hermet Park [Fri, 5 Nov 2021 12:36:57 +0000 (21:36 +0900)]
test capi: fix memory leak.
Delete the paint which is not committed properly.
Hermet Park [Fri, 5 Nov 2021 12:10:59 +0000 (21:10 +0900)]
test: fix memory leak.
these duplicates are not unique_ptr, should be taken care.
@Issue: https://github.com/Samsung/thorvg/issues/995
Hermet Park [Fri, 5 Nov 2021 11:58:35 +0000 (20:58 +0900)]
sw_engine raster: fix build break.
trivial mistake by
cdf7019b19011a6897e1ae269eafe6cc33e397c9
Michal Maciola [Fri, 5 Nov 2021 09:32:41 +0000 (10:32 +0100)]
WASM: unpremultiplyBuffer fixes (#999)
Hermet Park [Fri, 5 Nov 2021 08:43:08 +0000 (17:43 +0900)]
sw_engine image: ++missing logs.
Hermet Park [Fri, 5 Nov 2021 08:39:53 +0000 (17:39 +0900)]
sw_raster image: add error logs to notify issues.
Michal Maciola [Fri, 5 Nov 2021 08:40:59 +0000 (09:40 +0100)]
WASM: revert cpp_*args into properties (#998)
Mira Grudzinska [Tue, 2 Nov 2021 14:43:26 +0000 (15:43 +0100)]
sw_engine: functions supporting a masking of the clipped images are missing
To preserve the naming convention function '_rasterTranslucentImageRle'
is reanmed to '_translucentImageRle'. The '_rasterTranslucentImageRle'
function is though created - it checks the composition method and calls
the corresponding function. Missing functions are marked, but not implemented
(separate commit).
Hermet Park [Fri, 5 Nov 2021 08:17:20 +0000 (17:17 +0900)]
svg_loader: reduce binary size
saved 800 bytes.
Hermet Park [Fri, 5 Nov 2021 05:00:04 +0000 (14:00 +0900)]
svg_loader: reduce binary size
removed the std::string usages.
saved 17kb.
Mira Grudzinska [Thu, 4 Nov 2021 01:20:37 +0000 (02:20 +0100)]
svg_loader: passing the svgPath information into the _applyComposition
An image can be a mask, so the information about it's path is necessary
during a composition application.
Mira Grudzinska [Wed, 3 Nov 2021 00:46:28 +0000 (01:46 +0100)]
svg_loader: mask node loaded as a scene
Since the mask is a container element (in opposite to the clipPath),
it has to be loaded as a scene.
Mira Grudzinska [Wed, 3 Nov 2021 11:31:41 +0000 (12:31 +0100)]
svg_loader: SvgCompositeNode type introduced
Clips and masks require to implement some additional variables,
so the new node type has been introduced. Implementation of the usage
of these additional variables will be the subject of a separate
commit.
Hermet Park [Thu, 4 Nov 2021 09:53:53 +0000 (18:53 +0900)]
binary size optimization.
replaced new/delete with malloc/free
saved 936 bytes
Hermet Park [Thu, 4 Nov 2021 08:34:11 +0000 (17:34 +0900)]
common shape: code refactoring.
cast to float type properly.
Michal Maciola [Tue, 2 Nov 2021 17:11:45 +0000 (18:11 +0100)]
WASM: Use ARGB8888. Convert into ABGR and unmultiply after sync()
Wasm needs ABGR STRAIGHT buffer.
As there is a problem using ABGR for loaders, it is better to use ARGB8888.
This patch makes wasm using ARGB8888 and relocate pixels and unmultiply after sync().
Hermet Park [Wed, 3 Nov 2021 08:07:38 +0000 (17:07 +0900)]
common math: code refactoring
introduce common math functions to improve the reusability.
Hermet Park [Wed, 3 Nov 2021 11:24:36 +0000 (20:24 +0900)]
common shape: ++tiny optimization
reduce the binary size by 80 bytes.
Hermet Park [Wed, 3 Nov 2021 10:47:48 +0000 (19:47 +0900)]
optimize binary size.
apply two more compiler options to reduce binary size.
Saved about 7kb.
Hermet Park [Tue, 2 Nov 2021 12:10:46 +0000 (21:10 +0900)]
doc: added capi documentation.
Hermet Park [Tue, 2 Nov 2021 12:08:36 +0000 (21:08 +0900)]
doc: added c api documentation
Hermet Park [Tue, 2 Nov 2021 11:59:20 +0000 (20:59 +0900)]
doc: up to date v0.6.0
Hermet Park [Tue, 2 Nov 2021 11:06:06 +0000 (20:06 +0900)]
infra: just released v0.6.0
Hermet Park [Tue, 2 Nov 2021 10:53:08 +0000 (19:53 +0900)]
update wasm build script
remove the deprecations and warnings.
Hermet Park [Tue, 2 Nov 2021 10:31:16 +0000 (19:31 +0900)]
jpg_loader: fix compiler warnings.
"warning: shifting a negative signed value is undefined [-Wshift-negative-value"
Hermet Park [Tue, 2 Nov 2021 10:46:00 +0000 (19:46 +0900)]
tvg_loader interpreter: tiny optmization
skip memory copy as possible.
Mira Grudzinska [Tue, 26 Oct 2021 00:07:24 +0000 (02:07 +0200)]
tvg_saver/tvg_loader: gradient fill in the tvg format
Introducing the gradient transform() apis and changing the grad
algorithms made it possible to apply the shape's transformation
before saving the tvg file, in case the shape (or its stroke)
has a fill.
Hermet Park [Tue, 2 Nov 2021 09:42:16 +0000 (18:42 +0900)]
sw_engine image: fix memory leak.
reset rle is supposed to be reused, image should keep its pointer.
@Issue: https://github.com/Samsung/thorvg/issues/982
Mira Grudzinska [Sun, 10 Oct 2021 21:41:52 +0000 (23:41 +0200)]
svg_loader: define the scaling factors for units changing
The values in absolute units are calculated based on the pixel unit.
Till now the default value of 90dpi was used. Since CSS3 (now CSS4 is
the most recent) 1 inch equals to 96 pixels. The necessary constants
are introduces in this commit.
Hermet Park [Tue, 2 Nov 2021 10:02:07 +0000 (19:02 +0900)]
jpg_loader: code refactoring
removed unused variables.
Hermet Park [Tue, 2 Nov 2021 09:57:55 +0000 (18:57 +0900)]
png_loader: code refactoring
removed unused variables.
Hermet Park [Tue, 2 Nov 2021 05:38:09 +0000 (14:38 +0900)]
tools svg2tvg: ++exception handling.
skip to process if the input is invalid.
Hermet Park [Tue, 2 Nov 2021 05:31:27 +0000 (14:31 +0900)]
examples: updated tvgs
re-compiled the tvgs with the latest tvg saver.
Hermet Park [Tue, 2 Nov 2021 05:26:20 +0000 (14:26 +0900)]
infra: add tvg resource pack.
Keep v0.5 version of tvgs for checking compatibility.
Hermet Park [Tue, 2 Nov 2021 04:18:17 +0000 (13:18 +0900)]
infra: update meson option description
JunsuChoi [Tue, 2 Nov 2021 00:50:08 +0000 (09:50 +0900)]
infra meson: Add -Dstatic option
Add an option for use in environments where
the use of static libraries must be enforced.
Mira Grudzinska [Mon, 1 Nov 2021 13:28:06 +0000 (14:28 +0100)]
sw_engine: var/funct renaming
Changed names:
shape->rect -> shape->fastTrack
_factTrack -> _axisAlignedRect
Mira Grudzinska [Mon, 1 Nov 2021 19:28:41 +0000 (20:28 +0100)]
svg_loader: fix bounds for gradient
In the case when bounds should not include a stroke width, width
and height values were reduced by half of a stroke width, instead
of the full width.
Mira Grudzinska [Mon, 1 Nov 2021 13:10:40 +0000 (14:10 +0100)]
sw_engine: fastTrack with clips
After 362d2df the fastTrack cases were applied even for shapes with clips.
These changes fixed this - the check whether a shape is a rect should be done
only if it has no clips.
Hermet Park [Mon, 1 Nov 2021 07:53:25 +0000 (16:53 +0900)]
Revert "loaders: Consider colorspaces (#838)"
This reverts commit
cd5116b05315698ebc5e8592beb4753929dc2eed.
Ah this breaks the Stress example due to Picture::duplicate() is not available...
Need to consider and come back again.
Michal Maciola [Mon, 1 Nov 2021 07:10:22 +0000 (08:10 +0100)]
loaders: Consider colorspaces (#838)
* common: added colorSpace() function
This patch introduces colorSpace() function for SW and GL engine.
* infra: change LoadModule:read() into LoadModule:read(uint32_t colorspace)
This patch changes LoadModule:read() into LoadModule:read(uint32_t colorspace)
* picture: implement passing colorspace into loader
This patch implements passing colorspace into loaders.
Loader->read is now called on the first update.
* external_jpg_loader: support colorspaces
* external_png_loader: support colorspaces
Michal Maciola [Tue, 14 Sep 2021 07:29:14 +0000 (09:29 +0200)]
common: Unmultiplicated colorspace
This patch introduces _STRAIGHT colorspaces (ABGR8888_STRAIGHT and
ARGB8888_STRAIGHT) whose colors are un-alpha-premultiplied. Unmultiplicated
colors are especially needed for wasm thorvg loader and svg2png / tvg2png.
Only C version now.
@issue: #791
Mira Grudzinska [Mon, 1 Nov 2021 00:28:53 +0000 (01:28 +0100)]
tvg_saver: preTransform condition
A stroke is irregularly scaled in case when:
1) m11 != m22
2) m11 == m22 == 0 and m12 != m21
The second case was missing in the code.
JunsuChoi [Mon, 1 Nov 2021 05:06:47 +0000 (14:06 +0900)]
test Picture: Fix array release
fix code
Mira Grudzinska [Fri, 29 Oct 2021 00:09:56 +0000 (02:09 +0200)]
tvg_loader: TVGLOG added in case an unknown fill or stroke tag used
Hermet Park [Fri, 29 Oct 2021 07:53:10 +0000 (16:53 +0900)]
common: code refactoring
removed invalid nullptr checks.
New allocation doesn't gurantee that returns nullptr when it's failed.
It's useless on the modern compliers and our policy respects it.
jykeon [Mon, 1 Nov 2021 03:38:22 +0000 (12:38 +0900)]
bump up version v0.5.2
Change-Id: I5a44c3c30055afd2c4f2fe7b273ce6142a44a74f
Signed-off-by: jykeon <jykeon@samsung.com>
Mira Grudzinska [Fri, 29 Oct 2021 12:58:07 +0000 (14:58 +0200)]
sw_engine: incorrect matrix used
The invTransform should be used instead of transform - missed during
all the gradient changes.
Michal Maciola [Mon, 25 Oct 2021 13:02:28 +0000 (15:02 +0200)]
SVG: Support geometry properties of use tag
This patch adds a support for geometry properties (x, y) of <use> tag
Mira Grudzinska [Sat, 23 Oct 2021 12:27:04 +0000 (14:27 +0200)]
svg_loader: gradient transformation properly applied
The final gradient transformation depends on the coordinate system.
It can not be applied during an svg loading. The transformation matrix
has to be passed via api for further gradient processing.
Mira Grudzinska [Tue, 26 Oct 2021 10:51:05 +0000 (12:51 +0200)]
sw_engine: variables names changed
Rasial gradient variables names changed to be more descriptive.
Mira Grudzinska [Sat, 23 Oct 2021 13:20:43 +0000 (15:20 +0200)]
sw_engine: gradient transformation combined with the shape transformation
The gradient transformation has to be included in the last step
of gradient preparation (and combined with a shape transformation).
Mira Grudzinska [Mon, 20 Sep 2021 00:39:24 +0000 (02:39 +0200)]
sw_engine: proper radial gradient transformation
Mira Grudzinska [Thu, 28 Oct 2021 23:14:12 +0000 (01:14 +0200)]
sw_engine: refactoring
The rasterization region was rearranged in the case of fastTrack,
but its validation and boundaries weren't check, causing segf in some
cases. Fixed.
Mira Grudzinska [Wed, 27 Oct 2021 00:55:22 +0000 (02:55 +0200)]
svg_loader: shape's bounds without a stroke
A shape's bounds used for a gradient transformation shouldn't take
a stroke into account.
JunsuChoi [Thu, 28 Oct 2021 03:50:07 +0000 (12:50 +0900)]
infra action: Enable to run test(window build)
use static png, jpg library
Hermet Park [Fri, 29 Oct 2021 04:17:56 +0000 (04:17 +0000)]
Merge "tizen_only: Leave the redundant capis until efl remove them." into tizen
Hermet Park [Thu, 28 Oct 2021 06:15:16 +0000 (15:15 +0900)]
tizen_only: Leave the redundant capis until efl remove them.
Change-Id: Ib0f76263cc233408022495056a6e9bd9e3df412b
JunsuChoi [Wed, 27 Oct 2021 08:03:28 +0000 (17:03 +0900)]
test Scene/Canvas: Fix maximum size for big size test
In some development environments, -1 of uint32_t may become 0.
Hermet Park [Wed, 27 Oct 2021 11:53:01 +0000 (20:53 +0900)]
tools svg2tvg: support converting multiple files.
Usage:
svg2tvg [SVG file] or [SVG folder]
Examples:
$ svg2tvg input.svg
$ svg2tvg svgfolder
JunsuChoi [Thu, 28 Oct 2021 04:45:58 +0000 (13:45 +0900)]
test Picture : Remove unnecessary namespace
Remove `std::`
JunsuChoi [Thu, 28 Oct 2021 03:07:49 +0000 (12:07 +0900)]
test Picture: Change file open of ifstream to binary(and readonly) type
When opening a file using ifstream, a different problem occurs for each platform.
To fix this, change to binary, readonly type.
refer to:
https://stackoverflow.com/questions/9817806/why-does-my-program-produce-different-results-on-windows-and-linux-about-file-r
Hermet Park [Wed, 27 Oct 2021 07:34:03 +0000 (16:34 +0900)]
sw_engine shape: code refactoring.
move the exceptional code for the coherency,
and ++ more history of the description.
Hermet Park [Wed, 27 Oct 2021 11:58:45 +0000 (20:58 +0900)]
Update README.md
Hermet Park [Wed, 27 Oct 2021 10:25:43 +0000 (19:25 +0900)]
tools svg2tvg: improve the usability.
Removed the .svg in the output name.
Before: tiger.svg -> tiger.svg.tvg
After: tiger.svg -> tiger.tvg
Hermet Park [Wed, 27 Oct 2021 04:47:52 +0000 (13:47 +0900)]
jpg_loader: support multi-thread and header reading in prior to decoding.
revise the code to support async loading of the static jpeg_loader,
also support header reading in prior to decoding.
Mira Grudzinska [Sat, 23 Oct 2021 19:31:02 +0000 (21:31 +0200)]
sw_engine: rasterization region edited in the case of fast tracking
Since no antialiasing is applied for the fastTracking cases,
the shape's rasterization region needs to be edited. To establish
the rastered bbox, the rounding is performed before the bbox corners
are casted to the SwCoords.
Hermet Park [Tue, 26 Oct 2021 10:37:06 +0000 (19:37 +0900)]
jpg_loader: code refactoring
revise code to satisfy with the tvg world.
no logical changes.
- modified file names
- added the samsung copyright
- removed unnecessary typedefs
- ++indentation
- --LOC
Mira Grudzinska [Tue, 26 Oct 2021 09:11:56 +0000 (11:11 +0200)]
capi: tvg_paint_transform -> tvg_paint_set_transform
Mira Grudzinska [Tue, 26 Oct 2021 00:13:57 +0000 (02:13 +0200)]
example: gradtransf.svg
The file enables to check the correctness of the gradient transformations
and units.
Removed duplicate file.
Hermet Park [Tue, 26 Oct 2021 06:52:24 +0000 (15:52 +0900)]
Update CONTRIBUTING.md
Michal Maciola [Fri, 22 Oct 2021 15:01:14 +0000 (17:01 +0200)]
jpg loader: support static jpeg loader using richgel999
Adds an alternative static jpg loader.
The jpg loader copied the jpeg decoding implementation from this open-source
repo: https://github.com/richgel999/jpeg-compressor
That opensource has the public-domain license, it doesn't have any restriction
of the copy.
note: jpgd.cpp is modified version (changed decompress_jpeg_image_from_stream)
for returning BGRA