summaryrefslogtreecommitdiffstats
path: root/src/opengl/qpaintengine_opengl.cpp
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-04-21 10:05:27 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-04-21 10:13:52 (GMT)
commitbe7ee29e4b40d2496041873bba753761a6d7b8c4 (patch)
treeb65e2e43bdc6eefa5f4d831ba04932790edfd652 /src/opengl/qpaintengine_opengl.cpp
parent3ca6dde968488dfe005ffcdc88dbf6a0c1467438 (diff)
downloadQt-be7ee29e4b40d2496041873bba753761a6d7b8c4.zip
Qt-be7ee29e4b40d2496041873bba753761a6d7b8c4.tar.gz
Qt-be7ee29e4b40d2496041873bba753761a6d7b8c4.tar.bz2
Fix crash in OpenGL paint engine with hq antialiasing and TxProject
Use painter paths instead of rectangles for perspective transformed rects, as the rectangles might have been clipped. Task-number: 251485 Reviewed-by: Trond
Diffstat (limited to 'src/opengl/qpaintengine_opengl.cpp')
-rw-r--r--src/opengl/qpaintengine_opengl.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index 88fd379..ec6e33b 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -3716,8 +3716,14 @@ void QOpenGLPaintEngine::drawRects(const QRectF *rects, int rectCount)
d->disableClipping();
GLuint program = qt_gl_program_cache()->getProgram(d->drawable.context(),
FRAGMENT_PROGRAM_MASK_TRAPEZOID_AA, 0, true);
- QGLRectMaskGenerator maskGenerator(path, d->matrix, d->offscreen, program);
- d->addItem(qt_mask_texture_cache()->getMask(maskGenerator, d));
+
+ if (d->matrix.type() >= QTransform::TxProject) {
+ QGLPathMaskGenerator maskGenerator(path, d->matrix, d->offscreen, program);
+ d->addItem(qt_mask_texture_cache()->getMask(maskGenerator, d));
+ } else {
+ QGLRectMaskGenerator maskGenerator(path, d->matrix, d->offscreen, program);
+ d->addItem(qt_mask_texture_cache()->getMask(maskGenerator, d));
+ }
d->enableClipping();
}