Commit graph

1479 commits

Author SHA1 Message Date
JunsuChoi
80cc0177fb 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.
2021-11-22 13:29:07 +09:00
Hermet Park
4ac58de1bf common paint: fix a typo. 2021-11-19 20:17:39 +09:00
jykeon
bfaf26d99e svg_loader: Add nullptr check.
Signed-off-by: jykeon <jykeon@samsung.com>
2021-11-19 17:37:45 +09:00
Hermet Park
e83a47b4c6 example stress: adjusted loading count.
This example loads all the svgs even if they are out of the screen space.
2021-11-19 16:12:25 +09:00
Hermet Park
b38996f5c9 sw_engine image: code refactoring
Image raster sequence is getting quite complex...

Clean up before further image optimization.
2021-11-19 13:43:12 +09:00
Hermet Park
840e4f54f0 example stroke: updated the sample 2021-11-19 13:32:13 +09:00
Hermet Park
e195ac8b30 sw_engine image: code refactoring
+++
2021-11-19 13:22:32 +09:00
Hermet Park
93da844d94 sw_engine raster: clarify the internal function name.
"Solid" in this raster context is "Opaque" actually.
So remove the solid from it.
2021-11-19 13:12:40 +09:00
Hermet Park
491ea0ac07 sw_engine raster: remove the condition which is out of the genearal case. 2021-11-19 13:08:02 +09:00
Hermet Park
fa17214633 sw_engine raster: updated tvglog messages 2021-11-18 20:50:03 +09:00
Hermet Park
e90f040208 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
2021-11-18 20:43:25 +09:00
Hermet Park
823cc85238 examples: added image scale up/down samples. 2021-11-18 17:45:49 +09:00
Hermet Park
7152953df4 example boundary2: added image boundary check sample. 2021-11-18 10:41:00 +09:00
Mira Grudzinska
6be38fa431 example: added different stroke's caps 2021-11-17 23:56:37 +09:00
Hermet Park
4f73719fac sw_engine raster: optimize the image raster
these solid images shouldn't apply the alpha blending...
2021-11-17 23:35:33 +09:00
Hermet Park
c510ced623 example stroke: added vertical line samples. 2021-11-17 23:01:49 +09:00
Michal Maciola
282b9288ab 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.
2021-11-17 20:55:26 +09:00
Hermet Park
92f57a149f sw_engine raster: code refactoring
changed internal function names, keep the neat & clean thorvg style code.
2021-11-17 19:40:38 +09:00
JunsuChoi
e0c3fafb18
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.
2021-11-17 18:52:15 +09:00
JunsuChoi
d91d3ef6fa infra: Use latest meson version
0.45 -> latest. For b_sanitize option. (0.45 version is not supported).
2021-11-17 16:49:10 +09:00
Hermet Park
41b4b30269 examples: remove low quality sample images. 2021-11-17 12:42:00 +09:00
Hermet Park
f9bc684699 sw_engine raster: code refactoring
clarfy & regroup the internal functions which have been messed up by rendering options.

no logical changes
2021-11-16 20:27:11 +09:00
Hermet Park
e581ae4353 sw_engine neon: code refactoring.
keep the internal function name consistency.
2021-11-16 20:14:45 +09:00
Mira Grudzinska
3f82522f60 sw_engine: ialpha function pointer used instead of 255 - alpha 2021-11-16 20:14:31 +09:00
Hermet Park
5690f1ab0d examples pictures: updated for case cover.
+ test opacity
2021-11-15 18:07:24 +09:00
Hermet Park
c9377708a9 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
2021-11-15 17:38:57 +09:00
Hermet Park
0fcdba8a4b common math: code refactoring
introduced mathZero(), mathEqual() for floating variables.
2021-11-15 17:10:54 +09:00
Hermet Park
ee60a04f20 sw_engine image: code refactoring
revert d520da2db8

After considered the scneario seriously,
this doesn't helpful for the performance at all...
just increased code complexity. earlier bad decision... revert it.
2021-11-15 11:27:29 +09:00
Mira Grudzinska
8362ddda74 sw_engine: avxRasterTranslucentRle implemented 2021-11-15 11:16:17 +09:00
Hermet Park
1592443c3e common paint: improve rotation condition precision
cover the four cases: 0, 90, 180, 270 degrees...
2021-11-12 19:45:01 +09:00
Hermet Park
cfe5d80099 common paint: improve rotation condition precision 2021-11-12 17:24:02 +09:00
JunsuChoi
e2c7599769 infra bot: Hotfix memcheck bot for push event 2021-11-12 17:18:05 +09:00
Hermet Park
b1604e2ec7 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....
2021-11-12 16:42:30 +09:00
Hermet Park
d520da2db8 sw_engine image: optimized image rendering.
Applied the fast-track routine for axis-aligned images.
This helps to remove outline generation if no clips.
2021-11-12 16:28:15 +09:00
JunsuChoi
d7973e9330 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.)
2021-11-12 16:14:00 +09:00
Hermet Park
15412907b8 svg2png: update the error messages.
@Issue: https://github.com/Samsung/thorvg/issues/1031
2021-11-12 12:00:01 +09:00
Hermet Park
ae3dae8c55 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.
2021-11-12 10:49:36 +09:00
Hermet Park
44ccfc46d8 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
2021-11-12 10:49:24 +09:00
Hermet Park
91668143e1 sw_engine raster: code refactoring
remove duplicated logic.
2021-11-12 10:49:15 +09:00
Hermet Park
1527f70221 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.
2021-11-12 10:47:30 +09:00
Mira Grudzinska
ed640630c1 svg_loader: mem properly freed
delete -> free
2021-11-12 10:46:53 +09:00
Mira Grudzinska
f3450e1760 svg_loader: memory properly released
delete->free
2021-11-11 21:49:13 +09:00
Hermet Park
56e2498466 png_loader: correct colorspace
decoding color channels rgba -> bgra

@Issue: https://github.com/Samsung/thorvg/issues/1007
2021-11-11 21:48:22 +09:00
JunsuChoi
24e0133f78 README: Update Badge
This badge is updated when a patch is pushed to the master branch.
2021-11-11 21:37:19 +09:00
JunsuChoi
b83d6c6419 infra: Add build test after patch merged
This test works after the patch is merged into the master branch.
2021-11-11 17:59:20 +09:00
Hermet Park
6c4896b911 sw_engine raster: code refactoring.
keep the code clean & neat.
2021-11-11 14:39:02 +09:00
Hermet Park
e2dd889e1a apis: promote beta apis to the official ones.
these apis are good to open in the next release.
2021-11-11 14:17:43 +09:00
Hermet Park
98e542e2f6 common render: code refactoring.
correct wrong coding convention.
2021-11-11 14:13:00 +09:00
Hermet Park
2f334f3300 common paint: code refactoring
renamed internal variable. no logical changes.
2021-11-11 13:07:13 +09:00
Mira Grudzinska
10e0d18d6e sw_engine: missing implementations added
Rastering functions for masked images that are not rectangular
(clipped) were implemented.
2021-11-11 12:25:13 +09:00