diff options
author | Samuel Rødal <sroedal@trolltech.com> | 2010-01-15 12:23:51 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-01-27 15:30:26 (GMT) |
commit | 3741fd9aed480f5db37502cc57634fec97432e8e (patch) | |
tree | 2613fc89bbe73f9e264b1714e5734c21c1dfa3a3 | |
parent | 9098631b8a3927ebdf945ccdbaf20b9a7616636d (diff) | |
download | Qt-3741fd9aed480f5db37502cc57634fec97432e8e.zip Qt-3741fd9aed480f5db37502cc57634fec97432e8e.tar.gz Qt-3741fd9aed480f5db37502cc57634fec97432e8e.tar.bz2 |
Small optimization in raster paint engine.
Don't repeatedly update the pen / brush if no pen / brush is set.
Reviewed-by: Gunnar Sletta
-rw-r--r-- | src/gui/painting/qpaintengine_raster_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index b937f66..a1c73cc 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -264,13 +264,13 @@ private: #endif // Q_OS_SYMBIAN && QT_NO_FREETYPE inline void ensureBrush(const QBrush &brush) { - if (!qbrush_fast_equals(state()->lastBrush, brush) || state()->fillFlags) + if (!qbrush_fast_equals(state()->lastBrush, brush) || (brush.style() != Qt::NoBrush && state()->fillFlags)) updateBrush(brush); } inline void ensureBrush() { ensureBrush(state()->brush); } inline void ensurePen(const QPen &pen) { - if (!qpen_fast_equals(state()->lastPen, pen) || state()->strokeFlags) + if (!qpen_fast_equals(state()->lastPen, pen) || (pen.style() != Qt::NoPen && state()->strokeFlags)) updatePen(pen); } inline void ensurePen() { ensurePen(state()->pen); } |