Commit graph

2053 commits

Author SHA1 Message Date
Hermet Park
aff755aeb5 sw_engine texmap: introduced texture mapping polygon drawing.
Introduced the texture-mapping algorithm for the image-scaler.
With this approach, we can support any arbitrary forms of the transformed shapes
while appling the scale factors - x/y separately.

Also this is more efficient when the transformed image is far from the rectangular form
because our current normal image rasterizer based on the given drawing region whereas
our new approach is span-based.

Thus, we applied this mechanism only for the transformed images.
2021-11-25 17:07:24 +09:00
Hermet Park
72ee1c4343 sw_engien renderer: ++safety
+exceptional handling for the drawing region.
2021-11-25 15:04:56 +09:00
Hermet Park
b5e134399d sw_engine raster: fix a regression bug.
mistaken by 8ef31f6cd0
2021-11-25 14:49:14 +09:00
Hermet Park
cc96535778 sw_engine raster: fix compiler warnings.
popped up unused-functions when simd enabled.
2021-11-25 11:48:53 +09:00
Hermet Park
8ef31f6cd0 sw_engine raster: fix a mistake by the previous hot refactoring. 2021-11-24 20:51:05 +09:00
Hermet Park
e76091a283 sw_engine raster: code refactoring
+neat and clean code
2021-11-24 20:43:18 +09:00
Hermet Park
f7e52e93ed sw_engine image: improvement sequeqnce of the transformed rle rgba image drawing.
implement composition by translucent / opaque.

yet this transformed rle rgba image drawing is on the enhancement stage.
2021-11-24 19:32:42 +09:00
Hermet Park
9fbb8d9b09 sw_engine image: complete sequeqnce of the scaled rgba rle image drawing.
implement composition by translucent / opaque
2021-11-24 19:08:07 +09:00
Hermet Park
43233a530a sw_engine image: improvement sequeqnce of the direct rgba rle image drawing.
implement composition by translucent / opaque.

+ correct compositor stride reference.
2021-11-24 18:54:58 +09:00
Hermet Park
a5713cecca sw_engine image: improvement sequeqnce of the transformed rgba image drawing.
implement composition by translucent / opaque.

yet this transformed rgba image drawing is on the enhancement stage.
2021-11-24 18:36:54 +09:00
Hermet Park
f0e7ef1dbc sw_engine image: complete sequeqnce of the scaled rgb image drawing.
implement composition by translucent / opaque.
2021-11-24 17:53:10 +09:00
Hermet Park
c0c37396f7 sw_engine image: complete sequeqnce of the direct rgb image drawing.
implement composition by translucent / opaque.
2021-11-24 17:39:02 +09:00
Hermet Park
3fae64c626 sw_engine image: refactoring before further development.
separate internal functions per context
and keep the coding convention.
2021-11-24 17:13:16 +09:00
Hermet Park
e379c3e7ee
Update CONTRIBUTING.md 2021-11-24 15:58:49 +09:00
Hermet Park
7c8f651e32 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
2021-11-24 14:32:30 +09:00
Mira Grudzinska
d4c15dcf66 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.
2021-11-24 12:30:12 +09:00
Hermet Park
3221e27e3e examples: replaced png resource to verify alpha channel.
alpha blending looks a bit awkward.. need to fix it.
2021-11-23 16:16:09 +09:00
Hermet Park
16d5907642 sw_engine image: apply rgba blending.
rgba requires the default blending.
2021-11-23 15:22:28 +09:00
JunsuChoi
5e81beec53 infra stylebot: Delete existing comments
In order to avoid duplication of the already created comment,
already created results will be deleted.
2021-11-23 14:52:01 +09:00
Hermet Park
1b7f5d952e sw_engine image: code refactoring
Clarify image sequences by renaming & adding TODO comments.
2021-11-23 12:56:05 +09:00
Hermet Park
06cef2a710 sw_engine image: introduced scaled image raster logics.
These raster functions are accelerated only for the scaled images.
(no rotation, skrewed)
2021-11-23 11:41:53 +09:00
Hermet Park
49294e9142 examples: remove boundary samples.
Removed these tests from the example since it's not so proper showcases
for user scenaro.
2021-11-22 17:40:06 +09:00
Hermet Park
f887edf562 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. :(
2021-11-22 17:33:34 +09:00
JunsuChoi
baab43aff2 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.
2021-11-22 16:30:08 +09:00
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