diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-14 09:25:11 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-14 09:25:11 (GMT) |
commit | ab10c5b4be5c0d06edd79d8b4a8da090c1511d7e (patch) | |
tree | bfc6ab83454bc69ebfe512a1a9cb52b9e7a6376c /src/gui/painting | |
parent | 75426b7cd200a502d3a0b821c49ef3f1ea3029d2 (diff) | |
download | Qt-ab10c5b4be5c0d06edd79d8b4a8da090c1511d7e.zip Qt-ab10c5b4be5c0d06edd79d8b4a8da090c1511d7e.tar.gz Qt-ab10c5b4be5c0d06edd79d8b4a8da090c1511d7e.tar.bz2 |
Don't call into paint engines when we don't have pens and brushes
Reviewed-by: sroedal
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpaintengineex.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index e75240c..656f383 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -535,8 +535,13 @@ void QPaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) void QPaintEngineEx::draw(const QVectorPath &path) { - fill(path, state()->brush); - stroke(path, state()->pen); + const QBrush &brush = state()->brush; + if (qbrush_style(brush) != Qt::NoBrush) + fill(path, brush); + + const QPen &pen = state()->pen; + if (qpen_style(pen) != Qt::NoPen && qbrush_style(qpen_brush(pen)) != Qt::NoBrush) + stroke(path, pen); } |