Commit graph

714 commits

Author SHA1 Message Date
JunsuChoi
2657acc1bc common: Fix ubuntu version in build test
github action started updating to ubuntu20.04 for ubuntu-latest.
So fix Ubuntu version 18.04 as we are not ready enough to test for 20.04 yet.
2021-02-19 14:32:51 +09:00
Mira Grudzinska
f1fd23cf32 common render: removed unnecessary assignments in update() fun
The rotation part of the transformation matrix can be assigned,
it does not have to be multiplied by the identity matrix.
The values of e13 and e23 of the transformation matrix represents the translation,
so they don't need to be taken into account in the rotation part.
2021-02-19 14:11:44 +09:00
JunsuChoi
e5f59b53a4 infra CI: Introduce new build test with github action
This is a build checker using the github action.
When a pull request occurs this action does a basic build,
example build, build with test.
2021-02-19 12:59:35 +09:00
JunsuChoi
c63f961b9c common: Clean up code
- Combine if condition with the same return value.
- Remove empty space
- Remove tab
2021-02-18 14:03:47 +09:00
JunsuChoi
6a4598f706 infra coding_style: Add coding style check bot
Add a bot that checks the coding style using cpplint
and reports the result as a review comment.

This feature refers to the repository where cpplint
and docker settings with github-action.
This action works whenever a PR is created and updated.

In cpplint, only the violation of ThorVG's coding style is reported
as a warning using several options.
whitespace/parens
whitespace/indent
whitespace/end_of_line
whitespace/blank_line

The bot will review all of the contents of all files in the current commit file list,
However, in the future, we will improve Bot to only review the changes.
2021-02-18 14:00:21 +09:00
Mira Grudzinska
6925f6c272 sw_engine raster: checking zero division while inverting the transform matrix
In case the user has provided the transformation matrix, it is possible that
the inverse matrix does not exist.
2021-02-09 09:26:37 +09:00
Mira Grudzinska
46f8945028 sw_engine raster: adding rastering functions for image without transformation
Added rastering functions for the image (transparent and not) for the fast
track option - identity transform.
2021-02-09 09:21:53 +09:00
Mira Grudzinska
e154bfb264 example ClipPath: update
Added example with non-overlaping clip and shape.
2021-02-09 09:10:34 +09:00
Hermet Park
6ff2b781cd
Update CONTRIBUTING.md
updated maintainers.
2021-02-03 11:33:39 +09:00
Mira Grudzinska
307f3698a8 sw_engine raster: removing unnecessary logical 'and' operation
Shifting the 32-bit number by 24 bits leaves only 8 bits,
so there is no need to mask them with 0xFF.
2021-02-03 11:25:19 +09:00
Michal Szczecinski
8003c439fe renderer: Fixed RenderUpdate::All flag fields.
All flag should have all bits set to 1.
2021-02-03 11:24:00 +09:00
Michal Szczecinski
ba2bd2383d shape: Fixed reset api.
Added stroke's RLE reset in shape reset function.
2021-02-03 11:23:21 +09:00
Mira Grudzinska
3dfc3c4943 sw_engine renderer: rendering optimization of shapes without strokes
The value of 'a' for shapes without a stroke could hold the fill 'a' value.
Added checking if stroke exists before calling rastering functions.
2021-02-02 11:53:58 +09:00
Patryk Kaczmarek
905fd46ccf sw_engine composition: invert alpha masking
composition invert alpha masking

@Examples: added InvMasking

@Issues: 31

Change-Id: I2ee9d428d5749240ddf2e6adbb7677dccbe1926f
2021-02-02 11:47:30 +09:00
JunsuChoi
5c914f4ad2 svg_loader SvgLoader: Prevent memory leak
When OOM of SvgLinear/RadialGradient occurs,
the allocated id, ref, transform may become a memory leak.
Therefore, add free memory.
2021-02-02 10:51:50 +09:00
Patryk Kaczmarek
9b4769076f Capi: Composite Method binding 2021-01-26 20:36:40 +09:00
Michal Szczecinski
7d01a1c232 common: Removed doxyfile 2021-01-25 23:25:11 +09:00
Michal Szczecinski
975fdc8a39 capi: Added doxygen comments and doxygen config file. 2021-01-25 23:25:11 +09:00
Hermet Park
6db796acf3 common picture: fix minor logic.
missing nulling pointer,
also return value properly.
2021-01-20 23:29:15 +09:00
Hermet Park
e9939dec82 common canvas: fix non-updated paints.
When shapes are poped from canvas while retaining shapes instances,
they have no chances to redraw after pushed again due to missing flag.

This patch fixes it by forcely updating flag on pushing time.

@Issues: 181
2021-01-20 23:20:51 +09:00
Hermet Park
9e8410b9bd common paint: duplicate composition target.
composition target also copied in duplication.

added missing part.
2021-01-10 23:39:04 +09:00
Hermet Park
3a156b6307 sw_engine composition: enhance image masking
composition alpha masking supports scene/paints targets.

@Examples: Masking

@Issues: 31
2021-01-10 23:22:01 +09:00
Hermet Park
581e33b954 sw_engine: optimize raster image.
added a routine that draw non-transformed translucent image.
composition images will use this routine to draw faster.

Also added optimization point comments in raster image.
2021-01-10 20:11:37 +09:00
Hermet Park
dc70920b40 common paint: code refactoring.
remove the opacity argument in the render method.

Considered again, this opacity value is not commonly used yet.
we can introduce it when it's necessary.
2021-01-10 18:04:42 +09:00
Hermet Park
0e9115cd00 sw_engine renderer: fix invalid rle issue.
if shape rendering is failed, all the prepared data must be reset
because those are invalid.

@Issues: 180
2021-01-10 17:39:57 +09:00
Hermet Park
736d6ee4ef
common sw_engine: revise the masking implementation.
We re-implement the masking feature with image composition method.

This patch is working only for single shape but settle up coming extensions.
2021-01-04 00:46:59 +09:00
Hermet Park
333ff3a12b common: keep consistency file permissions => 664 2020-12-30 13:25:38 +09:00
Hermet Park
d08d87dc0b
gl_engine: fix coding convention.
no logical changes.
2020-12-30 12:40:54 +09:00
mmaciola
d0799d8fa1
Capi: Shape bounds binding
Co-authored-by: Michal Maciola <m.maciola@samsung.com>
2020-12-30 12:40:03 +09:00
Hermet Park
cfa2d187bf
sw_engine: apply opacity to graident fill case.
previously, opacity value is ignored to gradient fill.

This patch implements that case.
2020-12-30 12:38:32 +09:00
pankajkumar20
f096570360
common gl_engine: transformation support
support transformation of shapes some partial cases.
2020-12-30 12:23:22 +09:00
Hermet Park
c3d0a79d3e sw_engine renderer: fix a regression bug.
recover a broken shape+stroking opacity that introduced in ealier refactoring...
2020-12-29 12:07:05 +09:00
Hermet Park
7e6f30830b example ClipPath: ++coverage
Apply gradient usage in clip path.
2020-12-28 00:19:51 +09:00
Hermet Park
7d9023ac5c common sw_engine: code refactoring
Renamed internal interfaces.

We need both blender & compositor interfaces.

Renamed SwCompositor -> SwBlender which is for pixel joining methods.

Added (SwCompositor, Compositor) which is designed for compositing images.
2020-12-25 20:54:56 +09:00
Hermet Park
c1e36bcb01 tools format: remove tizen specific
When ready, we will use this c++ formatter...
2020-12-25 20:06:26 +09:00
Hermet Park
4767f83b99
common composite: code refactoring
Splited out ClipPath routine from other pixel compositions'
since yet it's unlikely compatible...

Also revise internal engine interfaces to be simpler.

This is a step forward to enhance masking feature.
2020-12-25 19:47:01 +09:00
Hermet Park
9cb256f473 common shape: code refactoring
don't convert data type(float-double) during computation.
2020-12-23 15:38:23 +09:00
Mira Grudzinska
d3bd55dbc7 sw_engine shape: expand the algorithm to draw arcs with negative angles
The _appendArc function allows to draw angles only in a clockwise direction.
The introduced improvement allows to change this direction by giving the 'sweep' argument
with a negative value.
2020-12-23 15:34:18 +09:00
Hermet Park
ac43ec591e sw_engine renderer: fix wrong conditional check.
unsigned int won't be less than 0.
2020-12-22 11:09:48 +09:00
Hermet Park
e737ee4a4f svg_loader: fixed wrong boundary check
sz must be less than 20 to append 'carriage return'
2020-12-22 11:04:39 +09:00
Hermet Park
59ffa16b32 raw_loader: remove unnecessary declaration. 2020-12-22 10:55:23 +09:00
Hermet Park
b7312a11d4 sw_engine raster: fix incorrect condition check.
These values won't be less than zero since they are unsigned types.
2020-12-22 10:46:51 +09:00
Hermet Park
168999c5a9 common shape: ++safety
null check after memory allocation.
2020-12-22 10:42:11 +09:00
Hermet Park
849ed12050 sw_engine log: adding missed line wrap. 2020-12-21 18:38:12 +09:00
Hermet Park
4c66018c97 sw_engine log: + log clipPath case.
These functions are one of special compositions.
2020-12-21 18:35:11 +09:00
JunsuChoi
438b7d6b02 svg_loader SvgLoader: Add memory allocation failed check
Prevent to null access when out of memory.
2020-12-18 19:51:06 +09:00
JunsuChoi
21b751291a raw_loader RawLoader: Add initialize
Add initialization to 'copy' member
2020-12-18 19:51:06 +09:00
JunsuChoi
f13e1947ff svg_loader SvgLoader: Prevent array overflow
Since tagName array set '\0' at the end,
it may overflow when sz reaches 20.
So make it a maximum of 19.
2020-12-18 19:51:06 +09:00
Hermet Park
1e02d62d01 inc header: remove unnecessary declaration.
This log tag is not used. We can introduce it when it's necessary.
2020-12-18 19:25:24 +09:00
Hermet Park
87aa90c4ec examples mask: revise the example code.
Yet, this isn't work properly but it supposed to do

We need to fix alpha mask logic.
2020-12-18 19:21:34 +09:00