summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-01-07 18:21:55 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-10 15:38:13 +0100
commitaeefa4897faba85ad1c26cd44de18957d078fdef (patch)
tree6e5a7a953ede2f787cea8a133a16075579c0bbe2
parentad3536b7ad31d141927cefa2a6b10ad4806781d2 (diff)
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>
-rw-r--r--src/gui/opengl/qopenglpaintengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp
index 624eeaffd9..596ef10f6e 100644
--- a/src/gui/opengl/qopenglpaintengine.cpp
+++ b/src/gui/opengl/qopenglpaintengine.cpp
@@ -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();