summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 65315ed7cb..5123171fff 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -1782,9 +1782,9 @@ void QRasterPaintEngine::fill(const QVectorPath &path, const QBrush &brush)
// ### Optimize for non transformed ellipses and rectangles...
QRectF cpRect = path.controlPointRect();
- const QRect pathDeviceRect = s->matrix.mapRect(cpRect).toRect();
+ const QRectF pathDeviceRect = s->matrix.mapRect(cpRect);
// Skip paths that by conservative estimates are completely outside the paint device.
- if (!pathDeviceRect.intersects(d->deviceRect))
+ if (!pathDeviceRect.intersects(QRectF(d->deviceRect)))
return;
ProcessSpans blend = d->getBrushFunc(pathDeviceRect, &s->brushData);
@@ -3043,7 +3043,12 @@ bool QRasterPaintEnginePrivate::isUnclipped(const QRect &rect,
inline bool QRasterPaintEnginePrivate::isUnclipped(const QRectF &rect,
int penWidth) const
{
- return isUnclipped(rect.normalized().toAlignedRect(), penWidth);
+ const QRectF norm = rect.normalized();
+ if (norm.left() < INT_MIN || norm.top() < INT_MIN
+ || norm.right() > INT_MAX || norm.bottom() > INT_MAX
+ || norm.width() > INT_MAX || norm.height() > INT_MAX)
+ return false;
+ return isUnclipped(norm.toAlignedRect(), penWidth);
}
inline ProcessSpans