In cases where the distance between points is 0, further
processing of the points results in division by zero.
To avoid this check, we ensure that duplicate points are
not added during trimming.
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
../src/loaders/jpg/tvgJpgd.cpp:867:36: warning: ‘*&P.DCT_Upsample::Matrix44::v[0][0]’ may be used uninitialized [-Wmaybe-uninitialized]
https://github.com/thorvg/thorvg/issues/2639
Updated the WebGPU engine API to align with the latest interface.
Static/Single instance, adapter and device to support multiple canvases on the browser.
Moved the WGPU request part to `initWGInstance` helper function. This must only be called once even, when multiple players are involved.
Issue: #2695
Add a labeler that automatically creates labels when a pull request is created.
(You can edit the labeler by modifying ./.github/labeler.yml.)
https://github.com/thorvg/thorvg/issues/labels
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.
Improving text render compatibility by fixing wrong Text Range.
When lottie doesn't have `end` prop in the range, system must ignore condition regarding to `end`.
The original logic unintentionally swaps `start` and `end` prop, because `end` is the zero in this case. Then the text range animation behaves the opposite.
Separate clip function from the Composite()
clipping and composition can be used together.
This helps avoid the introduction of nested scenes
when composition and clipping overlap.
Deprecated:
- enum class CompositeMethod::ClipPath
- enum Tvg_Composite_Method::TVG_COMPOSITE_METHOD_CLIP_PATH
Experimental API:
- Result Paint::clip(std::unique_ptr<Paint> clipper)
- Tvg_Result tvg_paint_set_clip(Tvg_Paint* paint, Tvg_Paint* clipper)
Issue: https://github.com/thorvg/thorvg/issues/1496
Implement some advance blending equation in GLEngine by using two
RenderPass.
* The first pass render the content into an off-screen framebuffer, also
blit the screen content to an off-screen Texture.
* The second pass renders the final blended color to the screen.
Also use a stencil test to prevent non-drawn areas from participating in the color blending calculation.
issue: https://github.com/thorvg/thorvg/issues/2435
on each parse, if the `randomize` is enabled,
the start and end of the Text Range are redefined
with the same gap as the original range.
issue: https://github.com/thorvg/thorvg/issues/2178
Vertex ordering during line join needed adjustment.
Vertices were forming two partialy overlapping triangles
instead of a rectangle. The issue was rarely visible since
the resulting rectangle often overlapped significantly
with other rectangles.
Emscripten 3.1.66 includes support for WebGPU's premultiplied canvas.
Surface configurations have been updated with premultiplied alpha mode to support this feature.
see: c82a307c61
Text can be added in parts due to the presence
of the <tspan> tag. This requires that each
subsequent piece of text is appended rather than
overwriting the previous one.