diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2010-02-16 14:20:29 (GMT) |
---|---|---|
committer | Samuel Rødal <sroedal@trolltech.com> | 2010-02-17 08:28:17 (GMT) |
commit | baa7c3bdecc7fbcf7673b4b1807e742ede2e7bd7 (patch) | |
tree | b7d1b0e71da80e6970d5b23b6cfcbc68419cd3c9 /src/gui | |
parent | ec3dc06b5fbf7ef37e0836992f6d7a3fd49c5891 (diff) | |
download | Qt-baa7c3bdecc7fbcf7673b4b1807e742ede2e7bd7.zip Qt-baa7c3bdecc7fbcf7673b4b1807e742ede2e7bd7.tar.gz Qt-baa7c3bdecc7fbcf7673b4b1807e742ede2e7bd7.tar.bz2 |
Fixed autotest failure in tst_QGraphicsScene::render on Maemo.
The fixed point code in the raster paint engine's drawEllipse() function
causes rendering errors on ARM. Remove untested code and use the vector
path fallback instead.
Reviewed-by: Gunnar Sletta
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index bc56ed0..4a4792a 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -1827,6 +1827,7 @@ 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(); @@ -1846,6 +1847,7 @@ void QRasterPaintEngine::fill(const QVectorPath &path, const QBrush &brush) } } } +#endif // ### Optimize for non transformed ellipses and rectangles... QRectF cpRect = path.controlPointRect(); @@ -3672,6 +3674,7 @@ 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(); @@ -3679,9 +3682,6 @@ void QRasterPaintEngine::drawEllipse(const QRectF &rect) if (((qpen_style(s->lastPen) == Qt::SolidLine && s->flags.fast_pen) || (qpen_style(s->lastPen) == Qt::NoPen && !s->flags.antialiased)) && qMax(rect.width(), rect.height()) < QT_RASTER_COORD_LIMIT -#ifdef FLOATING_POINT_BUGGY_OR_NO_FPU - && qMax(rect.width(), rect.height()) < 128 // integer math breakdown -#endif && s->matrix.type() <= QTransform::TxScale) // no shear { ensureBrush(); @@ -3697,6 +3697,7 @@ void QRasterPaintEngine::drawEllipse(const QRectF &rect) return; } } +#endif QPaintEngineEx::drawEllipse(rect); } @@ -6054,15 +6055,9 @@ static void drawEllipse_midpoint_i(const QRect &rect, const QRect &clip, ProcessSpans pen_func, ProcessSpans brush_func, QSpanData *pen_data, QSpanData *brush_data) { -#ifdef FLOATING_POINT_BUGGY_OR_NO_FPU // no fpu, so use fixed point - const QFixed a = QFixed(rect.width()) >> 1; - const QFixed b = QFixed(rect.height()) >> 1; - QFixed d = b*b - (a*a*b) + ((a*a) >> 2); -#else const qreal a = qreal(rect.width()) / 2; const qreal b = qreal(rect.height()) / 2; qreal d = b*b - (a*a*b) + 0.25*a*a; -#endif int x = 0; int y = (rect.height() + 1) / 2; @@ -6085,12 +6080,7 @@ static void drawEllipse_midpoint_i(const QRect &rect, const QRect &clip, pen_func, brush_func, pen_data, brush_data); // region 2 -#ifdef FLOATING_POINT_BUGGY_OR_NO_FPU - d = b*b*(x + (QFixed(1) >> 1))*(x + (QFixed(1) >> 1)) - + a*a*((y - 1)*(y - 1) - b*b); -#else d = b*b*(x + 0.5)*(x + 0.5) + a*a*((y - 1)*(y - 1) - b*b); -#endif const int miny = rect.height() & 0x1; while (y > miny) { if (d < 0) { // select SE |