summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-09-25 15:22:48 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-10-07 02:58:02 (GMT)
commitbf65e5cbdcc28fd19f8432feb1a92c96b56a9027 (patch)
tree085448870cfc2ed4cffc5a72039dbeace386eb0f
parenta351cc0334709a4b16bf9ddfe00524ea9ec2524a (diff)
downloadQt-bf65e5cbdcc28fd19f8432feb1a92c96b56a9027.zip
Qt-bf65e5cbdcc28fd19f8432feb1a92c96b56a9027.tar.gz
Qt-bf65e5cbdcc28fd19f8432feb1a92c96b56a9027.tar.bz2
Refactored GL 2 engine UniteClip to always increase max depth.
(cherry picked from commit af8ff76bf25b6b4d01d89bea42baab65ed7e09ea)
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 197c7a9..17b4808 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1802,10 +1802,8 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
state()->depthTestEnabled = true;
break;
case Qt::UniteClip: {
-#ifndef QT_GL_NO_SCISSOR_TEST
+ ++d->maxDepth;
if (state()->rectangleClip.isValid()) {
- d->maxDepth;
-
QPainterPath path;
path.addRect(state()->rectangleClip);
@@ -1813,6 +1811,7 @@ void QGL2PaintEngineEx::clip(const QVectorPath &path, Qt::ClipOperation op)
d->writeClip(qtVectorPathForPath(state()->matrix.inverted().map(path)), d->maxDepth);
}
+#ifndef QT_GL_NO_SCISSOR_TEST
QRect oldRectangleClip = state()->rectangleClip;
state()->rectangleClip = state()->rectangleClip.united(pathRect);