Hermet Park [Wed, 24 Nov 2021 08:47:27 +0000 (17:47 +0900)]
sw_engine image: complete sequeqnce of the scaled rgb image drawing.
implement composition by translucent / opaque.
Hermet Park [Wed, 24 Nov 2021 08:29:39 +0000 (17:29 +0900)]
sw_engine image: complete sequeqnce of the direct rgb image drawing.
implement composition by translucent / opaque.
Hermet Park [Wed, 24 Nov 2021 06:48:47 +0000 (15:48 +0900)]
sw_engine image: refactoring before further development.
separate internal functions per context
and keep the coding convention.
Hermet Park [Wed, 24 Nov 2021 06:58:49 +0000 (15:58 +0900)]
Update CONTRIBUTING.md
Hermet Park [Tue, 23 Nov 2021 09:29:00 +0000 (18:29 +0900)]
sw_engine image: support separate logics for scaled rle rgba image
+ scaled rle rgba image
+ scaled masked rle rgba image
+ scaled translucent rle rga image
Mira Grudzinska [Tue, 23 Nov 2021 18:56:35 +0000 (19:56 +0100)]
common: nothing was rendered after an empty masked node came across
The problem was observed for empty masked scenes (except the fastTrack
cases). Solved by imimediate returning from the func without passing 'false'
as its result.
Hermet Park [Tue, 23 Nov 2021 07:16:09 +0000 (16:16 +0900)]
examples: replaced png resource to verify alpha channel.
alpha blending looks a bit awkward.. need to fix it.
Hermet Park [Tue, 23 Nov 2021 06:19:50 +0000 (15:19 +0900)]
sw_engine image: apply rgba blending.
rgba requires the default blending.
JunsuChoi [Tue, 23 Nov 2021 05:06:41 +0000 (14:06 +0900)]
infra stylebot: Delete existing comments
In order to avoid duplication of the already created comment,
already created results will be deleted.
Hermet Park [Tue, 23 Nov 2021 03:14:31 +0000 (12:14 +0900)]
sw_engine image: code refactoring
Clarify image sequences by renaming & adding TODO comments.
Hermet Park [Fri, 19 Nov 2021 04:46:25 +0000 (13:46 +0900)]
sw_engine image: introduced scaled image raster logics.
These raster functions are accelerated only for the scaled images.
(no rotation, skrewed)
Hermet Park [Mon, 22 Nov 2021 08:40:06 +0000 (17:40 +0900)]
examples: remove boundary samples.
Removed these tests from the example since it's not so proper showcases
for user scenaro.
Hermet Park [Mon, 22 Nov 2021 03:31:23 +0000 (12:31 +0900)]
common paint: fix the wrong fast track logic.
There was a missing sorting between the left-top & right-bottom corner.
that results in the negative values of the viewport...
Now fixed it.
+ refactored to use math functions...
+ still it's a buggy, sometimes no draw at 90' in stress. don't know reason. :(
JunsuChoi [Mon, 22 Nov 2021 07:09:54 +0000 (16:09 +0900)]
tvg_saver TvgBinInterpreter: prevent misaligned memory access
When parsing a binary stored as a char type,
interpreter can access the misaligned memory while accessing it with a pointer.
To prevent that, pass the array copied to memcpy as tvg Object.
JunsuChoi [Mon, 22 Nov 2021 03:59:43 +0000 (12:59 +0900)]
test capiSwCanvas: remove a invalid test case.
This test depends on the machine environment.
it's not guaranteed the same result so we remove it.
jykeon [Wed, 24 Nov 2021 00:36:10 +0000 (09:36 +0900)]
bump up version 0.6.1
Change-Id: Iecd88582c2ff6ee095eae3b83f083e32063c8124
Signed-off-by: jykeon <jykeon@samsung.com>
Hermet Park [Fri, 19 Nov 2021 11:16:06 +0000 (20:16 +0900)]
common paint: fix a typo.
jykeon [Fri, 19 Nov 2021 07:18:30 +0000 (16:18 +0900)]
svg_loader: Add nullptr check.
Signed-off-by: jykeon <jykeon@samsung.com>
Hermet Park [Fri, 19 Nov 2021 07:11:08 +0000 (16:11 +0900)]
example stress: adjusted loading count.
This example loads all the svgs even if they are out of the screen space.
Hermet Park [Fri, 19 Nov 2021 04:22:32 +0000 (13:22 +0900)]
sw_engine image: code refactoring
Image raster sequence is getting quite complex...
Clean up before further image optimization.
Hermet Park [Fri, 19 Nov 2021 04:32:13 +0000 (13:32 +0900)]
example stroke: updated the sample
Hermet Park [Fri, 19 Nov 2021 04:22:32 +0000 (13:22 +0900)]
sw_engine image: code refactoring
+++
Hermet Park [Fri, 19 Nov 2021 04:11:21 +0000 (13:11 +0900)]
sw_engine raster: clarify the internal function name.
"Solid" in this raster context is "Opaque" actually.
So remove the solid from it.
Hermet Park [Thu, 18 Nov 2021 04:18:23 +0000 (13:18 +0900)]
sw_engine raster: remove the condition which is out of the genearal case.
Hermet Park [Thu, 18 Nov 2021 11:50:03 +0000 (20:50 +0900)]
sw_engine raster: updated tvglog messages
Hermet Park [Thu, 18 Nov 2021 02:31:15 +0000 (11:31 +0900)]
common shape: fix memory access violation
asan report:
../src/lib/tvgShapeImpl.h:94:15: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/lib/tvgShapeImpl.h:101:15: runtime error: null pointer passed as argument 2, which is declared to never be null
Hermet Park [Wed, 17 Nov 2021 07:40:33 +0000 (16:40 +0900)]
examples: added image scale up/down samples.
Hermet Park [Wed, 17 Nov 2021 03:19:39 +0000 (12:19 +0900)]
example boundary2: added image boundary check sample.
Mira Grudzinska [Wed, 17 Nov 2021 14:09:56 +0000 (15:09 +0100)]
example: added different stroke's caps
Hermet Park [Wed, 17 Nov 2021 11:44:39 +0000 (20:44 +0900)]
sw_engine raster: optimize the image raster
these solid images shouldn't apply the alpha blending...
Hermet Park [Wed, 17 Nov 2021 03:04:44 +0000 (12:04 +0900)]
example stroke: added vertical line samples.
Michal Maciola [Wed, 17 Nov 2021 11:00:38 +0000 (12:00 +0100)]
all: fix compilation errors on non-windows clang
Thorvg couldn't be compiled on macos as non-portable microsoft calls used.
Changed definitions checking to Visual Studio only.
Hermet Park [Wed, 17 Nov 2021 10:38:35 +0000 (19:38 +0900)]
sw_engine raster: code refactoring
changed internal function names, keep the neat & clean thorvg style code.
JunsuChoi [Wed, 17 Nov 2021 09:52:15 +0000 (18:52 +0900)]
infra bot: Add Memcheck bot (AddressSanitizer)
If a leak occurs in the test result, the bot notifies the PR as a comment.
This notify may not be directly related to the created current PR.
JunsuChoi [Wed, 17 Nov 2021 02:25:47 +0000 (11:25 +0900)]
infra: Use latest meson version
0.45 -> latest. For b_sanitize option. (0.45 version is not supported).
Hermet Park [Wed, 17 Nov 2021 03:42:00 +0000 (12:42 +0900)]
examples: remove low quality sample images.
jykeon [Thu, 18 Nov 2021 03:27:32 +0000 (12:27 +0900)]
bump up version 0.6.0
Change-Id: I75ad4b7c3a0e98c811153726d25ec9004784c59d
Signed-off-by: jykeon <jykeon@samsung.com>
jykeon [Wed, 17 Nov 2021 23:46:19 +0000 (08:46 +0900)]
bump up version v0.5.4
Change-Id: I1b8b9e0dddd20c661d2e8736eaf7ce9ce9b08e67
Signed-off-by: jykeon <jykeon@samsung.com>
Hermet Park [Tue, 16 Nov 2021 10:25:18 +0000 (19:25 +0900)]
sw_engine raster: code refactoring
clarfy & regroup the internal functions which have been messed up by rendering options.
no logical changes
Hermet Park [Tue, 16 Nov 2021 08:18:51 +0000 (17:18 +0900)]
sw_engine neon: code refactoring.
keep the internal function name consistency.
Mira Grudzinska [Tue, 16 Nov 2021 01:45:06 +0000 (02:45 +0100)]
sw_engine: ialpha function pointer used instead of 255 - alpha
Hermet Park [Mon, 15 Nov 2021 09:06:59 +0000 (18:06 +0900)]
examples pictures: updated for case cover.
+ test opacity
Hermet Park [Mon, 15 Nov 2021 05:47:11 +0000 (14:47 +0900)]
sw_engine image: ++optimization
apply fast track to fast up the image rasterization.
only shifted image doesn't need to have the matrix-transform computation,
we can avoid it by just shifting offset xy by simple caculating.
@Issue: https://github.com/Samsung/thorvg/issues/206
Hermet Park [Mon, 15 Nov 2021 03:17:36 +0000 (12:17 +0900)]
common math: code refactoring
introduced mathZero(), mathEqual() for floating variables.
Hermet Park [Mon, 15 Nov 2021 02:26:31 +0000 (11:26 +0900)]
sw_engine image: code refactoring
revert
d520da2db8966db19ae83897549a107c01c475c1
After considered the scneario seriously,
this doesn't helpful for the performance at all...
just increased code complexity. earlier bad decision... revert it.
Mira Grudzinska [Sat, 13 Nov 2021 23:30:18 +0000 (00:30 +0100)]
sw_engine: avxRasterTranslucentRle implemented
Hermet Park [Fri, 12 Nov 2021 10:06:41 +0000 (19:06 +0900)]
common paint: improve rotation condition precision
cover the four cases: 0, 90, 180, 270 degrees...
Hermet Park [Fri, 12 Nov 2021 08:09:40 +0000 (17:09 +0900)]
common paint: improve rotation condition precision
JunsuChoi [Fri, 12 Nov 2021 07:35:07 +0000 (16:35 +0900)]
infra bot: Hotfix memcheck bot for push event
Hermet Park [Fri, 12 Nov 2021 07:37:10 +0000 (16:37 +0900)]
common paint: fix invalid memory access in unit test
casting the paint to shape is not allowed if the compositor target
is not shape, here it concretely checking the the type before casting....
Hermet Park [Fri, 12 Nov 2021 05:55:04 +0000 (14:55 +0900)]
sw_engine image: optimized image rendering.
Applied the fast-track routine for axis-aligned images.
This helps to remove outline generation if no clips.
JunsuChoi [Fri, 12 Nov 2021 06:03:52 +0000 (15:03 +0900)]
infra bot: Add Memcheck bot (valgrind)
If the unit test is successful, valgrind memory check is executed based on the test.
If a leak occurs in the test result, the bot notifies the PR as a comment.
This notify may not be directly related to the created current PR.
(Asan is on hold because it is not well tested in the github action CI environment.)
Hermet Park [Fri, 12 Nov 2021 03:00:01 +0000 (12:00 +0900)]
svg2png: update the error messages.
@Issue: https://github.com/Samsung/thorvg/issues/1031
Hermet Park [Thu, 11 Nov 2021 06:44:19 +0000 (15:44 +0900)]
sw_engine image: introduce the stride property for the image.
we are considering the larger space of the image buffer,
in this case stride info is necessary.
Hermet Park [Thu, 11 Nov 2021 05:03:10 +0000 (14:03 +0900)]
common paint: alpha masking optimization
applying fast track approach to the alpha mask when its condition is matched.
(simple rectangle alpha masking which isn't half-translucent)
From time to time, designers brutally use the alpha masking to clip simple region,
thorvg can help the situation by avoiding masking usage internally.
This can reduce the 1-step render pass composition.
@Issue: https://github.com/Samsung/thorvg/issues/344
Hermet Park [Thu, 11 Nov 2021 06:21:14 +0000 (15:21 +0900)]
sw_engine raster: code refactoring
remove duplicated logic.
Hermet Park [Thu, 11 Nov 2021 12:30:17 +0000 (21:30 +0900)]
sw_engine raster: allow image interpolation by increasing tolerance.
current image interpolation method is a bit awkward,
because xy scale different scale factor is not allowed.
we must improve the algorithm,
but now considering floating point precision,
we allow the interpolation by less ratio floating fraction.
Mira Grudzinska [Thu, 11 Nov 2021 13:11:25 +0000 (14:11 +0100)]
svg_loader: mem properly freed
delete -> free
Mira Grudzinska [Thu, 11 Nov 2021 11:59:58 +0000 (12:59 +0100)]
svg_loader: memory properly released
delete->free
Hermet Park [Thu, 11 Nov 2021 12:44:01 +0000 (21:44 +0900)]
png_loader: correct colorspace
decoding color channels rgba -> bgra
@Issue: https://github.com/Samsung/thorvg/issues/1007
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.