From a359db8f939ccbe8ce49c2ef71ff4585ab69c15e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 17 Feb 2010 17:12:57 +0100 Subject: 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 --- src/gui/painting/qpaintengine_raster.cpp | 8 -------- tests/auto/qpainter/tst_qpainter.cpp | 2 -- 2 files changed, 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 -#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) -- cgit v0.12