summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2010-02-17 16:12:57 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2010-02-18 10:03:34 (GMT)
commita359db8f939ccbe8ce49c2ef71ff4585ab69c15e (patch)
treef116f5a3c7dacbab49bef1c14d396781d59e908a
parent720d56486c3a3fd2d4d6517b8805ff96d3c6da60 (diff)
downloadQt-a359db8f939ccbe8ce49c2ef71ff4585ab69c15e.zip
Qt-a359db8f939ccbe8ce49c2ef71ff4585ab69c15e.tar.gz
Qt-a359db8f939ccbe8ce49c2ef71ff4585ab69c15e.tar.bz2
Fixed autotest failure in tst_QPainter::drawEllipse on Maemo.
The previous fix (baa7c3bdecc) attempted to fall back to path drawing in QPainter::drawEllipse, however we have some specific filling rules for aliased ellipse drawing in the raster paint engine. We should use the (now free of fixed point math) drawEllipse_midpoint_i function on all platforms. Reviewed-by: Gunnar Sletta
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp8
-rw-r--r--tests/auto/qpainter/tst_qpainter.cpp2
2 files changed, 0 insertions, 10 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 4a4792a..3c2cc8c 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -100,10 +100,6 @@
#endif
#include <limits.h>
-#if defined(QT_NO_FPU) || (_MSC_VER >= 1300 && _MSC_VER < 1400)
-# define FLOATING_POINT_BUGGY_OR_NO_FPU
-#endif
-
QT_BEGIN_NAMESPACE
extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
@@ -1827,7 +1823,6 @@ void QRasterPaintEngine::fill(const QVectorPath &path, const QBrush &brush)
}
}
-#ifndef FLOATING_POINT_BUGGY_OR_NO_FPU
if (path.shape() == QVectorPath::EllipseHint) {
if (!s->flags.antialiased && s->matrix.type() <= QTransform::TxScale) {
const qreal *p = path.points();
@@ -1847,7 +1842,6 @@ void QRasterPaintEngine::fill(const QVectorPath &path, const QBrush &brush)
}
}
}
-#endif
// ### Optimize for non transformed ellipses and rectangles...
QRectF cpRect = path.controlPointRect();
@@ -3674,7 +3668,6 @@ void QRasterPaintEngine::drawLines(const QLineF *lines, int lineCount)
*/
void QRasterPaintEngine::drawEllipse(const QRectF &rect)
{
-#ifndef FLOATING_POINT_BUGGY_OR_NO_FPU
Q_D(QRasterPaintEngine);
QRasterPaintEngineState *s = state();
@@ -3697,7 +3690,6 @@ void QRasterPaintEngine::drawEllipse(const QRectF &rect)
return;
}
}
-#endif
QPaintEngineEx::drawEllipse(rect);
}
diff --git a/tests/auto/qpainter/tst_qpainter.cpp b/tests/auto/qpainter/tst_qpainter.cpp
index 104728d..beb83a1 100644
--- a/tests/auto/qpainter/tst_qpainter.cpp
+++ b/tests/auto/qpainter/tst_qpainter.cpp
@@ -1580,10 +1580,8 @@ void tst_QPainter::drawClippedEllipse_data()
void tst_QPainter::drawClippedEllipse()
{
QFETCH(QRect, rect);
-#if defined(Q_OS_WINCE) || defined(Q_OS_SYMBIAN)
if (sizeof(qreal) != sizeof(double))
QSKIP("Test only works for qreal==double", SkipAll);
-#endif
QImage image(rect.width() + 1, rect.height() + 1,
QImage::Format_ARGB32_Premultiplied);
QRect expected = QRect(rect.x(), rect.y(), rect.width()+1, rect.height()+1)