Commit graph

125 commits

Author SHA1 Message Date
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
06d8d06993 sw_engine: replace rgba8888 with abgr8888
Actually Dali rendering system requires abgr8888.

We could add more colorspaces if it's necessary.

Change-Id: Ia42a6575d1313629e55efc3077e302992c47b6c0
2020-08-19 18:39:23 +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
Hermet Park
1eb11f249e common initializer: introduce thread count api.
this interface controls the number of threads working behind.

default is 0 == only syncrhonous.

Change-Id: I8404f33359e6213acc5e578061568fede50cd9a6
2020-08-14 18:53:01 +09:00
Hermet Park
9893af979f replace license from Apache 2.0 to MIT
Change-Id: I61f7cb2b0e407bc035f3b2ec7da9b7f230057e24
2020-08-13 16:53:38 +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
05757ec07c capi: revise some common paint interfaces and added picture stuff.
Change-Id: I9850cbead5ce1ab172f284738fe8456cd19dc3f9
2020-08-04 09:37:08 +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
e9a4e2ccb6 common: code refactoring
remove duplicated code among the Paint types.

Change-Id: Ia7c09f29531e6aef73d2ba1f951f8dfdf488deb8
2020-07-30 19:52:48 +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
8dca270a30 common: code refactoring for simplicity.
Introduce internal PaintMethod since there more derived paint classes are coming.

This PaintMethod is a sort of Strategy Pattern method.

Change-Id: I29c49f5d4ddbfb9e429d4976636b20b39914ee20
2020-07-30 14:51:31 +09:00
Hermet Park
07e5c233a7 Merge "capi: Added wrapper for tvg::Shape::transform (fixed)" into tizen 2020-07-30 04:47:31 +00: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
Mateusz Palkowski
cd699738b6 capi: Added wrapper
for tvg::Shape::transform (fixed)

Change-Id: Ibbb867e828a07af90f38ed506894d026004fa53d
2020-07-29 12:23:18 +02:00
Hermet Park
9e0c4666af common: revise transform interfaces.
transform interfaces are getting duplicated in derived classes.

we moved to the super for smaller apis count.

Applied strategy pattern to hide the inheritance.

Change-Id: I7b0c3ff9317e9bf3c97bb0c849bf55e79ee9a591
2020-07-29 16:52:40 +09:00
Mateusz Palkowski
ba17287419 capi: Added wrapper for tvg::Shape::translate
Change-Id: Idcf672926c489148f15c654f85b4d6c3ff8cde80
2020-07-27 15:12:07 +02:00
Mateusz Palkowski
52ece17fc3 capi: Added wrapper for tvg::Shape::rotate
Change-Id: I2cef6600586c037caaf8d2f45fc6d78e93dce925
2020-07-27 15:11:38 +02:00
Mateusz Palkowski
87a6b5219f capi: Added wrapper for tvg::Shape::scale
Change-Id: Ie8380478d9e5bf99c924f3b93cfbb3d80ff55611
2020-07-27 15:11:08 +02:00
Hermet Park
2501c50506 capi: improve code template.
Change-Id: Ia48a21fbd93103b371b41a13adf46d82b76803b1
2020-07-15 16:18:55 +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
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
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
Hermet Park
4156de72f1 sw_engine: optimize rasterizey by threading it.
Also, newly introduced render interfaces: preRender(), postRender(), flush()

Change-Id: If506fa27e3c7dbd89f6734cad4774c1d151b88aa
2020-06-24 18:43:11 +09:00
Hermet Park
c6742e9590 common transform: support matrix transform interface.
this interface is designed for user-defined arbitrary affine-transform paints.

required by svg loader.

Change-Id: I7f08023605d224e36cef3770098d3757aee81848
2020-06-23 11:28:20 +09:00
Hermet Park
01e52c7c7a common loader: build up loader infrastructure.
Change-Id: I62aaed43015301ec39e414833f37d6c5485d8043
2020-06-19 15:46:02 +09:00
Hermet Park
c235b7b81d common scene: design load()/save() interfaces
these interfaces will perform for vector resources such as svg/tvg/etc ...

see testSvg examples

Change-Id: Icec0a4682301a13646868bd7c3bfc1771ae7db2c
2020-06-16 16:29:26 +09:00
Hermet Park
f627679882 common initializer: replace engine class with intializer
This initializer will take over the global environments of tvg engines.

Change-Id: I7b99973dafaea57ddd3134800bd442ef4dc319ae
2020-06-16 12:54:53 +09:00
Hermet Park
5c988d01a5 sw_engine: implement linear gradient feature
also added testLinearGradient

Change-Id: I9cce74b9fc40c4ebd978939ee50955e44e7f44f2
2020-06-13 12:09:39 +09:00
Hermet Park
f3afd2a636 common fill: added spread mode.
Change-Id: I95d47bc492d5a22326a745a591d243e56a26bae4
2020-06-11 14:27:20 +09:00
Hermet Park
c36f23e80d common gradient: implement linear/radial gradient interfaces.
Change-Id: Ica9c54e662e73592d3fddcabed09b1605b3a5a4f
2020-06-10 17:03:25 +09:00
Hermet Park
c75cca5a13 common: code refacatoring.
shorter prefix for better neat code.

it's just a preference.

Change-Id: I30998476a92bc971193e9a5b4436687e48e4d19a
2020-06-09 20:45:27 +09:00
Hermet Park
498a024df8 common: ++optimization
replace dynamic_cast to static_cast,

This can be a controversial choice between optmization and clean code.

Obviously we know the converting types,
try avoiding a bit heavier casting some cases.

Change-Id: Id763e6d1db449a229a492ab5b1a901a195936152
2020-06-09 20:32:22 +09:00
Hermet Park
58de99aea3 common interface: replace arguements size_t to uint32_t
We prefer to build up a tiny compact engine at memory rather than compatibility,
this engine is not considerd for end-users but designed for middle-level framework
and some low-level users.

Thus, we won't consider 64bits data size,
use explicit 32 bits data until coming next upgrade...

Change-Id: I0704d5f1e0eb909cccc10922bc5972e115fbbcc0
2020-06-09 15:36:34 +09:00
Hermet Park
33e1d4b170 common interface: concrete return type.
Introduce Result type for notifying caller more detailed info.

We should implement the result values for each apis, with practical values.

Change-Id: Ia47abcb56a8efca7094ac3eed0178aeac8aa2910
2020-06-09 15:16:25 +09:00
Hermet Park
9aa2566b45 sw_engine: support stroke dash feature
Change-Id: Ibed8bcb6a07952a059bb9a7355f7c43db97aa672
2020-06-06 12:21:30 +09:00
Hermet Park
dc5f9f7430 common: retyped the color value size_t -> uint8_t
since it's range is 0 - 255.

Change-Id: I16e0569341c4a94acab9488d076f235bf90ff4db
2020-06-04 17:49:10 +09:00
Hermet Park
ef9f31577e common stroke: retype the stroke width from size_t to float
Change-Id: I812d06d2037d66408c41d50f7c1ff7ba605558bd
2020-06-02 20:58:50 +09:00
Hermet Park
e2c6f4523c Merge "gl_engine: gl infrastructure interfaces" into tizen 2020-05-27 02:01:26 +00:00
Prudhvi Raj Vasireddi
48e47b272b gl_engine: gl infrastructure interfaces
Change-Id: Ie1a9d1b6632433413098282c1cfaf4cf8e1cf9b9
Signed-off-by: Prudhvi Raj Vasireddi <prudhvi.raj@samsung.com>
2020-05-26 13:56:35 -04:00
Hermet Park
4799426396 common shape: introduce stroke cap and join styles.
+ revise the getter functions for avoiding invalid overloading.

Change-Id: Ie8b0cbe57435253d75871e864c7cd263a14d6df3
2020-05-23 13:32:28 +09:00
Hermet Park
a0521c83c3 common paint: revise bounds interface.
we don't use the reference style for user interfaces.

Change-Id: Id70682bf8c2d8ea9ffab2ea6fb567eaa8639da60
2020-05-22 16:32:32 +09:00
Hermet Park
19999e7abd common stroke: implement stroke interfaces.
Change-Id: I28fe5d5df4cde6640b143e67e241c6afc9c6b1fe
2020-05-22 16:18:32 +09:00
Hermet Park
b08d144dc9 common shape: introduce transformation matrix
Paint supports translate, rotate, scale functions for transformation

The origin of these transformation is center of the paint,
thus you have to consider the center-aligned vertices if you'd like to use
these transformation functions.

This policy has been considered for scene transformation.

Change-Id: I78b63d7965faec0ec5b9a98a7776993744534b54
2020-05-06 02:05:09 +09:00
Hermet Park
0716d3e774 common scene: implement basic scene behaviors and testScene sample.
Scene is a group(list) of paints.

This class is designed for vector data set which is prepared before canvas.
If a set of vector data is loaded from other resources such as files,
they can construct these data set using Scene.
This then can be pushed into canvas as one completed image.

Scene is supposed to be used in svg loading and storing to tvg specific data format(tvg)

Change-Id: Ie2ffebf74e79c59d99a77880630a54b6baad7eec
2020-05-05 10:27:35 +09:00
Hermet Park
4ff97a6a40 common canvas: hide engine() interface
this engine() is not necessary by users,
we can hide this by moving out CanvasImpl class.

Change-Id: Iaf47dbd3c523e96d6af0bd1fd4caa11a7fd3778a
2020-05-04 21:27:41 +09:00