platform/core/graphics/tizenvg.git
3 years agorevert unintended code changes while upstream code sync.
Hermet Park [Thu, 11 Mar 2021 10:05:18 +0000 (19:05 +0900)]
revert unintended code changes while upstream code sync.

Change-Id: I5c95954a470d5a1f330f3044e254b896d445426c

3 years agoexample: Duplicate.cpp modified
Mira Grudzinska [Tue, 9 Mar 2021 20:00:08 +0000 (21:00 +0100)]
example: Duplicate.cpp modified

Duplication of the Picture with a raw image is added

Change-Id: I8d069e2e829a4f869e477a6aa5076175335a6751

3 years agoupdated AUTHORS
Hermet Park [Tue, 9 Mar 2021 11:20:43 +0000 (20:20 +0900)]
updated AUTHORS

Change-Id: I43defd73b85b000aea191f017c5be30f8e195d93

3 years agoRevert "sw_engine shape/image: substituting logical 'and' with 'or'"
Hermet Park [Tue, 9 Mar 2021 11:13:44 +0000 (20:13 +0900)]
Revert "sw_engine shape/image: substituting logical 'and' with 'or'"

This reverts commit 74b27c74af220e30fef274e07f8ad4f19430d217.

This patch breaks Stroke example. 1 line drawings...

There is a possibility that less 1 (i.e: 0.5) width axis-aligned line drawings...

So logically "&&" is correct.

Change-Id: Ia98622d7df464f55a255a35ccb37fc9664ed6954

3 years agosw_engine raster: functions optimization in the image block
Mira Grudzinska [Mon, 22 Feb 2021 21:18:34 +0000 (22:18 +0100)]
sw_engine raster: functions optimization in the image block

The alpha value calculation pulled out outside the inner loop
to reduce the number of unnecessary operations.
Added local variables to reduce the number of costly
multiplications performed in a loop.

Change-Id: Ib7f68cb05d1ec8fd05df751d933ce7c2c09da484

3 years agosw_engine shape/image: substituting logical 'and' with 'or'
Mira Grudzinska [Sun, 7 Mar 2021 11:01:32 +0000 (12:01 +0100)]
sw_engine shape/image: substituting logical 'and' with 'or'

In the case when the height or width of the bounding box is 0
it is not necessary to calculate Rle.

Change-Id: Ib5351cf43d68530b83efd71d4c2dd71caf67c904

3 years agoexample: AnimateMask images change
Patryk Kaczmarek [Mon, 8 Mar 2021 01:22:42 +0000 (02:22 +0100)]
example: AnimateMask images change

Change-Id: Iacd407c3e186f1f91c2bcbd9099f0b83a9dba264

3 years agobump up version. 36/254736/1 accepted/tizen/unified/20210310.144921 submit/tizen/20210309.053112
Hermet Park [Tue, 9 Mar 2021 05:26:50 +0000 (14:26 +0900)]
bump up version.

Change-Id: I664ef791eef4afac8ce5b8ecc9dec7166a6f6c52

3 years agoUpdate README.md
Hermet Park [Sun, 7 Mar 2021 03:05:58 +0000 (12:05 +0900)]
Update README.md

3 years agoUpdate README.md
Hermet Park [Sun, 7 Mar 2021 02:58:01 +0000 (11:58 +0900)]
Update README.md

updated svg part.

3 years agosvg_loader SvgPath: Remove unnecessary optimization code
JunsuChoi [Fri, 5 Mar 2021 03:40:18 +0000 (12:40 +0900)]
svg_loader SvgPath: Remove unnecessary optimization code

This condition(optimization) is not a step suggested by arc implementation.
https://www.w3.org/TR/SVG11/implnote.html#ArcCorrectionOutOfRangeRadii (Step2)
This code is useful if the arc is too small to represent.
However, scaling often occurs in vectors, which can create unnecessary problems.

example path
<path d="M32.41,20.49a.41.41,0,1,1-.41-.42A.41.41,0,0,1,32.41,20.49Z" transform="translate(0)" fill="#020202"/>

3 years agosvg_loader SvgLoader: Fix copy conditions for stop of gradient
JunsuChoi [Thu, 4 Mar 2021 02:26:52 +0000 (11:26 +0900)]
svg_loader SvgLoader: Fix copy conditions for stop of gradient

When getting a linked stop list, if there is no existing stop list
in current gradient, it is copied.

3 years agosvgloader: fixing linear gradient transformation
Mira Grudzinska [Thu, 4 Mar 2021 00:07:42 +0000 (01:07 +0100)]
svgloader: fixing linear gradient transformation

Gradient stop points were incorrectly transformed when building
the scene in the SVG loader.

3 years agocapi: fix incorrect composite api.
Hermet Park [Thu, 4 Mar 2021 02:14:16 +0000 (11:14 +0900)]
capi: fix incorrect composite api.

Api prototype is completely wrong, now it's corrected.

3 years agosvgloader: fixing SVG image display when viewBox size is not given
Mira Grudzinska [Thu, 4 Mar 2021 00:20:36 +0000 (01:20 +0100)]
svgloader: fixing SVG image display when viewBox size is not given

When viewBox is not given its dimensions should be determined
by the height and width parameters

3 years agosw_engine fill: fixing the infinite loop condition
Mira Grudzinska [Thu, 25 Feb 2021 22:43:26 +0000 (23:43 +0100)]
sw_engine fill: fixing the infinite loop condition

Fixed in the fillFetchLinear() function.

3 years agosvgloader: fillRule value passed to the shape
Mira Grudzinska [Tue, 2 Mar 2021 14:17:25 +0000 (15:17 +0100)]
svgloader: fillRule value passed to the shape

The value was loadeed but not set to the shape.

3 years agocanvas: replacement of the bitwise OR operator with the logical one
Mira Grudzinska [Sun, 28 Feb 2021 12:01:16 +0000 (13:01 +0100)]
canvas: replacement of the bitwise OR operator with the logical one

Bitwise logical operators do not perform short-circuiting.

3 years agosw_engine fill: fix wrong gradient transformation
Hermet Park [Wed, 3 Mar 2021 01:53:32 +0000 (10:53 +0900)]
sw_engine fill: fix wrong gradient transformation

There transformation logic was not identical between shape & gradient

gradient transform was applied into center of gradient world,
while shape wasn't. So... we correct gradient transform metric to shape like.

@Issues: 255

3 years agoFix typo in CONTRIBUTING.md
Juyeong Lee [Thu, 25 Feb 2021 16:29:31 +0000 (01:29 +0900)]
Fix typo in CONTRIBUTING.md

3 years agoexamples images: correct file change mode.
Hermet Park [Thu, 25 Feb 2021 10:14:23 +0000 (19:14 +0900)]
examples images: correct file change mode.

For consistency, thorvg keeps file chmod => 664.

3 years agoscene: fix a composition regression bug.
Hermet Park [Thu, 25 Feb 2021 06:59:14 +0000 (15:59 +0900)]
scene: fix a composition regression bug.

Pre-condition is broken when this commit come - b60a773d12ef5ab558e95066b2deecea8d859e8c

Both condition should be identitcal so that comp logic is perfectly performed.

3 years agoUpdate CONTRIBUTING.md
Hermet Park [Thu, 25 Feb 2021 03:41:20 +0000 (12:41 +0900)]
Update CONTRIBUTING.md

fix typo

3 years agoupdated community guide resource.
Hermet Park [Thu, 25 Feb 2021 03:35:50 +0000 (12:35 +0900)]
updated community guide resource.

3 years agocommon: optimize scene composition
Hermet Park [Thu, 25 Feb 2021 03:38:39 +0000 (12:38 +0900)]
common: optimize scene composition

Scene could avoid composition if its children is only child (non scene)

This patch bring it conditionally check so as to avoid unnecesary expensive job.

@Issues: 254

3 years agoUpdate CONTRIBUTING.md
Hermet Park [Thu, 25 Feb 2021 03:35:41 +0000 (12:35 +0900)]
Update CONTRIBUTING.md

updated guideline

3 years agoexamples: new AnimateMask example and svg images with masks
Patryk Kaczmarek [Tue, 23 Feb 2021 12:37:36 +0000 (13:37 +0100)]
examples: new AnimateMask example and svg images with masks

Change-Id: I609597a5ecb710e9af9939a3028eeef691b66188

3 years agoUpdate CONTRIBUTING.md
Hermet Park [Thu, 25 Feb 2021 03:18:47 +0000 (12:18 +0900)]
Update CONTRIBUTING.md

++updated

3 years agosw_engine: fix a composition crash issue.
Hermet Park [Wed, 24 Feb 2021 11:01:31 +0000 (20:01 +0900)]
sw_engine: fix a composition crash issue.

Added an exceptional handling for out of buffer boundary.

3 years agocanvas: fix crash issue.
Hermet Park [Wed, 24 Feb 2021 10:53:39 +0000 (19:53 +0900)]
canvas: fix crash issue.

When canvas target size is changed, it need to update all retained paints again
so that they cannot redraw onto out of buffer boundary.

3 years agofixed all wasm build breaks.
Hermet Park [Tue, 23 Feb 2021 01:47:46 +0000 (10:47 +0900)]
fixed all wasm build breaks.

3 years agoIssue 180 example (#212)
Michal Szczecinski [Mon, 22 Feb 2021 04:30:05 +0000 (05:30 +0100)]
Issue 180 example (#212)

* examples: Added resize_cb to Capi example.

resize_cb in capi example is used to verify crash on reize described
in @180 issue.

* examples capi: Fixed file type from dos to unix.

Use the same code style as it is used in other examples.

3 years agosw common: Fixed crash in rasterRGBA32
Michal Szczecinski [Wed, 17 Feb 2021 14:09:28 +0000 (15:09 +0100)]
sw common: Fixed crash in rasterRGBA32

Description:
Crash was observed in examples when composite object was used.
It was caused because __m256i object was used on non aligned
memory to 32bit. Algorithm in this function was changed to use
unaligned __m256i_u object. Code was also simplified.

3 years agosw_engine raster: fixing rasterization of an image with InvMask
Mira Grudzinska [Fri, 5 Feb 2021 00:45:26 +0000 (01:45 +0100)]
sw_engine raster: fixing rasterization of an image with InvMask

In case of the image rasterization with an inverse mask the opacity
was omitted and the alpha value instead of the inverse alpha value was used.

3 years agosw_engine: enhance log message.
Hermet Park [Mon, 22 Feb 2021 03:53:09 +0000 (12:53 +0900)]
sw_engine: enhance log message.

more informational log is better.

3 years agosw_engine math: fixing matrix transformation
Mira Grudzinska [Thu, 21 Jan 2021 02:24:11 +0000 (03:24 +0100)]
sw_engine math: fixing matrix transformation

Unnecessary rounding during matrix transformation has been removed.
The problem occured when scaling a shape with a dashed stroke.

3 years agocommon Scene: Fix translucent composition condition
JunsuChoi [Thu, 4 Feb 2021 05:47:01 +0000 (14:47 +0900)]
common Scene: Fix translucent composition condition

If a scene has another scene as a child and
the number of children is 1, the composition of the child does not work.
Therefore, fix that composition works as long as the number of children is not 0.

3 years agoSvgLoader: Mask style implementation accepted/tizen/unified/20210223.065502 submit/tizen/20210222.014318
Patryk Kaczmarek [Tue, 9 Feb 2021 20:03:10 +0000 (21:03 +0100)]
SvgLoader: Mask style implementation

Supprot case when style is defined as <mask> attribute.

[Example SVG file]
```html
<svg version="1.1" id="Layer_1" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve"
  xmlns="http://www.w3.org/2000/svg">
  <defs>
    <mask id="myMask">
      <circle id="maskID" cx="40" cy="40" r="10" fill="white" fill-opacity="1" />
    </mask>
  </defs>
  <rect x="0" y="0" width="64" height="64" style="fill: skyblue; mask=url(#myMask);"/>
</svg>
```

Change-Id: I3b856db85204bf7c503a20e4023417ca79aa930c

3 years agosw_engine Renderer: Fix build problem caused by merge conflict.
JunsuChoi [Fri, 19 Feb 2021 08:28:17 +0000 (17:28 +0900)]
sw_engine Renderer: Fix build problem caused by merge conflict.

3 years agosw_engine: adding a gradient as a stroke feature
Mira Grudzinska [Fri, 19 Feb 2021 08:16:10 +0000 (09:16 +0100)]
sw_engine: adding a gradient as a stroke feature

* sw_engine: adding a gradient as a stroke feature

Similarly as a shape may have a gradient fill so can the stroke.

* Capi: adding APIs for a gradient stroke

Co-authored-by: Hermet Park <hermetpark@gmail.com>
3 years agoexample StrokeGradient
Mira Grudzinska [Tue, 19 Jan 2021 11:35:57 +0000 (12:35 +0100)]
example StrokeGradient

Example showing a gradient usage for a stroke.

3 years agocommon: TVG_UNUSED marking on unused parameter
JunsuChoi [Fri, 19 Feb 2021 07:14:14 +0000 (16:14 +0900)]
common: TVG_UNUSED marking on unused parameter

3 years agoshape: Refactoring to use initialize list
JunsuChoi [Fri, 19 Feb 2021 07:12:11 +0000 (16:12 +0900)]
shape: Refactoring to use initialize list

Member data should be initialized in-class or in a constructor initialization list

3 years agocommon: Refactoring incorrectly declared loop variable
JunsuChoi [Fri, 19 Feb 2021 06:58:00 +0000 (15:58 +0900)]
common: Refactoring incorrectly declared loop variable

Loop variables should be declared in the minimal possible scope
thorvg prefers to declare when using local variables.

3 years agocommon: Pointer that can declare const are refactored to use const
JunsuChoi [Fri, 19 Feb 2021 06:47:44 +0000 (15:47 +0900)]
common: Pointer that can declare const are refactored to use const

Pointer and reference parameters should be "const" if the corresponding object is not modified

3 years agocommon: Functions that can declare const are refactored to use const
JunsuChoi [Fri, 19 Feb 2021 06:22:17 +0000 (15:22 +0900)]
common: Functions that can declare const are refactored to use const

Member functions that don't mutate their objects should be declared "const"

3 years agosw_engine rle: fixing clipping with non overlaping figures
Mira Grudzinska [Sat, 6 Feb 2021 23:01:49 +0000 (00:01 +0100)]
sw_engine rle: fixing clipping with non overlaping figures

For clip that did not overlap with the plotted source, the whole
source was plotted - the size of the rle data was not updated.

3 years agocommon: Fix ubuntu version in build test
JunsuChoi [Fri, 19 Feb 2021 05:22:47 +0000 (14:22 +0900)]
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.

3 years agocommon render: removed unnecessary assignments in update() fun
Mira Grudzinska [Mon, 1 Feb 2021 00:33:50 +0000 (01:33 +0100)]
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.

3 years agoinfra CI: Introduce new build test with github action
JunsuChoi [Tue, 26 Jan 2021 02:36:09 +0000 (11:36 +0900)]
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.

3 years agocommon: Clean up code
JunsuChoi [Tue, 16 Feb 2021 02:19:19 +0000 (11:19 +0900)]
common: Clean up code

- Combine if condition with the same return value.
- Remove empty space
- Remove tab

3 years agoinfra coding_style: Add coding style check bot
JunsuChoi [Wed, 13 Jan 2021 04:12:57 +0000 (13:12 +0900)]
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.

3 years agosw_engine raster: checking zero division while inverting the transform matrix
Mira Grudzinska [Wed, 3 Feb 2021 13:00:35 +0000 (14:00 +0100)]
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.

3 years agosw_engine raster: adding rastering functions for image without transformation
Mira Grudzinska [Thu, 4 Feb 2021 01:10:14 +0000 (02:10 +0100)]
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.

3 years agoexample ClipPath: update
Mira Grudzinska [Sat, 6 Feb 2021 23:33:01 +0000 (00:33 +0100)]
example ClipPath: update

Added example with non-overlaping clip and shape.

3 years agoUpdate CONTRIBUTING.md
Hermet Park [Wed, 3 Feb 2021 02:33:39 +0000 (11:33 +0900)]
Update CONTRIBUTING.md

updated maintainers.

3 years agosw_engine raster: removing unnecessary logical 'and' operation
Mira Grudzinska [Mon, 1 Feb 2021 23:55:42 +0000 (00:55 +0100)]
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.

3 years agorenderer: Fixed RenderUpdate::All flag fields.
Michal Szczecinski [Tue, 2 Feb 2021 09:43:48 +0000 (10:43 +0100)]
renderer: Fixed RenderUpdate::All flag fields.

All flag should have all bits set to 1.

3 years agoshape: Fixed reset api.
Michal Szczecinski [Tue, 2 Feb 2021 10:00:30 +0000 (11:00 +0100)]
shape: Fixed reset api.

Added stroke's RLE reset in shape reset function.

3 years agosw_engine renderer: rendering optimization of shapes without strokes
Mira Grudzinska [Tue, 26 Jan 2021 00:28:24 +0000 (01:28 +0100)]
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.

3 years agosw_engine composition: invert alpha masking
Patryk Kaczmarek [Mon, 18 Jan 2021 03:41:01 +0000 (04:41 +0100)]
sw_engine composition: invert alpha masking

composition invert alpha masking

@Examples: added InvMasking

@Issues: 31

Change-Id: I2ee9d428d5749240ddf2e6adbb7677dccbe1926f

3 years agosvg_loader SvgLoader: Prevent memory leak
JunsuChoi [Mon, 1 Feb 2021 04:22:44 +0000 (13:22 +0900)]
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.

3 years agoCapi: Composite Method binding
Patryk Kaczmarek [Tue, 26 Jan 2021 03:57:56 +0000 (04:57 +0100)]
Capi: Composite Method binding

Change-Id: Ia08f08f93aea5c047ef3c397fd63524fcd13d8c6

3 years agocommon: Removed doxyfile
Michal Szczecinski [Mon, 25 Jan 2021 05:20:46 +0000 (06:20 +0100)]
common: Removed doxyfile

Change-Id: I5a32bdf16034872b37be89906878c95b43adbedd

3 years agocapi: Added doxygen comments and doxygen config file.
Michal Szczecinski [Tue, 19 Jan 2021 20:48:30 +0000 (21:48 +0100)]
capi: Added doxygen comments and doxygen config file.

Change-Id: I2ffa5d201d6af4fe0fd353ed04736638fcf9bf19

3 years agocommon picture: fix minor logic.
Hermet Park [Wed, 20 Jan 2021 14:29:15 +0000 (23:29 +0900)]
common picture: fix minor logic.

missing nulling pointer,
also return value properly.

3 years agocommon canvas: fix non-updated paints.
Hermet Park [Wed, 20 Jan 2021 13:57:29 +0000 (22:57 +0900)]
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

3 years agocommon paint: duplicate composition target. submit/tizen/20210117.211744
Hermet Park [Sun, 10 Jan 2021 14:34:22 +0000 (23:34 +0900)]
common paint: duplicate composition target.

composition target also copied in duplication.

added missing part.

Change-Id: I3ea084de1b5b27f72a80f34c74580d12b0962cc4

3 years agosw_engine composition: enhance image masking
Hermet Park [Sun, 10 Jan 2021 11:37:20 +0000 (20:37 +0900)]
sw_engine composition: enhance image masking

composition alpha masking supports scene/paints targets.

@Examples: Masking

@Issues: 31

Change-Id: I7aed18172fab54a2e31ccf8894fcb6fb6925a8a8

3 years agosw_engine: optimize raster image.
Hermet Park [Sun, 10 Jan 2021 10:54:05 +0000 (19:54 +0900)]
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.

Change-Id: Ibffb6b9fe06d39b5e1ba342f693f9fc64ccb7314

3 years agocommon paint: code refactoring.
Hermet Park [Sun, 10 Jan 2021 08:53:16 +0000 (17:53 +0900)]
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.

Change-Id: I1acaab3b46c9269fa72e1cb9d92d0667d203d3fd

3 years agosw_engine renderer: fix invalid rle issue.
Hermet Park [Sun, 10 Jan 2021 08:24:55 +0000 (17:24 +0900)]
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

Change-Id: Iaa187d1fac1e3f4fa0106d0b5e499cac0c7ef207

3 years agocommon sw_engine: revise the masking implementation. accepted/tizen/unified/20210112.123540 submit/tizen/20210110.221552
Hermet Park [Sun, 3 Jan 2021 15:46:59 +0000 (00:46 +0900)]
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.

3 years agocommon: keep consistency file permissions => 664 accepted/tizen/unified/20210104.130303 submit/tizen/20210103.044544 submit/tizen/20210103.212140
Hermet Park [Wed, 30 Dec 2020 04:25:38 +0000 (13:25 +0900)]
common: keep consistency file permissions => 664

Change-Id: I9acae8d5e75f05a3d2d741855724062c76f83725

3 years agogl_engine: fix coding convention.
Hermet Park [Wed, 30 Dec 2020 03:40:54 +0000 (12:40 +0900)]
gl_engine: fix coding convention.

no logical changes.

Change-Id: I3daa0840e1b49bb6344e1137434d0d5f5ebe1aee

3 years agoCapi: Shape bounds binding
mmaciola [Wed, 30 Dec 2020 03:40:03 +0000 (04:40 +0100)]
Capi: Shape bounds binding

Change-Id: I25d7abb67b71007be3aa86d70c6fb1c73af08caf
Co-authored-by: Michal Maciola <m.maciola@samsung.com>
3 years agosw_engine: apply opacity to graident fill case.
Hermet Park [Wed, 30 Dec 2020 03:38:32 +0000 (12:38 +0900)]
sw_engine: apply opacity to graident fill case.

previously, opacity value is ignored to gradient fill.

This patch implements that case.

Change-Id: Iaaba617659e708d1484ca9b2256395397cc95a33

3 years agocommon gl_engine: transformation support
pankajkumar20 [Wed, 30 Dec 2020 03:23:22 +0000 (08:53 +0530)]
common gl_engine: transformation support

support transformation of shapes some partial cases.

Change-Id: Ib2ca857dfda26cf63d9548af9f584a2152eaf363

3 years agosw_engine renderer: fix a regression bug.
Hermet Park [Sun, 27 Dec 2020 15:22:24 +0000 (00:22 +0900)]
sw_engine renderer: fix a regression bug.

recover a broken shape+stroking opacity that introduced in ealier refactoring...

Change-Id: Ie40bd81c06d094118c34a1686adb57a91c4330ce

3 years agoexample ClipPath: ++coverage
Hermet Park [Sun, 27 Dec 2020 15:19:51 +0000 (00:19 +0900)]
example ClipPath: ++coverage

Apply gradient usage in clip path.

Change-Id: I6e520fba896ed2f75089acc73a2f5fe20fc82e5e

3 years agocommon sw_engine: code refactoring
Hermet Park [Fri, 25 Dec 2020 11:44:07 +0000 (20:44 +0900)]
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.

Change-Id: I1eff72e5fe719b6e8b49c22dda53c0a365c6a2a0

3 years agotools format: remove tizen specific
Hermet Park [Fri, 25 Dec 2020 11:05:42 +0000 (20:05 +0900)]
tools format: remove tizen specific

When ready, we will use this c++ formatter...

Change-Id: I12a66e1ea1f9946c964acd39b5212b1ad5c26cd1

3 years agocommon composite: code refactoring
Hermet Park [Fri, 25 Dec 2020 10:47:01 +0000 (19:47 +0900)]
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.

Change-Id: Ic86983f0701defd6ef4c9cc4b7bb795753b0266e

3 years agocommon shape: code refactoring
Hermet Park [Wed, 23 Dec 2020 06:37:38 +0000 (15:37 +0900)]
common shape: code refactoring

don't convert data type(float-double) during computation.

Change-Id: Iaeb2d1de54505456bb0e5ae6f587b99fa2022154

3 years agosw_engine shape: expand the algorithm to draw arcs with negative angles
Mira Grudzinska [Tue, 22 Dec 2020 12:12:58 +0000 (13:12 +0100)]
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.

Change-Id: I2546f4d5214d315dff33e7ed4161848af1f0b0b3

3 years agosw_engine renderer: fix wrong conditional check.
Hermet Park [Tue, 22 Dec 2020 02:09:48 +0000 (11:09 +0900)]
sw_engine renderer: fix wrong conditional check.

unsigned int won't be less than 0.

Change-Id: Ib9462f2d11168d794e93a66ea052c1fb6e05ebd5

3 years agosvg_loader: fixed wrong boundary check
Hermet Park [Tue, 22 Dec 2020 02:03:13 +0000 (11:03 +0900)]
svg_loader: fixed wrong boundary check

sz must be less than 20 to append 'carriage return'

Change-Id: Idee7610af58082e18edaf4db30e06566d2600ac2

3 years agoraw_loader: remove unnecessary declaration.
Hermet Park [Tue, 22 Dec 2020 01:55:23 +0000 (10:55 +0900)]
raw_loader: remove unnecessary declaration.

Change-Id: Ifc284ef639649b8f2a9e336ef192dadf7e3bb7ed

3 years agosw_engine raster: fix incorrect condition check.
Hermet Park [Tue, 22 Dec 2020 01:46:51 +0000 (10:46 +0900)]
sw_engine raster: fix incorrect condition check.

These values won't be less than zero since they are unsigned types.

Change-Id: I8b6e4c2c7fed230fd25cc43614ac0cb8148b6ac4

3 years agocommon shape: ++safety
Hermet Park [Tue, 22 Dec 2020 01:42:11 +0000 (10:42 +0900)]
common shape: ++safety

null check after memory allocation.

Change-Id: I38c8021442e9eed5059143e1655256f2cd353b3d

3 years agosw_engine log: adding missed line wrap.
Hermet Park [Mon, 21 Dec 2020 09:38:12 +0000 (18:38 +0900)]
sw_engine log: adding missed line wrap.

Change-Id: Iabaee4fd0336ae0e44e812afbaed95f66dcc72a7

3 years agosw_engine log: + log clipPath case.
Hermet Park [Mon, 21 Dec 2020 09:35:11 +0000 (18:35 +0900)]
sw_engine log: + log clipPath case.

These functions are one of special compositions.

Change-Id: I5f992ddec04d0cde064dede1465c4658a25862d1

3 years agosvg_loader SvgLoader: Add memory allocation failed check
JunsuChoi [Fri, 18 Dec 2020 03:20:01 +0000 (12:20 +0900)]
svg_loader SvgLoader: Add memory allocation failed check

Prevent to null access when out of memory.

Change-Id: If322dfbcb91c3d5549d849702b174e1d71fd0242

3 years agoraw_loader RawLoader: Add initialize
JunsuChoi [Fri, 18 Dec 2020 02:08:42 +0000 (11:08 +0900)]
raw_loader RawLoader: Add initialize

Add initialization to 'copy' member

Change-Id: Ie593ceb1ae0d0c8368bd1ce720e2ce565ef3dbb4

3 years agosvg_loader SvgLoader: Prevent array overflow
JunsuChoi [Fri, 18 Dec 2020 02:05:22 +0000 (11:05 +0900)]
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.

Change-Id: I26e85aa8a3b7e2aad1ec849d14a8b4da6e1bcbf7

3 years agoinc header: remove unnecessary declaration.
Hermet Park [Fri, 18 Dec 2020 10:24:36 +0000 (19:24 +0900)]
inc header: remove unnecessary declaration.

This log tag is not used. We can introduce it when it's necessary.

Change-Id: I8fb8fcd5f006b44d2339dd999c474577be6e17be

3 years agoexamples mask: revise the example code.
Hermet Park [Fri, 18 Dec 2020 10:21:34 +0000 (19:21 +0900)]
examples mask: revise the example code.

Yet, this isn't work properly but it supposed to do

We need to fix alpha mask logic.

Change-Id: I1cef63c96663e35214e995c81c140d2cc0266bbc

3 years agocommon sw_engine: fix build break.
Hermet Park [Fri, 18 Dec 2020 08:44:59 +0000 (17:44 +0900)]
common sw_engine: fix build break.

some wrong merge conflicts left. resolve them.

Change-Id: I3f0a04fcf72089c7b0637347b4b05c90b51fbeae

3 years agocommon composition: support Masking method
Patryk Kaczmarek [Fri, 18 Dec 2020 08:40:54 +0000 (09:40 +0100)]
common composition: support Masking method

New feature - CompositeMethod::MaskAlpha

Newly Support AlphaMask. but it's unstable.

@Issues: 31

Change-Id: I86827870ed0c040ffc676569df13f4bd8c6e9348

3 years agosvg_loader XmlParser: code refactoring. submit/tizen/20201220.213638
Hermet Park [Thu, 17 Dec 2020 07:11:09 +0000 (16:11 +0900)]
svg_loader XmlParser: code refactoring.

just renamed _nodeTypeToString() -> xmlParserNodeTypeToString()

+ print meson message if log is enabled.

Change-Id: Ic7593daaad93518d9a77d3bccdf3fbb6d802ca8d