Commit graph

728 commits

Author SHA1 Message Date
Mira Grudzinska
edaafd99b3 sw_engine: fixing wrong 'if else' statement handling when gradient shapes rastered
The cases when composition was applied were handled only for AlphaMask and
InvAlphaMask. When opacity value was to be < 255, there was no code
to handle this.
2021-05-21 18:18:21 +09:00
Mira Grudzinska
d999a05750 sw_engine: 'inv2a' variable from the SwRadial struct replaced by 'inva'
This change reduces the number of multiplications in the fillFetchRadal function.
2021-05-18 11:38:57 +09:00
Hermet Park
706dc68d56 res: remove icon 2021-05-17 13:58:52 +09:00
Hermet Park
4c8152e7eb
Update README.md 2021-05-16 23:59:02 +09:00
Hermet Park
498a07a984
Update README.md 2021-05-15 23:14:52 +09:00
Hermet Park
9c0b59301a
Update README.md 2021-05-15 21:56:31 +09:00
Hermet Park
ecafda3e05
Add files via upload 2021-05-15 20:19:34 +09:00
Hermet Park
af01f5b899 api doc: replace beta api desc to beta tag 2021-05-14 19:49:28 +09:00
JunsuChoi
f8f90f3f34 log SvgLoader: Enhance log message
- Change tag name "Doc" to "Svg"
- Fix "Mask" tag name.
- Add element to skip output
 - title
- Add attribute to skip output
 - id, data-name, version, overflow=visible, xmlns*, xml:space
2021-05-13 23:46:17 +09:00
Mira Grudzinska
dc637d0beb doc: linguistic changes in C++ API docs 2021-05-13 23:44:26 +09:00
Hermet Park
824b56acc1
Update README.md 2021-05-13 19:47:37 +09:00
Hermet Park
4ba4f47541
Update README.md 2021-05-13 19:41:17 +09:00
Hermet Park
6dd414ee3b sw_engine: fix invalid data sharing at multi-threading.
We have encountered that multi-threading usage that user creates,
multiple canvases owned by multiple user threads.

Current sw_engine memory pool has been considered only for multi-threads,
spawned by tvg task scheduler.

In this case it's safe but when user threads introduced, it can occur race-condition.

Thus, Here is a renewal policy that non-threading tvg(initialized threads with zero),
takes care of multiple user threads bu changing its policy,
each of canvases should have individual memory pool to guarantee mutual-exclusion.

@API additions

enum MempoolPolicy
{
    Default = 0, ///< Default behavior that ThorVG is designed to.
    Shareable,   ///< Memory Pool is shared among the SwCanvases.
    Individual   ///< Allocate designated memory pool that is only used by current instance.
};

Result SwCanvas::mempool(MempoolPolicy policy) noexcept;

All in all, if user calls multiple threads, set memory pool policy to Individual.
2021-05-12 10:59:50 +09:00
Hermet Park
f676d6a25c infra: remove PULL REQUEST TEMPLATE.
By far, this is not so useful since commit message template and PR is very simliar.

It just bring messing up the PR contents.

Rather than it, we don't allow violating commit message rules. So... its unnecessary.

See CONTRIBUTING.md
2021-05-11 22:24:15 +09:00
Hermet Park
00dc7fb04f
Update CONTRIBUTING.md 2021-05-11 22:23:35 +09:00
Mira Grudzinska
924ea15cfa capi: added check against null pointer before dereferencing
TVG_RESULT_INVALID_ARGUMENT returned in case a nullptr passed as an argument
(does not apply to color getters).
The change is addressed in the docs file.
2021-05-11 12:09:23 +02:00
Mira Grudzinska
335880c58c docs: polishing up the C API docs 2021-05-06 14:12:37 +02:00
Hermet Park
557ad2daf3
Update README.md 2021-05-03 21:14:52 +09:00
Hermet Park
814cfe2f3b
Update README.md 2021-05-03 19:25:30 +09:00
JunsuChoi
475fc22f6d loader SvgLoader: Fix memory leak
Add memory release for style->comp.url, which is the leaking memory.

[Valgrind Test Result]
==21595== 32 bytes in 1 blocks are definitely lost in loss record 29 of 152
==21595==    at 0x4C3217F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21595==    by 0x5C248C6: _idFromUrl(char const*) (tvgSvgLoader.cpp:272)
==21595==    by 0x5C24DE1: _handleClipPathAttr(SvgLoaderData*, SvgNode*, char const*) (tvgSvgLoader.cpp:860)
==21595==    by 0x5C260CC: _attrParseGNode(void*, char const*, char const*) (tvgSvgLoader.cpp:953)
==21595==    by 0x5C2ABA9: simpleXmlParseAttributes(char const*, unsigned int, bool (*)(void*, char const*, char const*), void const*) (tvgXmlParser.cpp:272)
==21595==    by 0x5C26F6E: _createGNode(SvgLoaderData*, SvgNode*, char const*, unsigned int) (tvgSvgLoader.cpp:1063)
==21595==    by 0x5C27A04: _svgLoaderParserXmlOpen(SvgLoaderData*, char const*, unsigned int, bool) (tvgSvgLoader.cpp:2168)
==21595==    by 0x5C27CE9: _svgLoaderParser(void*, SimpleXMLType, char const*, unsigned int) (tvgSvgLoader.cpp:2226)
==21595==    by 0x5C2AC8C: simpleXmlParse(char const*, unsigned int, bool, bool (*)(void*, SimpleXMLType, char const*, unsigned int), void const*) (tvgXmlParser.cpp:378)
==21595==    by 0x5C27E09: SvgLoader::run(unsigned int) (tvgSvgLoader.cpp:2571)
==21595==    by 0x5C1A7C1: operator() (tvgTaskScheduler.h:68)
==21595==    by 0x5C1A7C1: tvg::TaskSchedulerImpl::run(unsigned int) (tvgTaskScheduler.cpp:138)
==21595==    by 0x5EED6DE: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
2021-05-03 16:29:30 +09:00
Mira Grudzinska
2a4898cd19 Update README.md
Fixed example and minor linguistic changes
2021-05-03 15:59:27 +09:00
Hermet Park
1638844dfc
Update README.md
updated contents
2021-05-02 00:19:14 +09:00
Hermet Park
89e712fd2b
Update README.md
+ Practices: Tizen, Rive
2021-05-01 23:50:07 +09:00
Hermet Park
379b46f4e0
Update README.md 2021-05-01 14:58:30 +09:00
Hermet Park
ea316a348a res: updated images 2021-05-01 14:54:15 +09:00
Hermet Park
6fce96a124 examples: fix wrong data size conversion.
pointer size becomes 32 to 64 bits up to machines.
it has to be 32 bits.
2021-05-01 12:56:49 +09:00
Hermet Park
2bd07c050c examples: fix wrong data size conversion.
pointer size becomes 32 to 64 bits up to machines.
it has to be 32 bits.
2021-05-01 12:49:23 +09:00
Hermet Park
1d923a8632 loader svg: fix build break due to typo 2021-05-01 12:37:45 +09:00
Michal Szczecinski
2f334f50c5 sw_engine: Added sanity checks.
This commit fixes crash when update target surface is not created yet.
2021-05-01 12:34:30 +09:00
Hermet Park
eafd46b7b7 infra: remove debian packaging.
thorvg doesn't belonged to any package distribution.
let tvg keep the meson build system and leave to pkg distrubtors
to organize their own building configures.
2021-05-01 12:31:37 +09:00
Hermet Park
9465915e84 res: update images. 2021-04-30 20:54:34 +09:00
Hermet Park
3a538340aa infra: disable capi in default.
capi is not mandatory option in v0.1.

we can manually toggle it on when it's necessary.
2021-04-30 19:15:05 +09:00
Hermet Park
28008e2f91
doc: polish up api documentation. 2021-04-30 18:53:20 +09:00
Michal Szczecinski
d4f1864c13
Merge pull request #367 from Samsung/devs/jsuya/doc_capi_groupping
doc common: Revise c api doc
2021-04-29 09:27:12 +02:00
JunsuChoi
3908397d95 doc common: Add enum and struct docs in capi 2021-04-29 15:06:54 +09:00
JunsuChoi
706df374cf doc common: Groupping c APIs
C APIs
 - Initializer
 - Canvas
  - SwCanvas
 - Paint
 - Shape
 - Gradient
 - Picture
 - Scene
2021-04-29 15:06:54 +09:00
Mira Grudzinska
6601c93899 sw_engine: fixing overlapping masks
The buffer to which the mask is rastered is only partially cleared.
If the object to which the mask is applied overlaps an area where
another mask was used, an erroneous image is generated. The buffer
clearing area has been increased to the size of the object to which
the mask is applied.
2021-04-29 12:13:38 +09:00
JunsuChoi
d7b3f0103e doc common: Add grouping of C++ api and C api
group ThorVG C++ APIs
group ThorVGCapi C APIs
2021-04-29 12:11:06 +09:00
Mira Grudzinska
ec1232b9b4 doc common: change of the return value in the composite API 2021-04-28 15:06:00 +02:00
Mira Grudzinska
d0dc9142ec common paint: changed result in composite API
A possible error is due to erroneous arguments, so
InvalidArgument is return instead of InsufficientCondition
2021-04-28 20:02:22 +09:00
JunsuChoi
94f3d0dc11 infra Actions: If no coding style error, no comment
and change action name
2021-04-28 19:53:45 +09:00
Mira Grudzinska
3d5006740c doc common: adding the documentation for the C++ APIs
Added the missing descriptions for Sw/Gl/Canvas and Initializer.
@retval command applied.
2021-04-28 19:46:58 +09:00
JunsuChoi
fa8b7b333e doc README: Update build status badge
The badge provided by travis-ci is no longer used.
Use the badge provided by github action.
2021-04-28 19:46:31 +09:00
JunsuChoi
6241fd054d doc common: Fix typo and missing parameter 2021-04-27 11:54:22 +02:00
JunsuChoi
638d81fb15 infra Travis: Remove travis-ci build test
We don't need to build test with travis-ci.
The build test is already being worked in the github-action.
In addition, travis-ci causes unnecessary failures because the recent request count is not properly counted.
2021-04-26 23:13:09 +09:00
Mira Grudzinska
7e35ec339a doc common: adding the documentation for the C++ APIs
The descriptions have been changed and new ones added.
There are still few apis for which descriptions are missing.
2021-04-25 17:16:13 -07:00
JunsuChoi
2cfc2bd241 doc common: Draft documentation for C++ header APIs
Write documentation for some of the APIs that have already been cleared up.
2021-04-21 17:57:24 +09:00
Hermet Park
e1ebcf6153 loaders svg: code refactoring
split functions as its purpose.
2021-04-21 11:12:22 +09:00
JunsuChoi
51e4757a3b loader SvgLoader: Fix wrong debug log
1.
Modify that attribute information used for use type
looks like it was used for g type.

2.
Fix clippath node looking like setting "none"
(clippath's display = false is intentional)
2021-04-21 11:11:37 +09:00
JunsuChoi
8b54b6768a loader SvgLoader: add locale-independent strtof function
strtof's behavior is changed by system locale.
https://linux.die.net/man/3/strtof

Because of this, strtof(10.0000) returns 0.0 in some locales.
When a given value string is locale-independent, strtof has to be
replaced to custom function.
2021-04-20 19:44:04 +09:00