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:
RuiwenTang 2024-03-04 12:11:58 +08:00 committed by Hermet Park
parent 199fac9b63
commit 7cf4bd932f

View file

@ -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)) {