summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAnders Bakken <anders.bakken@nokia.com>2009-07-13 19:50:34 (GMT)
committerAnders Bakken <anders.bakken@nokia.com>2009-07-13 19:50:34 (GMT)
commit74c95015686ad5576b53fef5f653442ea2c4053a (patch)
tree662da6913072cd8f485fe459b0cba53b8e676e20 /src/plugins
parent8e186f42278c7033a2df08f4a986419087457efc (diff)
downloadQt-74c95015686ad5576b53fef5f653442ea2c4053a.zip
Qt-74c95015686ad5576b53fef5f653442ea2c4053a.tar.gz
Qt-74c95015686ad5576b53fef5f653442ea2c4053a.tar.bz2
Code cleanup in QDirectFBPaintEngine
Take out the QPen member. Reviewed-by: Donald <qt-info@nokia.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index db08240..eda83b2 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -261,10 +261,7 @@ public:
private:
IDirectFBSurface *surface;
- QPen pen;
-
bool antialiased;
-
bool simplePen;
uint transformationType; // this is QTransform::type() + NegativeScale if qMin(transform.m11(), transform.m22()) < 0
@@ -443,8 +440,9 @@ void QDirectFBPaintEngine::drawRects(const QRect *rects, int rectCount)
d->setDFBColor(brush.color());
d->fillRects(rects, rectCount);
}
- if (d->pen != Qt::NoPen) {
- d->setDFBColor(d->pen.color());
+ const QPen &pen = state()->pen;
+ if (pen != Qt::NoPen) {
+ d->setDFBColor(pen.color());
d->drawRects(rects, rectCount);
}
}
@@ -471,8 +469,9 @@ void QDirectFBPaintEngine::drawRects(const QRectF *rects, int rectCount)
d->setDFBColor(brush.color());
d->fillRects(rects, rectCount);
}
- if (d->pen != Qt::NoPen) {
- d->setDFBColor(d->pen.color());
+ const QPen &pen = state()->pen;
+ if (pen != Qt::NoPen) {
+ d->setDFBColor(pen.color());
d->drawRects(rects, rectCount);
}
}
@@ -488,9 +487,10 @@ void QDirectFBPaintEngine::drawLines(const QLine *lines, int lineCount)
return;
}
- if (d->pen != Qt::NoPen) {
+ const QPen &pen = state()->pen;
+ if (pen != Qt::NoPen) {
d->unlock();
- d->setDFBColor(d->pen.color());
+ d->setDFBColor(pen.color());
d->drawLines(lines, lineCount);
}
}
@@ -506,9 +506,10 @@ void QDirectFBPaintEngine::drawLines(const QLineF *lines, int lineCount)
return;
}
- if (d->pen != Qt::NoPen) {
+ const QPen &pen = state()->pen;
+ if (pen != Qt::NoPen) {
d->unlock();
- d->setDFBColor(d->pen.color());
+ d->setDFBColor(pen.color());
d->drawLines(lines, lineCount);
}
}
@@ -904,9 +905,8 @@ void QDirectFBPaintEnginePrivate::setTransform(const QTransform &transform)
setPen(q->state()->pen);
}
-void QDirectFBPaintEnginePrivate::setPen(const QPen &p)
+void QDirectFBPaintEnginePrivate::setPen(const QPen &pen)
{
- pen = p;
if (pen.style() == Qt::NoPen) {
simplePen = true;
} else if (pen.style() == Qt::SolidLine