summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-09-25 15:22:48 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-10-06 13:36:18 (GMT)
commitaf8ff76bf25b6b4d01d89bea42baab65ed7e09ea (patch)
treef6b4beffc4bf5fe39130d8700c3837e298766089
parent6372c2865ab6924127b78f968bdd41f8d3f9c637 (diff)
downloadQt-af8ff76bf25b6b4d01d89bea42baab65ed7e09ea.zip
Qt-af8ff76bf25b6b4d01d89bea42baab65ed7e09ea.tar.gz
Qt-af8ff76bf25b6b4d01d89bea42baab65ed7e09ea.tar.bz2
Refactored GL 2 engine UniteClip to always increase max depth.
-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);