Commit graph

109 commits

Author SHA1 Message Date
Shinwoo Kim
0c68c45ef7 thorvg viewer: introduce thorvg viewer
Support Emscripten wasm build for thorvg viewer
2020-10-13 19:04:46 +09:00
Hermet Park
729fee5a23 examples: move tests to src/examples
tests is now officially placed in src/examples,
default is turned off, only necessaries turn it on.

ex) meson . build -Dexamples=true

+ this examples are required efl 'elementary' package.
2020-09-19 00:39:25 +09:00
Michal Szczecinski
538db6e881 shape: added duplicate api.
Changes:
1. New shape->duplicate(Shape) api.
2. New example: testDuplicate
3. Added capi binding for duploicate api
4. Added capi duplication test in testCapi.c

Description:

Added implementation of duplicate api. For now it supports stroke
properties and shape properties (fill color, path) duplication.

TODO:
Implement gradient properties duplication
2020-09-17 11:01:52 +09:00
Hermet Park
be93b17563 test: fix typo
dash size must be 2, not 4.
2020-09-16 21:02:06 +09:00
Hermet Park
7a27ca3613 capi: correct interfaces.
put missing const parameter and correct set/get naming.

attention, these two apis are changed!

tvg_gradient_color_stops() => tvg_gradient_set_color_stops()
tvg_gradient_spread() = tvg_gradient_set_spread()
2020-09-16 17:56:47 +09:00
Piotr Kalota
7d08f202a8 bindings/capi: Added path getters + test in testCapi.c 2020-09-16 16:55:00 +09:00
Hermet Park
4c0bce3fdc sw_engine: fix shape rendering skip issue.
tvg canvas must draw retained shapes for every draw call
even though user missed call update() for shapes.

that case canvs must draw shapes without update,
it means drawing them within previous condition.
2020-09-09 11:02:56 +09:00
Hermet Park
56ff30adff test: +++ missing test file. 2020-09-05 19:05:17 +09:00
Hermet Park
8685c7e0f0 common: fix context corruption among the multiple canvases.
previous implementation didn't consider multiple canvases,
multiple canvas shared one renderer engine that brought corrupted contexts.
Thus, each canvas instances should have designated renderer engine instances.

Now fixed.
2020-09-05 18:55:51 +09:00
Hermet Park
6bd56e26c7 test async: fix wrong time unit. 2020-09-01 20:40:18 +09:00
Mira Grudzinska
42a747fa17 SwRenderer: fixing unnecessary nesting in prepare()
Validating the above by adding shape/canvas update to testCapi.cpp

Change-Id: I7db8d014f4aff7b5b2884c2dca5af119329e9d43
2020-08-25 16:50:14 +09:00
Hermet Park
2ef3d05db9 svg_loader: applied asynchronous threads tasks for optimal performance.
Change-Id: I6575a6a6302c0ae52d1256a5f79f4c080002a4aa
2020-08-25 16:08:33 +09:00
Hermet Park
657e6daddb common taskscheduler: revise functionalities.
initialization interfaces has been changed for threads count.

if you want to set concrete threads count by system, please specify thread count with it.

std threads:
tvg::Initializer::init(tvg::CanvasEngine::Sw, std:🧵:hardware_concurrency());

if your system provides designed threads info, you can use it.

efl:
tvg_engine_init(TVG_ENGINE_SW, eina_cpu_count());

I recommend to avoid max threads usage for better performance.

Change-Id: I22cfa315768f73fa941be136956cdbb2cf837c20
2020-08-21 12:26:57 +09:00
Hermet Park
f4d1065d52 sw_engine: convert colorspace ARGB -> RGBA in default.
We can use RGBA colorspace rather ARGB for pixel data.
This would be better for many rendering system,
since it's more widely preferred than ARGB including opengl.

Change-Id: Ibbfe6a511d77bf0ef30ce261995467c11164d306
2020-08-15 18:22:43 +09:00
Hermet Park
7ab71c52d0 picture svg: introduce load() with memory data input source.
picture now affords the memory data as input source so that
user can pass svg data memory directly.

Change-Id: I246c09b682a2d60e53ad556ce0c90337142ee4f1
2020-08-14 19:41:04 +09:00
Mateusz Palkowski
083fa57c3e capi: Added C wrapper for setting spread type
and test

Change-Id: I3b4cd3740a82446fea60ed050814b03f32632f6d
2020-08-06 08:09:40 +00:00
Hermet Park
9f6b5eb59e common: changed premultiplied color policy.
Some user have no idea of premultiplied alpha concept,
We suggest more user-friendly interfaces so that they don't confuse it.

Now, this pre-multipying is acommplished by backend engines.

Change-Id: Ifd84d56361cb56a8b98240bbd16690accf370bad
2020-08-06 13:54:51 +09:00
Hermet Park
cfbd419fbd test arc: revise sample code.
Change-Id: I3629befdf5ce74ae7822929a059b4c95f2a9e88e
2020-08-04 09:57:37 +09:00
Hermet Park
e98988da02 common shape: support pie filling from arc.
last argument pie=true makes arc to pie shape.

Change-Id: I6f22d00fed77bf728a4ff6e5f1ca42f476ac1664
2020-08-03 20:02:31 +09:00
Hermet Park
0be10ce140 Merge "common shape: added arc implementation" into tizen 2020-08-03 09:50:52 +00:00
Michal Szczecinski
214072babe common shape: added arc implementation
Change-Id: Ib483e24d8e358b2860ca8d46e8b88d58d12bdb62
2020-08-03 08:31:54 +02:00
Mateusz Palkowski
7b9c7de1e5 capi: Added C wrappers for gradient func
Change-Id: If41dab9b06f6cec2831ea1361f30b50a193e99c4
2020-07-31 11:34:49 +02:00
Hermet Park
f15aefa5dc test: updated svg sample
also revise size() method of Picture for proper aligning.

Change-Id: I58a0886968f6058e65a062477e2a873224d8ea8f
2020-07-30 21:10:02 +09:00
Hermet Park
ec6e5618e2 common picture: introduce picture feature which is for vector file extensions.
Now Scene is only specialized for composition of Paint objects.

Change-Id: I16426913f029c89e9f9ac4d5e0afed11d1a228d0
2020-07-30 17:13:00 +09:00
Hermet Park
80d47fd7d3 common: revise canvas interfaces.
1. removed async option which doesn't work currently,
rather than it, we can add async option in initiailizer class.

2. removed update() method.
Instead, we can call update(paint = nullptr); which has exactly same behavior.

Change-Id: I7909a50d804b97baf413a2ff6365a3cf79a3689e
2020-07-30 13:43:18 +09:00
Hermet Park
6cfb3cdb6c test: replaced svg resources.
Change-Id: I30ab48ecc0bbae158baecce1f6173fc36ecfbbb6
2020-07-20 11:44:53 +09:00
Hermet Park
2ba529c8fb common transformation: fix transformation multiply
Change-Id: Ibc95fab0abfc07aa7f0c4ff6c74785d4f73d02c7
2020-07-17 17:54:21 +09:00
Hermet Park
a5d1542e44 test: ++code safety
added null check for exceptional case.

Change-Id: I12a5e9724149f607188b67a84e46a033a16270f7
2020-07-17 17:15:16 +09:00
Hermet Park
56c0235dc5 test: changed file permission.
Change-Id: I8172152f700d10fa1d8c84473d45ff484c0b36d8
2020-07-17 16:57:02 +09:00
Pranay Kumar Samanta
3b385d1d54 gl_engine: Fix crash in animation callback. Refactor test samples draw function. Fix open shape drawing.
Change-Id: I9ca2cb3951f2229f36292b69221451e0eaf5b6a1
2020-07-17 07:54:58 +00:00
JunsuChoi
e3218a8a9a test: Fix typo in makefile
' -> `

Change-Id: Iafacfb78d8f788ef302e5ad7f1a1d9cfbd380ffb
2020-07-16 14:58:35 +09:00
Hermet Park
9876d685cf capi: support c interfaces
this capi is under the beta,
we quickly provide this working prototype for collaboration.

Change-Id: Ie246abc306feb9a1305d1b593c4f3ef7f40ab5a9
2020-07-15 16:00:09 +09:00
Hermet Park
9e1ba8d2c0 sw_engine: introduce avx simd instruction
avx is the cutting edge method for intel & amd cpus simd instruction.
We are going to support this feature for the desktop environment (instead of sse)

You can turn on this with configuration something like this:

$meson . build -Dvectors=avx

Current patch supports only for raster solid color

Change-Id: I068ba30a1f63d480415e2762f8021fc8d6d28a39
2020-07-11 20:58:09 +09:00
Hermet Park
22581040f3 Merge "SvgLoader: Support to linear, radial gradient" into tizen 2020-07-10 00:19:51 +00:00
JunsuChoi
f644443655 SvgLoader: Support to linear, radial gradient
Change-Id: Ida3f6ccca5f0d6ed1922b7ce99d2d2f3203f5ba9
2020-07-09 13:36:46 +09:00
Hermet Park
99428ee80a build: support features toggling in meson option.
Change-Id: Id1ebda70fe8380aaa913f79af26e5c39893a6df5
2020-07-08 15:30:12 +09:00
Hermet Park
ef4d7a3956 common shape: expand rectangle arguement to support both corner radius x, y
this is useful for svg loader

Change-Id: Ia11c2d1c6ea88f3fd65c7f75cef8b59bef426bcb
2020-07-07 13:09:46 +09:00
JunsuChoi
02a0e98596 SvgLoader: Support x,y rounded rect
Change-Id: I45d8f7ff3604da0a80c09e2495ed8c0301310094
2020-07-07 02:37:27 +00:00
Hermet Park
2929fa5c57 sw_engine: optimize rle rendering.
we don't need to apply anti-aliasing if stroke is there.
here turns off anti-alias if stroke width is more than 2.
magic number 2 is experimentally confirmed.

Change-Id: I09031dc2a0a84f31c5904651ed1e62004645ba9a
2020-07-03 18:32:50 +09:00
Hermet Park
322174d778 sw_engine: optimize othogonal rectangle drawing.
if the rectangle is not transformed, we don't need to use rle method.
we can directly raster pixels onto the bounding box.

Change-Id: I4e8b57149c0bcd78124d09388bf5115093a43bee
2020-07-01 15:53:47 +09:00
Hermet Park
0d5adb2f03 test: enable gl window only on gl backend.
Change-Id: Iafd790b7fc1df8a58bdce2f18c39029cc0d74945
2020-07-01 14:25:53 +09:00
Hermet Park
5faa94340f sw_engine: fix a regression bug.
Shape must have closed path for filling color.
if closed is skipped, it would take it's a line.

Change-Id: Ie1dcde9edbfc6501a34d6cb9ce54184ade6864db
2020-07-01 12:53:01 +09:00
Hermet Park
f377f33993 sw_engine: fix to update stroking transform
when shape doesn't have fill color, stroking is missed in update.

this fixs that issue.

Change-Id: I49292475e56caa834e79497a16db705b965bcf5f
2020-06-30 17:24:14 +09:00
Hermet Park
61cb144122 test: revise sample.
this patch adds the showcase how to handle exceptional cases.

Change-Id: Ic8e3c740bbf613f4dccace511b6c8d93b987a10c
2020-06-30 13:31:28 +09:00
Hermet Park
8bb8710815 test svg: remove white trailings
Change-Id: Ie23ffdd420eb9742b21350dfffd5b29ae0515be3
2020-06-30 10:24:56 +09:00
Hermet Park
918b6c69d8 test: unify test code for supporting gl engine from all test cases.
now you can launch tests with gl engine by "gl" option

ex)
$ testTransform gl
$ testScene gl

Change-Id: Idb720ed369a2fbfb908c977fdaebd7289986fb6f
2020-06-29 21:00:26 +09:00
JunsuChoi
654299d0ab test: Improve svg test
Displays svg files located in "./svgs" dir.

Change-Id: I4b9a281dc31fefb28c969780fa28adb74a5f5c02
2020-06-29 11:24:52 +00:00
Hermet Park
0a562a4ae2 test: print current backend engine name
Change-Id: Iaafa521556a614b47994914c09228b8e8ae9c9e9
2020-06-29 16:26:02 +09:00
Hermet Park
4d6dee91e4 test shape: unify sw/gl test code.
default is sw engine, please run sample app with "gl" argument

$./testShape gl

Change-Id: Iff7da624ff17827df957919341737b9f129f502e
2020-06-29 14:59:01 +09:00
Hermet Park
56e866dd36 renamed project name tizenvg => thorvg
we're going to open this project as the independent one,

thus removed tizen naming here.

Change-Id: Ib3c898067dd9186e893f7cb0903fd70d2ce7b31f
2020-06-25 13:57:41 +09:00