Replace the linear search algorithm with binary-search.
The performance enhancement may not yield significant benefits in normal cases.
However, it becomes crucial if the animation comprises an extensive number of frames...
Currently, tasks are expected to be triggered from the main thread.
This ensures preventing the popping of a thread from a worker thread.
Previously, there was a potential deadlock problem...
In the case of a gradient stroke and a valid
fill, the composition wasn't applied correctly,
resulting in an unexpected overlap between
the fill and stroke.
@Issue: https://github.com/thorvg/thorvg/issues/445
Added support for the objectBoundingBox value of
the clipPathUnits and for the userSpaceOnUse value
of the maskContentUnits.
@Issue: https://github.com/thorvg/thorvg/issues/429
The 'Paint' function now includes an internal stroking option,
allowing the bounding box to be calculated with or without the stroke size taken into account.
This feature is particularly useful for SVG loaders,
and we might consider making the interface available for user demands in the future.
`GL_INVALID_VALUE` is generate during `glGenBuffers` and is checked by
calling `glGetError()` inside `GL_CHECK` macro.
While the buffer id is valid if the value is not zero.
In every frame, the image undergoes a Colorspace conversion attempt.
This approach aims to bypass the step by retaining the pre-converted image data.
I acknowledge that this might not be the best approach,
but it is proving to be quite effective at the moment.
To achieve full threading efficiency,
the header should return the necessary properties:
view size, framerate, and duration.
This commit adds duration parsing.
Also don't do the header task in case of single thread
because there wouldn't be parallel effects.
1. convert mat4 directly from exist mat3, and remove unused calculation
code.
2. since normalized position is only meaningful in vertex shader stage.
use logical position in fragment shader stage for all gradient
pipeline.
Up until now, loading a clip composed of multiple
shapes worked correctly provided that they did not
undergo separate transformations. Now, such a case
has been handled.
Also the 'use' node inside the clip is supported.
Upgrade the used glsl version in GL shader source.
New version can directly specify the attribute location in
shader and the uniform block is only available in new glsl version
Loading images when the MIME type is incorrect is unnecessary
and often results in failure, adding unnecessary processing overhead.
Pictures should have a clear MIME type assigned by users.
VAO is new object in modern GL API, which can split and manage vertex
buffer and attribute state. This is optional in GLES and is mandatory in
GL.
Also index buffer is faster then pass cpu data in GL draw call.