Skip to save transform data by accumulating them through the scene tree,
and then applying the final transform to the path points.
Assume that each transform have 36 bytes, it could be increased linear to paints node count
if every paints has transform in the worst case.
Fudamentally, this save their memory and only remains to Bitmap Pictures,
also helps to reduce the loading/rendering workloads since
it doesn't need to perform any transform jobs after converting.
Added error string printing on jpg image loading failure.
The error message help developer find the corrupted jpg file.
Error message is not printed for open from char* data as there the
loaders are tried on by one.
tvg binary format might break the compatibility if any major features have been changed.
It's allowed to do it when the major version is upgraded.
In that case, still we need to support the backward compatibility,
we can provide multiple binary interpreters and choose the proper one
based on the current loading tvg binary format version.
Thus, you can add further interpreters if it's necessary in the future.
Our policy is to derive the TvgBinInterpreterBase class to make it running on
the interface.
for example, if the major version is upgraded 1.x, you can implement TvgBinInterpreter1.
Separate simd implementation by files to maintain them easier.
Now we have avx, c, neon version implementation base,
we can add implementations to them.
Changes:
- Prepare neon verison of ALPHA_BLEND API.
- Use ALPHA_BLEND_NEON in _translucentRle
Notes:
- _translucentRle with neon support reduces execution time of this
function ~ 300 % (measured on uint32_t 400 x 400 buffer).
- API was tested on ARMv7l device with GCC 9.2 based toolchain. Results
on other devices could be different.
tvg file stores the version info of thorvg when it's generated,
in order to compare it with the runtime thorvg version when it's loaded.
For this, thorvg builds up the current version of symbol on the initilaization step,
that can be referred by the tvg loader.
This reduces tvg binary format size by converting PathCommand to more compact size.
This optimization increase +12% compress rate with our example:
195,668 => 174,071 (sum of all converted tvgs from svgs)
@Issues: https://github.com/Samsung/thorvg/issues/639
current bounding box of the paint is the default view size...
Do we have any better information of that?
This also fixes the wrong result after changing the size of the tvg picture.
* Apply bilinear interpolation to images
Apply bilinear interpolation when drawing images with transformation
If the mapped coordinate value is a floating point value,
bilinear interpolation is performed using adjacent pixel values.
Interpolation is not performed in cases when the color values to beinterpolated
are the same or scale down case.
If svg contained multiple defs tags only the first one was handled correctly.
Every next 'defs' tag was skipped and its inner elements parsed as it was
outside the defs.
Pixel-based image picture doesn't work at size() method.
Obvisouly, we missed to implement it properly.
This patch corrects it.
@Issue: https://github.com/Samsung/thorvg/issues/656
Changes:
- Added 'neon' vector option in build system
- Introduced neon version of rasterRGBA32 API, which improves
speed of the funciton on ARM cpu's around ~35%
if many canvas instances own private memory pool,
the memory usage can be increased linearly.
To prevent memory usage, flush out memory pool from the clear()
if the canvas uses private memory pool.
Bitmap based pictures doesn't need the viewbox,
LoaderModule should delegate the viewbox to the derived classes which
having vector-based image loaders such as svg, tvg.
In that case, paint resizing can be performed by the loaders by own
policy.
replace from Scene to Paint at the internal interface.
Picture doesn't need to know the returned Node type.
base class, Paint is enough to in the data passing.