This change introduces the CanvasEngine::All type to automatically
initialize the engines available on the current system.
These revisions improve the usability of these APIs.
Addtions:
- enum class CanvasEngine::All
Modifications:
- Result Initializer::init(CanvasEngine engine, uint32_t threads) ->
Result Initializer::init(uint32_t threads, CanvasEngine engine = tvg::CanvasEngine::All)
These new apis would enable users to easily modify the motion scene,
The data structure of the paints has been changed from an array to a list.
@APIs:
std::list<Paint*>& Canvas::paints() noexcept;
std::list<Paint*>& Scene::paints() noexcept;
@Deprecated:
Result Canvas::reserve(uint32_t size) noexcept;
Result Scene::reserve(uint32_t size) noexcept;
@Issue: https://github.com/thorvg/thorvg/issues/1203
Split some tests into SECTIONs based on their type.
This improves the readability of TC.
And developer can run test in SECTION unit.
ex)
./build/test/tvgUnitTests "Pushing Paints Into Scene" -c "Pushing Null Pointer"
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.
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
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
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
PaintNode -> Paint
ShapeNode -> Shape
SceneNode -> Scene
We can keep clean and neat shorter names.
Change-Id: Ic8521d456d947985e5fbe1ba2bde06faa1f52469