mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
gl_engine: use stencil and cover tessellator by default
Since we choose multisample antialiasing, use stencil then cover to render polygon can get better performance. Also the code is much easier to understand.
This commit is contained in:
parent
199fac9b63
commit
7cf4bd932f
1 changed files with 3 additions and 8 deletions
|
@ -41,17 +41,12 @@ bool GlGeometry::tesselate(const RenderShape& rshape, RenderUpdateFlag flag)
|
|||
fillVertex.clear();
|
||||
fillIndex.clear();
|
||||
|
||||
Tessellator tess{&fillVertex, &fillIndex};
|
||||
if (!tess.tessellate(&rshape, true)) {
|
||||
fillVertex.clear();
|
||||
fillIndex.clear();
|
||||
|
||||
BWTessellator bwTess{&fillVertex, &fillIndex};
|
||||
BWTessellator bwTess{&fillVertex, &fillIndex};
|
||||
|
||||
bwTess.tessellate(&rshape);
|
||||
bwTess.tessellate(&rshape);
|
||||
|
||||
mStencilFill = true;
|
||||
}
|
||||
mStencilFill = true;
|
||||
}
|
||||
|
||||
if (flag & (RenderUpdateFlag::Stroke | RenderUpdateFlag::Transform)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue