Changeset 769 for trunk/src/gui/painting/qpaintengine_raster.cpp
- Timestamp:
- Aug 2, 2010, 9:27:30 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.3 (added) merged: 768 /branches/vendor/nokia/qt/current merged: 767 /branches/vendor/nokia/qt/4.6.2 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/painting/qpaintengine_raster.cpp
r651 r769 101 101 #include <limits.h> 102 102 103 #if defined(QT_NO_FPU) || (_MSC_VER >= 1300 && _MSC_VER < 1400)104 # define FLOATING_POINT_BUGGY_OR_NO_FPU105 #endif106 107 103 QT_BEGIN_NAMESPACE 108 104 109 extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp105 Q_GUI_EXPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp 110 106 111 107 #define qreal_to_fixed_26_6(f) (int(f * 64)) … … 3680 3676 || (qpen_style(s->lastPen) == Qt::NoPen && !s->flags.antialiased)) 3681 3677 && qMax(rect.width(), rect.height()) < QT_RASTER_COORD_LIMIT 3682 #ifdef FLOATING_POINT_BUGGY_OR_NO_FPU3683 && qMax(rect.width(), rect.height()) < 128 // integer math breakdown3684 #endif3685 3678 && s->matrix.type() <= QTransform::TxScale) // no shear 3686 3679 { … … 4985 4978 } 4986 4979 4987 extern QImage qt_imageForBrush(int brushStyle, bool invert);4980 Q_GUI_EXPORT extern QImage qt_imageForBrush(int brushStyle, bool invert); 4988 4981 4989 4982 void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode compositionMode) … … 6055 6048 QSpanData *pen_data, QSpanData *brush_data) 6056 6049 { 6057 #ifdef FLOATING_POINT_BUGGY_OR_NO_FPU // no fpu, so use fixed point6058 const QFixed a = QFixed(rect.width()) >> 1;6059 const QFixed b = QFixed(rect.height()) >> 1;6060 QFixed d = b*b - (a*a*b) + ((a*a) >> 2);6061 #else6062 6050 const qreal a = qreal(rect.width()) / 2; 6063 6051 const qreal b = qreal(rect.height()) / 2; 6064 6052 qreal d = b*b - (a*a*b) + 0.25*a*a; 6065 #endif6066 6053 6067 6054 int x = 0; … … 6086 6073 6087 6074 // region 2 6088 #ifdef FLOATING_POINT_BUGGY_OR_NO_FPU6089 d = b*b*(x + (QFixed(1) >> 1))*(x + (QFixed(1) >> 1))6090 + a*a*((y - 1)*(y - 1) - b*b);6091 #else6092 6075 d = b*b*(x + 0.5)*(x + 0.5) + a*a*((y - 1)*(y - 1) - b*b); 6093 #endif6094 6076 const int miny = rect.height() & 0x1; 6095 6077 while (y > miny) {
Note:
See TracChangeset
for help on using the changeset viewer.