summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_raster.cpp
diff options
context:
space:
mode:
authorAndreas Kling <andreas.kling@nokia.com>2010-12-20 12:04:23 (GMT)
committerAndreas Kling <andreas.kling@nokia.com>2010-12-20 12:04:23 (GMT)
commit09317dda494a51d101723131c5a01af4149ac5de (patch)
tree1fbac012298d9c2c827a77c5da64d8410b58e899 /src/gui/painting/qpaintengine_raster.cpp
parent3677eabde5595194b6fc72cd395a1ae7560c5e48 (diff)
downloadQt-09317dda494a51d101723131c5a01af4149ac5de.zip
Qt-09317dda494a51d101723131c5a01af4149ac5de.tar.gz
Qt-09317dda494a51d101723131c5a01af4149ac5de.tar.bz2
Micro-optimization for QSpanData::setup()
Don't call QColor::rgba() in a macro arg that gets evaluated multiple times. Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/painting/qpaintengine_raster.cpp')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp
index 97dfddf..3186749 100644
--- a/src/gui/painting/qpaintengine_raster.cpp
+++ b/src/gui/painting/qpaintengine_raster.cpp
@@ -5152,7 +5152,8 @@ void QSpanData::setup(const QBrush &brush, int alpha, QPainter::CompositionMode
case Qt::SolidPattern: {
type = Solid;
QColor c = qbrush_color(brush);
- solid.color = PREMUL(ARGB_COMBINE_ALPHA(c.rgba(), alpha));
+ QRgb rgba = c.rgba();
+ solid.color = PREMUL(ARGB_COMBINE_ALPHA(rgba, alpha));
if ((solid.color & 0xff000000) == 0
&& compositionMode == QPainter::CompositionMode_SourceOver) {
type = None;