Don't assume QSurfaceFormat's stencil buffer size is >= 0
The value -1 is used to indicate no stencil buffer, so we have to check for sizes <= 0 when deciding whether or not to triangulate the path in QOpenGL2PaintEngineExPrivate::fill(). This fixes an issue where filling a path would end up filling the whole outline of the path, which was very visible with fonts over a certain size (when we go from using the glyph cache to drawing filled paths for each glyph). Change-Id: Iafa96124481936db1e5109bba6166a6038c7ca83 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
parent
ad3536b7ad
commit
aeefa4897f
@ -877,7 +877,7 @@ void QOpenGL2PaintEngineExPrivate::fill(const QVectorPath& path)
|
||||
// Tag it for later so that if the same path is drawn twice, it is assumed to be static and thus cachable
|
||||
path.makeCacheable();
|
||||
|
||||
if (device->context()->format().stencilBufferSize() == 0) {
|
||||
if (device->context()->format().stencilBufferSize() <= 0) {
|
||||
// If there is no stencil buffer, triangulate the path instead.
|
||||
|
||||
QRectF bbox = path.controlPointRect();
|
||||
|
Loading…
Reference in New Issue
Block a user