diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-06-16 10:10:03 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2010-06-16 10:20:59 (GMT) |
commit | 7619c210217c85ef6e8d3571cce5d1272b1cb437 (patch) | |
tree | cbaa3a135f012ecd31494fd9c136167bed1347e2 /src/gui/painting/qpaintengine_raster.cpp | |
parent | 64e60dab167afc68cfb94a8eb0b7469eea9a4291 (diff) | |
download | Qt-7619c210217c85ef6e8d3571cce5d1272b1cb437.zip Qt-7619c210217c85ef6e8d3571cce5d1272b1cb437.tar.gz Qt-7619c210217c85ef6e8d3571cce5d1272b1cb437.tar.bz2 |
Fixed infinite recursion when drawing very large painter paths.
Task-number: QTBUG-11291
Reviewed-by: Gunnar
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index f10f12f..a212718 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -459,13 +459,12 @@ bool QRasterPaintEngine::begin(QPaintDevice *device) QRasterPaintEngineState *s = state(); ensureOutlineMapper(); - d->outlineMapper->m_clip_rect = d->deviceRect.adjusted(-10, -10, 10, 10); - - // This is the upp - QRect bounds(-QT_RASTER_COORD_LIMIT, -QT_RASTER_COORD_LIMIT, - QT_RASTER_COORD_LIMIT*2 - 1, QT_RASTER_COORD_LIMIT * 2 - 1); - d->outlineMapper->m_clip_rect = bounds.intersected(d->outlineMapper->m_clip_rect); + d->outlineMapper->m_clip_rect = d->deviceRect; + if (d->outlineMapper->m_clip_rect.width() > QT_RASTER_COORD_LIMIT) + d->outlineMapper->m_clip_rect.setWidth(QT_RASTER_COORD_LIMIT); + if (d->outlineMapper->m_clip_rect.height() > QT_RASTER_COORD_LIMIT) + d->outlineMapper->m_clip_rect.setHeight(QT_RASTER_COORD_LIMIT); d->rasterizer->setClipRect(d->deviceRect); |