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.
Mask and clippath TAG are not supported yet.
If this TAG is used, the Child TAG declared with this TAG may cause problems.
To prevent that, declare them as Unknown types until they are supported. (display=none)
Reverted incorrectly modified code in 3b9bb51321.
The newly created node becomes a child of the parent parameter
and is deleted together when parsing ends.
If there is an empty (unused) <defs /> inside the svg file, this can cause problems.
<defs> node is managed separately in loader->def.
So it doesn't have to be added to loader's list.
vector is designed for c++ syntaxes,
it works properly when c++ memory allocator is applied,
Here svg_loader uses c style structures which allocated using malloc()/calloc().
That brings the memory broken of stl vectors.
So, we replaced it with our customized SvgVector to easily fix it.
Now, we have 2 points for asynchronous behaviors.
1. update shapes:
Each shape update will be performed by async when you push shape to canvas.
Meaning, if you have time gap between update and rendering in process main-loop,
you can have a benefit by this.
2. rasterization by canvas:
Canvas.draw() will be performed asynchnously until you call canvas.sync();
Meaing, if you can trigger tvg rendering eariler than composition time.
You can have a benefit by this.
If these 1, 2 points might not work for your program,
You can just toggle off async by setting threads number zero at initialization.
Or if you could apply either point of them for your program,
It might be good for performance.
But the best approach is to make both async properly.
Though this might need to fine-grained tuning integration between your program & tvg,
You could achieve the best peformance by parallelzing tasks as possible without any jobs delaying.
Change-Id: I04f9a61ebb426fd897624f5b24c83841737e6b5b
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
remove unnecessary condition.
implementation won't be included multiple times not like headers.
Thus this condition is unnecessary.
Change-Id: Id37e675c40ce7213a06c950da8e5ca17ff7245c9
if SwCoord type is determined to 4byte,
it could lose remarkable value that occur stroking jiggling.
This fixes the issue.
Change-Id: Ib2fed2a3bfc9188a30522f35837439364d446a73
Actually Dali rendering system requires abgr8888.
We could add more colorspaces if it's necessary.
Change-Id: Ia42a6575d1313629e55efc3077e302992c47b6c0
Now, stabilizing is pretty enough.
Remove assert code so that we never abort process in any cases.
This also reduce the binary size.
Change-Id: Ia7d2d5c5a0757b12481eaebad7a86aade6a89c1e
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
picture now affords the memory data as input source so that
user can pass svg data memory directly.
Change-Id: I246c09b682a2d60e53ad556ce0c90337142ee4f1