redefiend properties so that min/max are prioritized,
as they are accessed more frequently than pos/size
during rendering calculations.
also introduced miscellaneous functions to improve usability.
ThorVG pImpl idiom caused internal data to be scattered
across hierarchical classes. This refactoring consolidates
the data by inheriting pImpl internally, reducing memory
allocation counts and eliminating unnecessary strategy methods.
WebGL has a strict rule that does not allow the same GLBuffer
to be bound to both ARRAY_BUFFER and ELEMENT_ARRAY_BUFFER at the same time.
(https://registry.khronos.org/webgl/specs/latest/1.0/#5.14.5)
To support WebGL in the future, a separate GLBuffer is used to store index data.
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
Performing a full-screen RenderPass resolve is too expensive.
Because most composite cases only require a small area to be rendered off-screen.
To improve performance, use the bounds of the Geometry for off-screen rendering whenever possible
* Optimize clip logical, change to use GL_GRATER and keep incrace depth
value, so no need to do depth clear after every clip draw.
* Correct geometry bounding box calculation, and make sure the bounds is
larger than all vertices
* Limit drawing area for off-screen RenderPass with correct scissor box
* restrict the scissor box of composite task
* do not tessellate stroke or fill geometry if there is no Fill or
Stroke color
* use actually transformed curve to calculate polyline count when doing
curve flatten
* Support rendering Gradient in path Stroke mode
* Fix GlStencilCoverTask not support even-odd fill rule
* Make GlStencilCoverTask can discard overlapped area during stroke
rendering
Since we choose MSAA, no need to calculate edge alpha during fragment
stage. So this commit removed the alpha attribute and related code:
* Remove the alpha attribute in vertex data.
* Change position type from `vec3` to `vec2` in all shader code.
* Remove alhpa multiplication in all fragment shaders
Since we choose multisample antialiasing, use stencil then cover to
render polygon can get better performance.
Also the code is much easier to understand.
* add new render task to do stencil and cover rendering which is a
fallback rendering method to handle cases that trianglation tessellation
failed
* add a new tessellator to generate stencil and cover vertex mesh
* merge vertices that are close enough before tessellation
* append return branch in tessellation to prevent dead loop caused by floating point precision
* Use uniform block to pack all color informations
* Move the actual gl draw call into GlRenderer::sync function, so all
data is been uploaded into GPU
* Make GlRenderTask simple and generic for direct gl draw