summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-07-24 08:52:29 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-07-24 08:52:29 (GMT)
commitd32922a417f20fed56f6f4837d8bfdf2899e3d3c (patch)
tree07aa5662fc96454a3ec0d0c2d85a2d061010675e /src/gui/painting/qpaintengine_raster.cpp
parentb4f2e138422076ed5d615181fc336dbb90279935 (diff)
parent9dadc219814cd9baaa4be4cee6ee2b3cf7df4a19 (diff)
downloadQt-d32922a417f20fed56f6f4837d8bfdf2899e3d3c.zip
Qt-d32922a417f20fed56f6f4837d8bfdf2899e3d3c.tar.gz
Qt-d32922a417f20fed56f6f4837d8bfdf2899e3d3c.tar.bz2
Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt
Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.h src/3rdparty/webkit/WebCore/page/DragController.cpp src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp src/3rdparty/webkit/WebKit/qt/ChangeLog src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp src/gui/painting/qpaintengineex_p.h tools/linguist/lupdate/main.cpp
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp32
1 files changed, 27 insertions, 5 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index e9ff752..dfd3e16 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -1101,6 +1101,9 @@ void QRasterPaintEnginePrivate::systemStateChanged()
#ifdef QT_DEBUG_DRAW
qDebug() << "systemStateChanged" << this << "deviceRect" << deviceRect << clipRect << systemClip;
#endif
+
+ exDeviceRect = deviceRect;
+
Q_Q(QRasterPaintEngine);
q->state()->strokeFlags |= QPaintEngine::DirtyClipRegion;
q->state()->fillFlags |= QPaintEngine::DirtyClipRegion;
@@ -1708,11 +1711,30 @@ void QRasterPaintEngine::stroke(const QVectorPath &path, const QPen &pen)
if (!s->penData.blend)
return;
- if (s->flags.fast_pen && path.shape() <= QVectorPath::NonCurvedShapeHint && s->lastPen.brush().isOpaque()) {
- strokePolygonCosmetic((QPointF *) path.points(), path.elementCount(),
- path.hasImplicitClose()
- ? WindingMode
- : PolylineMode);
+ if (s->flags.fast_pen && path.shape() <= QVectorPath::NonCurvedShapeHint
+ && s->lastPen.brush().isOpaque()) {
+ int count = path.elementCount();
+ QPointF *points = (QPointF *) path.points();
+ const QPainterPath::ElementType *types = path.elements();
+ if (types) {
+ int first = 0;
+ int last;
+ while (first < count) {
+ while (first < count && types[first] != QPainterPath::MoveToElement) ++first;
+ last = first + 1;
+ while (last < count && types[last] == QPainterPath::LineToElement) ++last;
+ strokePolygonCosmetic(points + first, last - first,
+ path.hasImplicitClose() && last == count // only close last one..
+ ? WindingMode
+ : PolylineMode);
+ first = last;
+ }
+ } else {
+ strokePolygonCosmetic(points, count,
+ path.hasImplicitClose()
+ ? WindingMode
+ : PolylineMode);
+ }
} else if (s->flags.non_complex_pen && path.shape() == QVectorPath::LinesHint) {
qreal width = s->lastPen.isCosmetic()