platform/core/graphics/tizenvg.git
10 days agoVersion 0.8.18 26/325126/1 accepted/tizen_unified accepted/tizen_unified_x tizen accepted/tizen/unified/20250604.163028 accepted/tizen/unified/x/20250604.211408
jykeon [Wed, 4 Jun 2025 01:23:01 +0000 (10:23 +0900)]
Version 0.8.18

Change-Id: I49079359f8abc1eafe031314ccc2fa6611439c93
Signed-off-by: jykeon <jykeon@samsung.com>
10 days agofasttrack is enabled when there is fill. If there is no fill, complex rendering logic... 50/325050/2
joogab.yun [Fri, 30 May 2025 08:02:23 +0000 (17:02 +0900)]
fasttrack is enabled when there is fill. If there is no fill, complex rendering logic is required.

Change-Id: I11faf4f36f6fcc6640cf520bf421075fd6d78917
(cherry picked from commit f5b2eb597112858732a587f288b596bcd9f0ff14)

5 months agosvg_loader: removing setting the locale 88/317288/1 accepted/tizen_unified_x_asan accepted/tizen/unified/20250113.133503 accepted/tizen/unified/x/20250114.041838 accepted/tizen/unified/x/asan/20250211.003418
joogab.yun [Mon, 30 Dec 2024 05:43:18 +0000 (14:43 +0900)]
svg_loader: removing setting the locale

The locale was set while reading the path attr,
which could have caused race conditions between
threads and potentially led to crashes.
Now removed as unnecessary.

https://github.com/thorvg/thorvg/pull/1390

Change-Id: Ieb88bbffaffdf5c1613fe663c328f6964b369725

7 months agoversion 0.8.17 91/319991/1 accepted/tizen/unified/20241108.105425 accepted/tizen/unified/x/20241218.032647 accepted/tizen/unified/x/asan/20241224.004415
joogab.yun [Wed, 6 Nov 2024 06:12:03 +0000 (15:12 +0900)]
version 0.8.17

Change-Id: Ia75aacc6b24cbc1395c9ad240ba556214b61dc69

7 months agocanvas/paint: ++exception handling 89/319989/2
joogab.yun [Wed, 6 Nov 2024 05:58:02 +0000 (14:58 +0900)]
canvas/paint: ++exception handling

enhanced reference count verification
to prevent unintentional deletion of used composition targets.

Change-Id: I71c3339eea1d57cad7b6631a5756acde6d15aefa

11 months agoViersion : 0.8.16 48/314148/1 accepted/tizen_unified_dev accepted/tizen_unified_toolchain accepted/tizen/9.0/unified/20241030.232409 accepted/tizen/unified/20240708.173209 accepted/tizen/unified/dev/20240709.043442 accepted/tizen/unified/toolchain/20240812.132617 accepted/tizen/unified/x/20240709.014200 accepted/tizen/unified/x/asan/20240813.230910 tizen_9.0_m2_release
joogab.yun [Mon, 8 Jul 2024 01:08:32 +0000 (10:08 +0900)]
Viersion : 0.8.16

Change-Id: I1ab2ddf2a23a9992b68670e320282c56c169871f

11 months agosvg_loader: Fix incorrect stack.pop() call in loader 90/314090/2
joogab.yun [Fri, 5 Jul 2024 04:57:22 +0000 (13:57 +0900)]
svg_loader: Fix incorrect stack.pop() call in loader
loader->stack.pop() at line 3271 is called to remove
the defs node added to the stack due to nested graphics elements.
However, it is called in an inappropriate situation and the loader's node tree is damaged.
Fixes an error where the close tag is recognized as a `line` of the graphics tag when it is `linearGradient`.
ex)
```
    <defs id="def">
        <linearGradient x1="1" y1="2" x2="3" y2="4" id="l"/>
        </linearGradient>
        <rect x="10" y="10" width="10" height="10"  fill="blue" id="r2"/>
    </defs>
```

related issue: #2518

Change-Id: I42a9076750771ffea00ee6160d3691de7fc3444d

11 months agosvg_loader: fixing finding defs node 30/314030/2
joogab.yun [Thu, 4 Jul 2024 05:10:22 +0000 (14:10 +0900)]
svg_loader: fixing finding defs node

    In the case when a 'use' node was used
    in a 'defs' block  and the element it
    referenced was also defined within the same
    'defs' block, the reference node could not
    be cloned. This was because the 'defs' node
    could not be located.

    @Issue: https://github.com/thorvg/thorvg/issues/1451

Change-Id: I5ea9f55bafe6a1d16a45ee025306f5a7694c309c

11 months agoBump up 0.8.15. 98/313998/1
joogab.yun [Thu, 4 Jul 2024 01:45:34 +0000 (10:45 +0900)]
Bump up 0.8.15.

Change-Id: I6f54a7f39363acea7c6f246a8e382be7ad1a97d7

11 months agoloader/svg: Check current graphics node that not closed 32/313732/2
joogab.yun [Mon, 1 Jul 2024 08:17:49 +0000 (17:17 +0900)]
loader/svg: Check current graphics node that not closed

If any of the graphics nodes are not closed,
the graphics nodes between them are ignored.

Change-Id: Ibe1ea8df4494fca4ca412c25826a5f460d2d5b9e

11 months agoscene: fixing nested masking 13/313713/2
joogab.yun [Mon, 1 Jul 2024 06:45:15 +0000 (15:45 +0900)]
scene: fixing nested masking
For any type of masking composition may be required.

Change-Id: Ieb731646098c87535bbe764b48018267f1dc9a92

11 months agoloader/svg: Fix maskContentUnits userSpaceOnUse/objectBoundingBox #1696 12/313712/2
joogab.yun [Mon, 1 Jul 2024 05:54:18 +0000 (14:54 +0900)]
loader/svg: Fix maskContentUnits userSpaceOnUse/objectBoundingBox #1696

Change-Id: Ieeadc6a30cf062e3d9a794873a5a6e37f29a925f

11 months agosvg_loader: fixing parsing empty tags 11/313711/2
joogab.yun [Mon, 1 Jul 2024 05:40:37 +0000 (14:40 +0900)]
svg_loader: fixing parsing empty tags
Self-closing tags (empty elements) were parsed until
the appearance of the '>' character, causing the '/'
char to be appended to the tag name. The final '/'
char should be omitted.

Change-Id: Ifd0f61abf588e77598fcd2d57210ef7610f617a9

11 months agosvg_loader: update style in defs 10/313710/2
joogab.yun [Mon, 1 Jul 2024 05:24:10 +0000 (14:24 +0900)]
svg_loader: update style in defs

In the defs node the style was not updated, hence
the inheritance wasn't applied causing wrong results.

Change-Id: I41a6c9df22cdd5320debdfb1ef0fac08d58aa1e8

11 months agosvg_loader: support other units for mask and clip 09/313709/2
joogab.yun [Mon, 1 Jul 2024 05:21:57 +0000 (14:21 +0900)]
svg_loader: support other units for mask and clip

Added support for the objectBoundingBox value of
the clipPathUnits and for the userSpaceOnUse value
of the maskContentUnits.

Change-Id: I81d8d7701185881e68b4424b58ca6ee301e25dc4

21 months agoBump up 0.8.14. 80/297680/1 accepted/tizen_unified_riscv accepted/tizen/8.0/unified/20231005.093337 accepted/tizen/unified/20230823.173937 accepted/tizen/unified/dev/20240620.005427 accepted/tizen/unified/riscv/20231114.110411 tizen_8.0_m2_release
jykeon [Wed, 23 Aug 2023 01:34:49 +0000 (10:34 +0900)]
Bump up 0.8.14.

Change-Id: I6978b1e8688931ccd6c5f3680896f5475081bbd7
Signed-off-by: jykeon <jykeon@samsung.com>
21 months agosvg_loader: changed update order 77/297677/1
joogab.yun [Wed, 23 Aug 2023 01:46:32 +0000 (10:46 +0900)]
svg_loader: changed update order

The gradient was updated before the style,
which resulted in only the URL tag being inherited,
but the gradient itself was not applied to the node.

Change-Id: Ic8a22921e0f1e1a7acc05bae17881a28546d4312

23 months agoVersion up 0.8.13 44/295744/1 accepted/tizen/unified/20230718.162134
joogab.yun [Thu, 13 Jul 2023 06:59:17 +0000 (15:59 +0900)]
Version up 0.8.13

Change-Id: I458c03b0f44b981683c7108ce4f9d564a5ea3cb7

23 months agocommon taskscheduler: 42/295742/1
joogab.yun [Thu, 13 Jul 2023 06:46:18 +0000 (15:46 +0900)]
common taskscheduler:

There is a report of the thread sanitizer.
It could be a false-positive as far as I reviewed,
but we hate to be bothered by it. So let's revert it.

@Issue: https://github.com/thorvg/thorvg/issues/1409

Change-Id: I74d0968a8a9682def132569770e588f7c2ac64bf

2 years agoBump up 0.8.12 58/292358/1 accepted/tizen/unified/20230602.141550 accepted/tizen/unified/20230605.065853
joogab.yun [Thu, 4 May 2023 09:50:26 +0000 (18:50 +0900)]
Bump up 0.8.12

Change-Id: I065732ad15fbb2d3aabe7f95063e943924ea3a4f

2 years ago[Tizen] Revert "svg_loader: preserveAspectRatio attrib handled according to the svg... 54/292354/1
Patryk Kaczmarek [Thu, 4 May 2023 09:17:29 +0000 (11:17 +0200)]
[Tizen] Revert "svg_loader: preserveAspectRatio attrib handled according to the svg standard (#1249)"

This reverts commit 69a417076a436065a20b54925031aa6f6a7fa526.

Change-Id: I45e4c6ef332d42d08cef47ff3b4c85b3538881ef

2 years agocommon taskscheduler: fix a potential crash issue. 53/292353/1
Hermet Park [Tue, 25 Apr 2023 07:27:41 +0000 (16:27 +0900)]
common taskscheduler: fix a potential crash issue.

Guarantee the tasks are not deleted until the taskscheduler finished them.

@Issue: https://github.com/thorvg/thorvg/issues/1370

Change-Id: I9304539f5960a05405ac3993f39894d46a4ff57b

2 years agosw_engine rle: The out-of-range memory access has been fixed. 52/292352/1
Hermet Park [Mon, 24 Apr 2023 09:06:26 +0000 (18:06 +0900)]
sw_engine rle: The out-of-range memory access has been fixed.

@Issue: https://github.com/thorvg/thorvg/issues/1370

Change-Id: Iaba662619f6c307c4a4917866b24cff958890074

2 years agosw_engine mempool: fixed to address a potential memory corruption issue. 51/292351/1
Hermet Park [Mon, 24 Apr 2023 08:18:32 +0000 (17:18 +0900)]
sw_engine mempool: fixed to address a potential memory corruption issue.

The previous memory pool was being shared by both the main and first threads,
which could lead to corruption if any threading changes occurred.

@Issue: https://github.com/thorvg/thorvg/issues/1370

Change-Id: I1bfb6948eb3bfe3d222f5955f877a7c9ad4f4f78

2 years agosw_engine rle: fix RLE intersect. 50/292350/1
Hermet Park [Fri, 14 Apr 2023 04:32:20 +0000 (13:32 +0900)]
sw_engine rle: fix RLE intersect.

IntersectSpansRegion() wasn't working correctly,
as it didn't take care of some corner cases.

This fix makes the algorithm more accurate.

Change-Id: I7405676290951f6f7ee7ac29f6cbc19473cda84d

2 years agoRevert "[Tizen] Revert "svg_loader: preserveAspectRatio attrib handled according... 49/292349/1
Patryk Kaczmarek [Thu, 4 May 2023 09:22:32 +0000 (11:22 +0200)]
Revert "[Tizen] Revert "svg_loader: preserveAspectRatio attrib handled according to the svg standard (#1249)""

This reverts commit 295dd97bc2fbdf8885f4bd18f6100ef2274816ed.

Change-Id: I06fc20c73ed257756c1e80db86bc5c62db953608

2 years agoBump up 0.8.11 18/291518/1 accepted/tizen/unified/20230419.044954
jykeon [Tue, 18 Apr 2023 03:05:41 +0000 (12:05 +0900)]
Bump up 0.8.11

Change-Id: I495d8bfb3c94b75277a2af38443403521705fe60
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agosw_engine: fix the inproper stroke raster. 40/291440/1
Hermet Park [Wed, 5 Apr 2023 16:10:36 +0000 (01:10 +0900)]
sw_engine: fix the inproper stroke raster.

We have an incorrect value comparison when the stroke corner center
is adjusted. All coordinates in the stroke raster have been scaled by
the given values (sx, sy), while the stroke width remains at its
original size due to it not being clear how it should be scaled.

This brings wierd rendering results at times. Now fix it.

@Issue: https://github.com/thorvg/thorvg/issues/1336

Change-Id: If7a76a5fe5ddb52292903b68cfde951f95e3e5f2
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agotest capi: ++coverage 39/291439/1
Hermet Park [Thu, 6 Apr 2023 10:47:56 +0000 (19:47 +0900)]
test capi: ++coverage

added jpg, tvg tests

Change-Id: I31e5a0ff51bd3c142a586d7a40c2d9fc43e27150
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agotest: fix broken plugin support. 38/291438/1
Hermet Park [Thu, 6 Apr 2023 10:34:07 +0000 (19:34 +0900)]
test: fix broken plugin support.

The thorvg test should not attempt to perform features
that were not enabled, as this will cause them to fail.

@Issues: https://github.com/thorvg/thorvg/issues/1251

Change-Id: I6a63d9370bc5f08a8d42ec77fb970d5834d8d82d
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agoexamples: preventing undef behavior 37/291437/1
Mira Grudzinska [Mon, 3 Apr 2023 20:45:26 +0000 (22:45 +0200)]
examples: preventing undef behavior

Calling get() on a unique pointer after
it has been moved is the undefined behavior.

Change-Id: I6878daf840079b59c6584c5741171d1affc71666
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agosvg_loader: fixing svgs without viewbox attr 36/291436/1
Mira Grudzinska [Sat, 1 Apr 2023 15:14:04 +0000 (17:14 +0200)]
svg_loader: fixing svgs without viewbox attr

For svgs without any viewbox and width/height
whole image is drawn. Before it was forced
to set x=y=0.

Change-Id: Iaa84f8a19901aac180704e6674d47dfcea128cd0
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agopicture: remove unnecessary reloads 35/291435/1
Mira Grudzinska [Sat, 1 Apr 2023 15:21:41 +0000 (17:21 +0200)]
picture: remove unnecessary reloads

After #1338 is applied there is no need to reload
the pictures while aksing about its viewbox or its size.

Change-Id: I63ec1899f6b4ee6bd44a6c21e8fedcf6ee192217
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agoBump up 0.8.10 28/290728/1 accepted/tizen/unified/20230404.025051
jykeon [Fri, 31 Mar 2023 07:59:51 +0000 (16:59 +0900)]
Bump up 0.8.10

Change-Id: I317e6f47471d4ed0d692b8b5bbeceedc081c20ce
Signed-off-by: jykeon <jykeon@samsung.com>
2 years ago[Tizen] Revert "svg_loader: preserveAspectRatio attrib handled according to the svg... 92/290692/4
joogab.yun [Fri, 31 Mar 2023 01:35:04 +0000 (10:35 +0900)]
[Tizen] Revert "svg_loader: preserveAspectRatio attrib handled according to the svg standard (#1249)"

This reverts commit 795978177ab26c6ced98fd493f13e99a27c36397.

There is a problem with the preserveAspectRatio patch,
so it is temporarily reverted.
This patch will go away once the preserveAspectRatio issue is resolved.

Change-Id: I7287ee79b55a524859934d9e11b749f3b117688d

2 years agosw_engine: fix safety check 40/290640/1
Mira Grudzinska [Sat, 25 Mar 2023 23:16:40 +0000 (00:16 +0100)]
sw_engine: fix safety check

An incorrect check introduced in bf07eb11f25909d2c73aa7e5baeb01a80af384d0
as a solution of the #1327 issue. As a consequence rotated images
were not drawn. Fixed.

Change-Id: I23a9842aff5c2b8463e9ee005932257eda6cb843
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agocommon/accessor: fix uninitialized field. 39/290639/1
Hermet Park [Sat, 25 Mar 2023 01:56:59 +0000 (10:56 +0900)]
common/accessor: fix uninitialized field.

--warnings.

Change-Id: I94f6e5892985aa2093b9dbc9b89e0ac267370884
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agosvg_loader: invalid strokes' width set to zero 38/290638/1
Mira Grudzinska [Tue, 21 Mar 2023 22:27:00 +0000 (23:27 +0100)]
svg_loader: invalid strokes' width set to zero

In case the "stroke" attrib is set to "none",
the width of the stroke is set to zero. Thanks
to that it isn't taken into account while
establishing the bounds of the shape.

Change-Id: I65cfd52075b72bebe9f9f4d24d54cde2e1dca99c
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agosvg_loader: handling zero width/height viewbox 37/290637/1
Mira Grudzinska [Wed, 15 Mar 2023 23:47:11 +0000 (00:47 +0100)]
svg_loader: handling zero width/height viewbox

For svgs with the width and/or height value set to zero
rendering was disabled - the load api return Result:Unknown
and draw - Result::InsufficientCondition.
Now an empty scene is added, so that both, load and draw,
return Result::Success.

Change-Id: I3b47acea33f49eca8d0d213a47d88cd57146027b
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agosvg_loader: handling svgs without viewBox/viewPort 36/290636/1
Mira Grudzinska [Wed, 1 Feb 2023 22:46:48 +0000 (23:46 +0100)]
svg_loader: handling svgs without viewBox/viewPort

Additionally:
- cases of inforrect viewBox values are handled
- cases of zero width/height of a viewBox and/or viewPort

@Issue: https://github.com/Samsung/thorvg/issues/1239

Change-Id: I7f6b557ae451db27d1a2033eb2976ed87e0e7f7d
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agoBump up 0.8.9 36/289936/1 accepted/tizen/unified/20230317.081016
jykeon [Thu, 16 Mar 2023 01:16:57 +0000 (10:16 +0900)]
Bump up 0.8.9

Change-Id: I9c28a1e14fa3cb2bcad516b119f82316b730b130
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agosw_engine - ++safety 06/289906/1
Hermet Park [Tue, 14 Mar 2023 14:39:48 +0000 (23:39 +0900)]
sw_engine - ++safety

Prevent any potential crash.

@Issues: https://github.com/thorvg/thorvg/issues/1327

Change-Id: I57e6582f17a3beae475d85261439aa78ca5f6919

2 years agopng_loader(static): Move the colortype check code to open() 05/289905/1
JunsuChoi [Fri, 10 Feb 2023 04:46:06 +0000 (13:46 +0900)]
png_loader(static): Move the colortype check code to open()

Change-Id: I6711b294b24e3e89bf93f96e0c78f8026ac75375

2 years agopng_loader(static): Fix the colorspace of an image with an alpha channel 04/289904/1
JunsuChoi [Fri, 10 Feb 2023 01:50:16 +0000 (10:50 +0900)]
png_loader(static): Fix the colorspace of an image with an alpha channel

Set colorspace to ABGR when colortype of lodepng is LCT_RGBA.
Since an image without an alpha channel becomes an ARGB colorspace with LCT_RGB,
it is the same as the default colorspace.

Change-Id: Ia33ca50ab3340fe72f1b7af2ced35850854fc835

2 years agoloader: Support ABGR colorspace 03/289903/1
JunsuChoi [Fri, 20 Jan 2023 04:13:01 +0000 (13:13 +0900)]
loader: Support ABGR colorspace

Since the color space is set at the time of specifying the target buffer of the canvas,
there is no way to know the color space when the picture is loaded.
So, check the color space applied to SwCanvas at the time of reload()
and change the color space.

There is an issue of BGR color space support for each loader.
The external_jpg loader resets the TJPF color space and calls read() to get a new buffer.
In the case of external_png, we need to change the color value directly
because it have to start over from begin_read_*.

This solution can affect performance as much as it access again image buffer
that have already been `read()` done. However, this only happens once.

Change-Id: Ib7f25b5bc5871cfe59ad3963d26536269b48a3f5

2 years agocommon shape: code refactoring. 02/289902/1
Hermet Park [Sun, 5 Feb 2023 02:44:59 +0000 (11:44 +0900)]
common shape: code refactoring.

keep name consistency.

Change-Id: I902d163f50457e7e82180ad9259e8952257cd302

2 years agogl_engine: -- compiler warnings 01/289901/1
Hermet Park [Sun, 5 Feb 2023 02:42:37 +0000 (11:42 +0900)]
gl_engine: -- compiler warnings

../src/lib/gl_engine/tvgGlRenderer.cpp: In member function â€˜virtual bool GlRenderer::renderShape(tvg::RenderData)’:
../src/lib/gl_engine/tvgGlRenderer.cpp:171:30: warning: â€˜a’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  171 |                 drawPrimitive(*sdata, r, g, b, a, i, RenderUpdateFlag::Stroke);
      |                 ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/lib/gl_engine/tvgGlRenderer.cpp:171:30: warning: â€˜b’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../src/lib/gl_engine/tvgGlRenderer.cpp:171:30: warning: â€˜g’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../src/lib/gl_engine/tvgGlRenderer.cpp:171:30: warning: â€˜r’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../src/lib/gl_engine/tvgGlRenderer.cpp: In member function â€˜virtual void* GlRenderer::prepare(const tvg::RenderShape&, tvg::RenderData, const tvg::RenderTransform*, uint32_t, tvg::Array<void*>&, tvg::RenderUpdateFlag, bool)’:
../src/lib/gl_engine/tvgGlRenderer.cpp:215:21: warning: â€˜alphaS’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  215 |     uint8_t alphaF, alphaS;

Change-Id: I65d6cc0b6449342232287f295c06ef640e50b389

2 years agocommon shape: code refactoring & data optimization. 00/289900/1
Hermet Park [Sun, 15 Jan 2023 11:20:43 +0000 (20:20 +0900)]
common shape: code refactoring & data optimization.

re-design the shape data structure so that render backends
are able to access them directly.

This also let us remove tvgShape member data from the Shape::Impl.

To achieve this, migrate shape/stroke/path
from the canvas interface to the render interface.

Change-Id: Iac398dedec39c6bc88fa4c1c3cfdb3f5db4c25e2

2 years agocommon paint: keep clean apis and small size. 99/289899/1
Hermet Park [Sat, 28 Jan 2023 02:44:40 +0000 (11:44 +0900)]
common paint: keep clean apis and small size.

these are no more necessary.

Change-Id: I315b39c77c413da1bc6102cabd5d797a1931eb9b

2 years agocommon: enhance clipping behavior. 98/289898/1
Hermet Park [Sat, 28 Jan 2023 02:36:54 +0000 (11:36 +0900)]
common: enhance clipping behavior.

If a paint is used as a clipper, it must be determined in the paint behavior.
Propagate its decision to the immediate derived classes so that
not only shapes but also scenes must be dealt as a clipper properly.

This revised this change 0de3872be33793d2c8db03d5b85da38670410626
for better a solution.

Change-Id: I5525cc3ce952b74eec2a52f3bdc769f5ed600f58

2 years agosvg loader: correct clipper usage. 97/289897/1
Hermet Park [Sun, 22 Jan 2023 00:53:27 +0000 (09:53 +0900)]
svg loader: correct clipper usage.

that has been changed by 0de3872be33793d2c8db03d5b85da38670410626

Change-Id: If0b014910235253416ca8585b6fd5fe336538f4c

2 years agocommon: ignoring color/alpha/opacity of a clip object 96/289896/1
Mira Grudzinska [Tue, 27 Dec 2022 15:21:42 +0000 (16:21 +0100)]
common: ignoring color/alpha/opacity of a clip object

According to the svg specs clip's fill and opacity
should be ignored. Till now setting the alpha/opacity
value to zero resulted in the shape's rendering abort.

@Issue: https://github.com/Samsung/thorvg/issues/1192

Change-Id: I76c10068d6d35dc171be3c936c5429ea1a3becf1

2 years agosvg_loader: overwrite the clip's opacity/alpha 95/289895/1
Mira Grudzinska [Tue, 17 Jan 2023 12:11:43 +0000 (13:11 +0100)]
svg_loader: overwrite the clip's opacity/alpha

According to the svg standard the clips opacity
doesn't affect the final rendering. In order to
avoid any confusion the opacity values are
overwritten by the max possible value.

Change-Id: I96699a2f74e97fae0a940e18d834f258a8c4cd86

2 years agoBump up 0.8.8 71/289871/1
jykeon [Wed, 15 Mar 2023 03:35:26 +0000 (12:35 +0900)]
Bump up 0.8.8

Change-Id: Ia2288194406d03caa4149af22e5d1ce495a41f64
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agoMerge "updated copyright." into tizen
Chun [Wed, 15 Mar 2023 03:23:47 +0000 (03:23 +0000)]
Merge "updated copyright." into tizen

2 years agoMerge "doc: updated the header description." into tizen
Chun [Wed, 15 Mar 2023 03:23:43 +0000 (03:23 +0000)]
Merge "doc: updated the header description." into tizen

2 years agoMerge changes Id77eb8df,I4e07b5bf,Ia2ea6f99,I03369fe9,Ife206ab7 into tizen
Chun [Wed, 15 Mar 2023 03:23:36 +0000 (03:23 +0000)]
Merge changes Id77eb8df,I4e07b5bf,Ia2ea6f99,I03369fe9,Ife206ab7 into tizen

* changes:
  svg loader: correct clipper usage.
  example: correct clipper usage.
  examples: ClipPath's modified
  common: ignoring color/alpha/opacity of a clip object
  svg_loader: overwrite the clip's opacity/alpha

2 years agoMerge "updated copyright." into tizen
Chun [Wed, 15 Mar 2023 03:23:29 +0000 (03:23 +0000)]
Merge "updated copyright." into tizen

2 years agoMerge "svg_loader: fixing crash for to big buffer" into tizen
Chun [Wed, 15 Mar 2023 03:23:24 +0000 (03:23 +0000)]
Merge "svg_loader: fixing crash for to big buffer" into tizen

2 years agoMerge "all: Trailing spaces removed" into tizen
Chun [Wed, 15 Mar 2023 03:21:32 +0000 (03:21 +0000)]
Merge "all: Trailing spaces removed" into tizen

2 years agoupdated copyright. 14/289814/1
Hermet Park [Sat, 28 Jan 2023 02:36:54 +0000 (11:36 +0900)]
updated copyright.

Change-Id: I6b3ff60849bdb849ce09555624593145e07af7d3

2 years agodoc: updated the header description. 13/289813/1
Hermet Park [Sun, 22 Jan 2023 01:15:03 +0000 (10:15 +0900)]
doc: updated the header description.

Change-Id: Ib5fc0343dce8adef2ffdeefca583219aeafe1d90

2 years agosvg loader: correct clipper usage. 12/289812/1
Hermet Park [Sun, 22 Jan 2023 00:53:27 +0000 (09:53 +0900)]
svg loader: correct clipper usage.

that has been changed by 0de3872be33793d2c8db03d5b85da38670410626

Change-Id: Id77eb8df0063ef4ddd42ed7cf94a05a076486ed8

2 years agoexample: correct clipper usage. 11/289811/1
Hermet Park [Sun, 22 Jan 2023 00:55:10 +0000 (09:55 +0900)]
example: correct clipper usage.

it has been changed by 0de3872be33793d2c8db03d5b85da38670410626

Change-Id: I4e07b5bf178f13387dad526772d2ab6c68c57f14

2 years agoexamples: ClipPath's modified 10/289810/1
Mira Grudzinska [Sun, 15 Jan 2023 15:39:25 +0000 (16:39 +0100)]
examples: ClipPath's modified

The opacity/alpha value doesn't need to be set
for clips any more.

Change-Id: Ia2ea6f99f1d9c666348e3ef1cfb57629972296c9

2 years agocommon: ignoring color/alpha/opacity of a clip object 09/289809/1
Mira Grudzinska [Tue, 27 Dec 2022 15:21:42 +0000 (16:21 +0100)]
common: ignoring color/alpha/opacity of a clip object

According to the svg specs clip's fill and opacity
should be ignored. Till now setting the alpha/opacity
value to zero resulted in the shape's rendering abort.

@Issue: https://github.com/Samsung/thorvg/issues/1192

Change-Id: I03369fe91f811e7d6950dab1b594824cbfb7f9fe

2 years agosvg_loader: overwrite the clip's opacity/alpha 08/289808/1
Mira Grudzinska [Tue, 17 Jan 2023 12:11:43 +0000 (13:11 +0100)]
svg_loader: overwrite the clip's opacity/alpha

According to the svg standard the clips opacity
doesn't affect the final rendering. In order to
avoid any confusion the opacity values are
overwritten by the max possible value.

Change-Id: Ife206ab742023bd3e4d2f0952f0a51ce2b53e75a

2 years agoupdated copyright. 07/289807/1
Hermet Park [Sat, 14 Jan 2023 04:27:22 +0000 (13:27 +0900)]
updated copyright.

Change-Id: I3072e2bc6c6be08d97a94492e29929c60e667086

2 years agosvg_loader: fixing crash for to big buffer 06/289806/1
Mira Grudzinska [Fri, 6 Jan 2023 23:04:31 +0000 (00:04 +0100)]
svg_loader: fixing crash for to big buffer

Crash observed on macOS for the image-embeded-*.svg files.
Since the alloca function was used the stack allocation failure
could not be handled.

Change-Id: Ibc38ef8f8f407145e7490c221a24786b99ed2d04

2 years agoall: Trailing spaces removed 05/289805/1
Mira Grudzinska [Fri, 6 Jan 2023 23:47:59 +0000 (00:47 +0100)]
all: Trailing spaces removed

Change-Id: I09f10f1b342b352c39cce734a2fce5d93091a9d0

2 years agoBump up 0.8.7 02/289802/1
jykeon [Tue, 14 Mar 2023 09:21:59 +0000 (18:21 +0900)]
Bump up 0.8.7

Change-Id: I97bb1f3bdb6978d3e8ccc56e734177657c55ec48
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agoMerge changes I6d68fe18,Ieabe9819,I7eeea6c2,Ib5e5d6ac,I96dc2387, ... into tizen
Chun [Tue, 14 Mar 2023 09:19:35 +0000 (09:19 +0000)]
Merge changes I6d68fe18,Ieabe9819,I7eeea6c2,Ib5e5d6ac,I96dc2387, ... into tizen

* changes:
  svg_loader: fixing name
  examples: fixing the crash for disabled loaders
  examples: keep aspect ratio of svg images.
  paint: fastTrack should return false for the skew transformations
  common Util: Move to before decimal part calculation
  common Util: Skip if there is a space after the dot
  svg_loader: Change SVG viewbox variable type from int to float
  test picture: add picture mesh api unit test

2 years agoMerge "common picture: +exception handling." into tizen
Chun [Tue, 14 Mar 2023 09:18:45 +0000 (09:18 +0000)]
Merge "common picture: +exception handling." into tizen

2 years agoMerge "saver/loader tvg: support picture mesh properties." into tizen
Chun [Tue, 14 Mar 2023 09:18:27 +0000 (09:18 +0000)]
Merge "saver/loader tvg: support picture mesh properties." into tizen

2 years agosvg_loader: fixing name 99/289799/1
Mira Grudzinska [Fri, 6 Jan 2023 23:53:23 +0000 (00:53 +0100)]
svg_loader: fixing name

_parserColor -> _parseColor

Change-Id: I6d68fe18ff6a8029627bd42b409be1048ef3516a

2 years agoexamples: fixing the crash for disabled loaders 98/289798/1
Mira Grudzinska [Fri, 6 Jan 2023 22:33:42 +0000 (23:33 +0100)]
examples: fixing the crash for disabled loaders

ImageScaleUp/ImageScaleDown fixed.

Change-Id: Ieabe9819f2eb9ec8378544ce3a9c5da142a570b3

2 years agoexamples: keep aspect ratio of svg images. 97/289797/1
Hermet Park [Fri, 6 Jan 2023 17:19:42 +0000 (02:19 +0900)]
examples: keep aspect ratio of svg images.

changed by 3939b61770c14602d7e349ba0baa21d9f4d97a44

Change-Id: I7eeea6c23439b07b9f298080ef80b28ef48cac7d

2 years agopaint: fastTrack should return false for the skew transformations 96/289796/2
Mira Grudzinska [Tue, 27 Dec 2022 17:32:43 +0000 (18:32 +0100)]
paint: fastTrack should return false for the skew transformations

Change-Id: Ib5e5d6aca3d732963ac9855b0a79e1055dcf3d7c

2 years agocommon Util: Move to before decimal part calculation 95/289795/1
JunsuChoi [Tue, 13 Dec 2022 02:53:50 +0000 (11:53 +0900)]
common Util: Move to before decimal part calculation

Change-Id: I96dc238736eec22f62831850628548ed60d0a08f

2 years agocommon Util: Skip if there is a space after the dot 93/289793/1
JunsuChoi [Mon, 12 Dec 2022 06:08:06 +0000 (15:08 +0900)]
common Util: Skip if there is a space after the dot

Some SVG parsers allow parsing of "0."
If there is a space after the dot, skip to the next step.

Change-Id: Ic1c455e2d5b8bf1e344af903f9721885c9fa1d37

2 years agoBump up 0.8.6 94/289794/1 accepted/tizen/unified/20230316.101434
jykeon [Tue, 14 Mar 2023 08:55:49 +0000 (17:55 +0900)]
Bump up 0.8.6

Change-Id: I6edfda6fec874391f3859b114caf75cfcbed3fec
Signed-off-by: jykeon <jykeon@samsung.com>
2 years agosvg_loader: Change SVG viewbox variable type from int to float 92/289792/1
JunsuChoi [Mon, 12 Dec 2022 04:38:43 +0000 (13:38 +0900)]
svg_loader: Change SVG viewbox variable type from int to float

The viewbox and size(width, height) defined in SVG can be of type float.
This prevents matrix calculation errors caused by this.

Change-Id: I85dd502b63dc9a13e969bd459e1f98975c0ef6ed

2 years agotest picture: add picture mesh api unit test 91/289791/1
Hermet Park [Thu, 8 Dec 2022 14:47:57 +0000 (23:47 +0900)]
test picture: add picture mesh api unit test

@Issue: https://github.com/Samsung/thorvg/issues/1241

Change-Id: I52234dd9136428a01526301e94241c26507a997d

2 years agocommon picture: +exception handling. 90/289790/1
Hermet Park [Thu, 8 Dec 2022 14:44:04 +0000 (23:44 +0900)]
common picture: +exception handling.

invalid arguments won't be allowed.

Change-Id: Ia70a3d112e8e8cee36ee1cb05085c95b0402f546

2 years agosaver/loader tvg: support picture mesh properties. 89/289789/1
Hermet Park [Wed, 7 Dec 2022 07:20:47 +0000 (16:20 +0900)]
saver/loader tvg: support picture mesh properties.

this mesh properites newly introduced in v0.8
(see: 3dd65dfed00849f0bd9d0bb0ade177fa961cd7a5)

tvg saver/loader should implement mesh support to
properly capture/replay the scene snapshot.

@Issue: https://github.com/Samsung/thorvg/issues/1242

Change-Id: Id48e50be8093c2f13d3f3b4e1112151974597928

2 years agoMerge "common Accessor: removed deprecated api." into tizen
Chun [Tue, 14 Mar 2023 08:49:10 +0000 (08:49 +0000)]
Merge "common Accessor: removed deprecated api." into tizen

2 years agoMerge "Update README.md" into tizen
Chun [Tue, 14 Mar 2023 08:48:59 +0000 (08:48 +0000)]
Merge "Update README.md" into tizen

2 years agoMerge "common Accessor: Add access API using std::function" into tizen
Chun [Tue, 14 Mar 2023 08:48:48 +0000 (08:48 +0000)]
Merge "common Accessor: Add access API using std::function" into tizen

2 years agoMerge "common Accessor: Add access api that with data parameter" into tizen
Chun [Tue, 14 Mar 2023 08:48:21 +0000 (08:48 +0000)]
Merge "common Accessor: Add access api that with data parameter" into tizen

2 years agoMerge "[svg2png] size limitation while converting the file" into tizen
Chun [Tue, 14 Mar 2023 08:48:10 +0000 (08:48 +0000)]
Merge "[svg2png] size limitation while converting the file" into tizen

2 years agoMerge "SwRaster: Remove comment" into tizen
Chun [Tue, 14 Mar 2023 08:48:00 +0000 (08:48 +0000)]
Merge "SwRaster: Remove comment" into tizen

2 years agoMerge "SwRaster: Prevent memory issue" into tizen
Chun [Tue, 14 Mar 2023 08:47:47 +0000 (08:47 +0000)]
Merge "SwRaster: Prevent memory issue" into tizen

2 years agocommon Accessor: removed deprecated api. 88/289788/1
Hermet Park [Sat, 26 Nov 2022 09:47:55 +0000 (18:47 +0900)]
common Accessor: removed deprecated api.

the old version of Accessor::access() is redundant,
we replaced it with set().

It's still under the beta, we can remove it immediately.
Note that we've planned to promote them official APIs in v0.9.

Newly changed, tagging beta again...w

Change-Id: I1afa8424c81daabe214f5dd704678aa35da610ba

2 years agoUpdate README.md 87/289787/1
Hermet Park [Sat, 26 Nov 2022 04:41:36 +0000 (13:41 +0900)]
Update README.md

added godot practice.

Change-Id: I5caa77cfb7377123cf3cb26a61690b4b1285cb9c

2 years agocommon Accessor: Add access API using std::function 86/289786/1
JunsuChoi [Thu, 24 Nov 2022 04:46:44 +0000 (20:46 -0800)]
common Accessor: Add access API using std::function

Change-Id: I50eb9443137f40d329105fea24739a549dd0ea41

2 years agocommon Accessor: Add access api that with data parameter 85/289785/1
JunsuChoi [Fri, 18 Nov 2022 08:09:35 +0000 (00:09 -0800)]
common Accessor: Add access api that with data parameter

It supports data parameters that
can pass user data to the callback function.

Change-Id: I7b5ea2a2861a741bf7da205c495e8c192c7aeb8c
std::unique_ptr<Picture> access(std::unique_ptr<Picture> picture, bool(*func)(const Paint* paint, void* data), void* data) noexcept;

2 years ago[svg2png] size limitation while converting the file 84/289784/1
Mira Grudzinska [Sun, 20 Nov 2022 19:46:50 +0000 (20:46 +0100)]
[svg2png] size limitation while converting the file

In case the svg file size is too large, a heap overflow occurred
when conversting to png. To prevent this a size limitation
has been added - the resolution of the resulting png file cannot
be higher than 8k (7680 x 4320).

Change-Id: Iba8cf11a3afc47a0594b2ff07862fc8ee410002f

2 years agoSwRaster: Remove comment 83/289783/1
JunsuChoi [Tue, 4 Oct 2022 01:08:52 +0000 (10:08 +0900)]
SwRaster: Remove comment

Change-Id: If45195fcba8dda3d2e08a3884428e365ec6f6f9f

2 years agoSwRaster: Prevent memory issue 82/289782/1
JunsuChoi [Thu, 29 Sep 2022 02:11:34 +0000 (11:11 +0900)]
SwRaster: Prevent memory issue

If vv goes out of buffer, it can cause potential memory problems.
Therefore, an `if condition` is added so that it does not exceed the height of the image.
This is temporary fix.

Test)
meson -Db_sanitize=address,undefined -Dexamples=true . build
$ ./build/src/examples/Texmap

==6298==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7f37fd6c2180 at pc 0x7f380d884599 bp 0x7fffb02b2db0 sp 0x7fffb02b2da0
READ of size 4 at 0x7f37fd6c2180 thread T0
    #0 0x7f380d884598 in _rasterPolygonImageSegment ../src/lib/sw_engine/tvgSwRasterTexmapInternal.h:107
    #1 0x7f380d887694 in _rasterPolygonImage ../src/lib/sw_engine/tvgSwRasterTexmap.h:271
    #2 0x7f380d88a598 in _rasterTexmapPolygonMesh ../src/lib/sw_engine/tvgSwRasterTexmap.h:639
    #3 0x7f380d89828d in _transformedRGBAImageMesh ../src/lib/sw_engine/tvgSwRaster.cpp:701
    #4 0x7f380d89828d in rasterImageMesh(SwSurface*, SwImage*, tvg::Polygon const*, unsigned int, tvg::Matrix const*, SwBBox const&, unsigned int) ../src/lib/sw_engine/tvgSwRaster.cpp:1585
    #5 0x7f380d89bf16 in tvg::SwRenderer::renderImageMesh(void*) ../src/lib/sw_engine/tvgSwRenderer.cpp:369
    #6 0x7f380d830e7e in tvg::Paint::Impl::render(tvg::RenderMethod&) ../src/lib/tvgPaint.cpp:178
    #7 0x7f380d823bd2 in tvg::Canvas::Impl::draw() (/home/junsu/dev/os/thorvg/build/src/examples/../libthorvg.so.0+0x265bd2)
    #8 0x7f380d821e79 in tvg::Canvas::draw() ../src/lib/tvgCanvas.cpp:60
    #9 0x557d07b2d5b6 in drawSwView(void*, _Eo_Opaque*) ../src/examples/Texmap.cpp:103
    #10 0x7f380cb7d2aa in evas_process_dirty_pixels ../src/lib/evas/canvas/evas_object_image.c:1894
    #11 0x7f380cb7d2aa in _evas_image_pixels_get ../src/lib/evas/canvas/evas_object_image.c:2318
    #12 0x7f380cb7d85e in _evas_image_render ../src/lib/evas/canvas/evas_object_image.c:2468
    #13 0x7f380cb7ea0c in evas_object_image_render ../src/lib/evas/canvas/evas_object_image.c:2271
    #14 0x7f380cbe51db in evas_render_mapped ../src/lib/evas/canvas/evas_render.c:2290
    #15 0x7f380cbe6f15 in evas_render_updates_internal_loop ../src/lib/evas/canvas/evas_render.c:3158
    #16 0x7f380cbe9912 in evas_render_updates_internal ../src/lib/evas/canvas/evas_render.c:3631
    #17 0x7f380cbeb31c in _evas_canvas_render_async ../src/lib/evas/canvas/evas_render.c:4094
    #18 0x7f380cb6634a in evas_canvas_render_async ../src/lib/evas/canvas/evas_canvas_eo.c:168
    #19 0x7f380cb6fce5 in evas_render_async ../src/lib/evas/canvas/evas_canvas_eo.legacy.c:179
    #20 0x7f37f3a81555 in _ecore_evas_x_render ../src/modules/ecore_evas/engines/x/ecore_evas_x.c:761
    #21 0x7f3809677e42 in _ecore_evas_idle_enter ../src/lib/ecore_evas/ecore_evas.c:295
    #22 0x7f38098a89a4 in _ecore_call_task_cb ../src/lib/ecore/ecore_private.h:456
    #23 0x7f38098a89a4 in _ecore_factorized_idle_process ../src/lib/ecore/ecore_idler.c:35
    #24 0x7f3809b29081 in _event_callback_call ../src/lib/eo/eo_base_class.c:2114
    #25 0x7f3809b29081 in _efl_object_event_callback_call ../src/lib/eo/eo_base_class.c:2186
    #26 0x7f3809b22d22 in efl_event_callback_call ../src/lib/eo/eo_base_class.c:2189
    #27 0x7f38098aae44 in _ecore_main_loop_iterate_internal ../src/lib/ecore/ecore_main.c:2466
    #28 0x7f38098ab689 in _ecore_main_loop_begin ../src/lib/ecore/ecore_main.c:1231
    #29 0x7f38098b05e0 in _efl_loop_begin ../src/lib/ecore/efl_loop.c:57
    #30 0x7f38098af77c in efl_loop_begin src/lib/ecore/efl_loop.eo.c:28
    #31 0x7f38098ab755 in ecore_main_loop_begin ../src/lib/ecore/ecore_main.c:1316
    #32 0x7f380d14ba1f in elm_run ../src/lib/elementary/elm_main.c:1359
    #33 0x557d07b2d298 in main ../src/examples/Texmap.cpp:176
    #34 0x7f380b533c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #35 0x557d07b2d3c9 in _start (/home/junsu/dev/os/thorvg/build/src/examples/Texmap+0xb3c9)

Change-Id: I732019b5ac8aa01d200c1036e56d5a7143544c30

2 years agoBump up 0.8.5 79/289779/1
jykeon [Tue, 14 Mar 2023 08:05:15 +0000 (17:05 +0900)]
Bump up 0.8.5

Change-Id: I8be041ac09cf457cc85d976ac2093b1886b45497
Signed-off-by: jykeon <jykeon@samsung.com>