From a9c9f5ab269f7e42b9a53dfac43ae2aead706ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 2 Feb 2012 12:08:23 +0100 Subject: Fix infinite loop due to FPU limitation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jørgen Lind --- src/gui/painting/qpaintengine_blitter.cpp | 4 ++-- 1 file 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; -- cgit v0.12