From: Stéphane Cerveau Date: Tue, 17 Jul 2012 06:11:28 +0000 (+0200) Subject: Fix infinite loop due to FPU limitation X-Git-Tag: v5.0.0-beta1~752 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50e15401c94c850abed958549d98785e43529043;p=profile%2Fivi%2Fqtbase.git 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: I1707e53f34aeeadc0f0fc07b1dca148fbe05b5f1 Reviewed-by: Jørgen Lind --- diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp index d0b5fd7..ed087d8 100644 --- a/src/gui/painting/qpaintengine_blitter.cpp +++ b/src/gui/painting/qpaintengine_blitter.cpp @@ -515,12 +515,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;