From 50e15401c94c850abed958549d98785e43529043 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Cerveau?= Date: Tue, 17 Jul 2012 08:11:28 +0200 Subject: [PATCH] Fix infinite loop due to FPU limitation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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: I1707e53f34aeeadc0f0fc07b1dca148fbe05b5f1 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 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; -- 2.7.4