summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorStéphane Cerveau <scerveau@connected-labs.com>2012-02-02 11:08:23 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-07-17 06:10:46 (GMT)
commita9c9f5ab269f7e42b9a53dfac43ae2aead706ffd (patch)
treea4a67400538b2d4622fd7d857b38bbb4504a0beb /src/gui/painting
parent49674e35412ef5083964e105cc9cc109e981acf6 (diff)
downloadQt-a9c9f5ab269f7e42b9a53dfac43ae2aead706ffd.zip
Qt-a9c9f5ab269f7e42b9a53dfac43ae2aead706ffd.tar.gz
Qt-a9c9f5ab269f7e42b9a53dfac43ae2aead706ffd.tar.bz2
Fix infinite loop due to FPU limitation
Bug detected with animatedtiles in example/animation. In qpa mode, using some specific resolution of directfb such as 800x600 causes a bug in FillRectF where there is an infinite loop due to scalabilty of qreal value: One is rounded and the other not. Change-Id: I0a9c902889f589d669f60ff1b71fdc5266143826 Reviewed-by: Holger Freyther <holger+qt@freyther.de> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qpaintengine_blitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp
index 0b95842..c0c9dd0 100644
--- a/src/gui/painting/qpaintengine_blitter.cpp
+++ b/src/gui/painting/qpaintengine_blitter.cpp
@@ -512,12 +512,12 @@ void QBlitterPaintEngine::fillRect(const QRectF &rect, const QBrush &brush)
}
}
x+=blitWidth;
- if (x >= transformedRect.right()) {
+ if (qFuzzyCompare(x, transformedRect.right())) {
x = transformedRect.x();
srcX = startX;
srcY = 0;
y += blitHeight;
- if (y >= transformedRect.bottom())
+ if (qFuzzyCompare(y, transformedRect.bottom()))
rectIsFilled = true;
} else
srcX = 0;