The API allows now values <= 0 for dashes and gaps. Negative values
are treated as zero. The exception is when all provided values
are <= 0, in which case the dash is ignored.
This fixes the issue when dash = 0 was provided for strokes with round
or butt caps - the dot was not drawn, even though it should have been.
docs: the strokeDash API behavior's clarification for odd numbers
of values in dashPattern and refinement of the accepted values.
Manage the global buffer memory for vertex and indexed vertex buffers,
increase the memory size incrementally twice by default and reduce
the default buffer size, which is not suitable for typical scenarios.
This could reduce the a bit stack memory usage and improve
the portability across systems where has the stack memory
limitation and potentially gaining performance enhancement
by avoiding brutal stack memory usage at the many function calls.
added the internal functions:
- WgVertexBuffer* mpoolReqVertexBuffer(float scale = 1.0f);
- WgIndexedVertexBuffer* mpoolReqIndexedVertexBuffer(float scale = 1.0f);
- void mpoolRetVertexBuffer(WgVertexBuffer* buffer);
- void mpoolRetIndexedVertexBuffer(WgIndexedVertexBuffer* buffer);
issue: https://github.com/thorvg/thorvg/issues/3159
- refactored the Fill matrix to hold internal data statically.
- refactored for clean & neat the raster engine / svg loader logic.
API Modification:
- Matrix Fill::transform() const -> Matrix& Fill::transform() const
issue: https://github.com/thorvg/thorvg/issues/1372
Streaming model for massive vertex and index creations: minimize memory allocations, range checks and other conditions
Reduce number of segments length calculations (sqrt) and bbox (min and max).
Update distances and bboxes on a whole buffer and only if necessary. For shapes without strokes compute distances not necessary at all. bbox can be updated only on the final stage of geometry workflow, but not on the each stage.
Using stack memory instead of heap. its more cache friendly and did not fragment memory, faster memory allocations (weak place of realization)
Using cache for points distances and whole path length. Updates only if necessary
Validation of geometry consistency executes only on the final stage of path life cicle. It more friendly for data streaming: no any conditions and branches.
Using binary search for strokes trimming
Pre-cached circles geometry for caps and joints
Refactored strokes elements generation functions. Code is more readable and modifiable in general. Can be easily fixed if some geometry issues will be finded
Fixed detection of close vertices using comparison with epsilon and related artifacts in stencil buffer as extra pixels.
Fixed incorrect tessellation of curves using scaling.
Spec out this incomplete experimental feature,
this is a still promising one, we will reintroduce
this officially after 1.0 release
size: -2kb
issue: https://github.com/thorvg/thorvg/issues/1372
Deep shader refactoring for the following purposes:
* used pre-calculated gradient texture instead of per-pixel gradient map computation
* used HW wrap samples for fill spread setting
* unified gradient shader types
* used single shader module for composition instead of signle module per composition type
* used single shader module for blending for each of fill type (solid, gradient, image) instaed of signle module per blend type
* much easier add new composition and blend equations
* get rided std::string uasge
* shaders code is more readable
* bind groups creation in real time removed - performance boost
* blend and composition shaders decomposed - performance boost
* shader modules and pipeline layouts generalized - less memory usage
* shared single stencil buffer used - less memory usage
* bind groups usage simplified
* general context API simplified and generalized
* all rendering logic moved into new composition class
* ready for hardware MSAA (in next steps)
* ready for direct mask applience (in next steps)
[issues 1479: ClipPath](#1479)
Supports ClipPath composition.
Clip path composition is an only composition type who doesn't ignore blend method.
Clip path is a combination of composition approach and blend approach using compute shader
deprecate the `identifier()` APIs by replacing them with `type()`.
ThorVG is going to introduce an instance `id()`,
and this could be confused with the `identifier()` methods.
with this new type() method can reduce the memory size
by removing unncessary type data.
New Experimental C APIs:
- enum Tvg_Type
- Tvg_Result tvg_paint_get_type(const Tvg_Paint* paint, Tvg_Type* type)
- Tvg_Result tvg_gradient_get_type(const Tvg_Gradient* grad, Tvg_Type* type)
New Experimental C++ APIs:
- Type Paint::type() const
- Type Fill::type() const
- Type LinearGradient::type() const
- Type RadialGradient::type() const
- Type Shape::type() const
- Type Scene::type() const
- Type Picture::type() const
- Type Text::type() const
Deprecated C APIs:
- enum Tvg_Identifier
- Tvg_Result tvg_paint_get_identifier(const Tvg_Paint* paint, Tvg_Identifier* identifier)
- Tvg_Result tvg_gradient_get_identifier(const Tvg_Gradient* grad, Tvg_Identifier* identifier)
Deprecated C++ APIs:
- enum class Type
- uint32_t Paint::identifier() const
- uint32_t Fill::identifier() const
- static uint32_t Picture::identifier()
- static uint32_t Scene::identifier()
- static uint32_t Shape::identifier()
- static uint32_t LinearGradient:identifier()
- static uint32_T RadialGradient::identfier()
Removed Experimental APIs:
- static uint32_t Text::identifier()
issue: https://github.com/thorvg/thorvg/issues/1372