Rounded corners should now be applied not only to rectangles
but also to path strokes. This enhancement changes the stroke join style
to round when a rounded corner is present.
Indeed, rounded corners ensure the accurate calculation of roundness based on the join style.
However, this patch has not yet been designed to handle it.
Previously, a mechanism was introduced to skip antialiasing computations
when shapes are invisible due to their stroking. However, this mechanism
failed to account for the scale factor of the stroke; it only considered
the current stroke width as a threshold.
Consequently, when the stroke width is scaled up to a value smaller than
the threshold, the incorrect antialiasing approach is applied. This results
in the appearance of jagged edges.
The implemented fix rectifies this problem and ensures that the antialiasing
computation correctly takes into consideration both the visibility and the
scale factor of the stroke width.
replaced 32-bit operations with 8-bit operations for masking buffers.
We might need a grasycale image support for applying 1-byte channel masking input(Picture).
Some of masking implementation are disabled by this reason.
Also, I don't expecct it's necessary for the thorvg now.
Corrected subtract/intersect masking behaviors that were inaccurately functioning
within chain-masking.
This also helps to enhance the masking performance by reducing the
masking region when applying subtract/intersect.
@Issue: https://github.com/thorvg/thorvg/issues/1606
../src/lib/sw_engine/tvgSwShape.cpp:232:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
232 | for (auto i = 0; i < dash.cnt; ++i) patternLength += pattern[i];
| ~~^~~~~~~~~~
../src/lib/sw_engine/tvgSwShape.cpp:239:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32_t’ {aka ‘unsigned int’} [-Wsign-compare]
239 | for (auto i = 0; i < dash.cnt * (1 + isOdd); ++i, ++offIdx) {
This reverts commit 6cbc1de570.
Setting def value for 'a' makes it impossible to overload
the 'stroke' api with 3 values (needed for introducing dash offset).
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...