diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2009-04-21 10:05:27 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2009-04-21 10:13:52 (GMT) |
commit | be7ee29e4b40d2496041873bba753761a6d7b8c4 (patch) | |
tree | b65e2e43bdc6eefa5f4d831ba04932790edfd652 /src/opengl/qpaintengine_opengl.cpp | |
parent | 3ca6dde968488dfe005ffcdc88dbf6a0c1467438 (diff) | |
download | Qt-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.cpp | 10 |
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(); } |