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
Reduce duplicated masking raster code by replacing with c++ templates
this change does not noticeably impact performance (< error bound).
Binary Size diff: 218379 -> 217851 (-0.5kb)
Reduce duplicated image raster code between scaler approaches.
Although this allows for a function call per pixel,
this change does not noticeably impact performance (< error bound).
Binary Size diff: 222541 -> 218379 (-4kb)
Reduce excessive gradient filling code duplication by employing C++ template method.
This change does not affect performance or binary size adversely.
Binary Size Diff: 223399 -> 222693 (-706)
Unify textmap methods that are overly duplicated with each other.
Still trying to simplifying raster code so that thorvg could introduce
the a bunch of masking method code nicely.
This reduces the size like: 214773 -> 212843 (-2kb)
Compact blending instructions by distinquish the
shape & images. since we gurantee the shape color is
premultiplied alpha.
As a result, this enhanced performance by 0.002s in examples/Performance
on my local machine.
This also contains code cleanup chores.
[41/145] Compiling C++ object src/libthorvg.a.p/loaders_jpg_tvgJpgd.cpp.o
../src/loaders/jpg/tvgJpgd.cpp:1339:17: warning: variable 'bytes' set but not used [-Wunused-but-set-variable]
uint32_t c, bytes = 0;
^
../src/loaders/jpg/tvgJpgd.cpp:1773:29: warning: variable 'row_block' set but not used [-Wunused-but-set-variable]
int mcu_row, mcu_block, row_block = 0;
^
../src/loaders/jpg/tvgJpgd.cpp:1876:9: warning: variable 'row_block' set but not used [-Wunused-but-set-variable]
int row_block = 0;
^
3 warnings generated.
WARNING:: You should add the boolean check kwarg to the run_command call.
It currently defaults to false,
but it will default to true in future releases of meson.
See also: https://github.com/mesonbuild/meson/issues/9300
The CompositeMethod now includes the newly supported InvLumaMask option:
The source pixels are converted to grayscale (luma values),
and the complement of the target's pixels is alpha blended.
As a result, only the part of the source where the grayscale
is not covered by the target is visible.
@APIs: CompositeMethod::InvLumaMask
@Example: examples/InvLumaMasking.cpp
@Issue: https://github.com/thorvg/thorvg/issues/404
There are two branches for completing stroke composition between the canvas and sw_engine.
It is necessary to centralize the task on the canvas engine side so that
we can maintain the logic without confusion.