summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qblendfunctions.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-05-28 22:18:29 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-05-28 22:18:29 (GMT)
commit24e904b2ef438bafb24456f934ea93497f43f5c1 (patch)
treeff0d6918591b7ef96e0951dcdc70b34e9ec84b2f /src/gui/painting/qblendfunctions.cpp
parent866813b6779a27e974c30d1023a5d734fa0318c9 (diff)
downloadQt-24e904b2ef438bafb24456f934ea93497f43f5c1.zip
Qt-24e904b2ef438bafb24456f934ea93497f43f5c1.tar.gz
Qt-24e904b2ef438bafb24456f934ea93497f43f5c1.tar.bz2
Further optimized fast scaling of ARGB8565 images onto RGB16 images.
This improves performance on embedded. Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qblendfunctions.cpp')
-rw-r--r--src/gui/painting/qblendfunctions.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp
index f83ff7b..4bdaf0b 100644
--- a/src/gui/painting/qblendfunctions.cpp
+++ b/src/gui/painting/qblendfunctions.cpp
@@ -105,10 +105,10 @@ struct Blend_RGB16_on_RGB16_ConstAlpha {
};
struct Blend_ARGB24_on_RGB16_SourceAlpha {
- inline void write(quint16 *dst, qargb8565 src) {
+ inline void write(quint16 *dst, const qargb8565 &src) {
const uint alpha = src.alpha();
if (alpha) {
- quint16 s = qrgb565(src).rawValue();
+ quint16 s = src.rawValue16();
if (alpha < 255)
s += BYTE_MUL_RGB16(*dst, 255 - alpha);
*dst = s;
@@ -125,7 +125,7 @@ struct Blend_ARGB24_on_RGB16_SourceAndConstAlpha {
src = src.byte_mul(src.alpha(m_alpha));
const uint alpha = src.alpha();
if (alpha) {
- quint16 s = qrgb565(src).rawValue();
+ quint16 s = src.rawValue16();
if (alpha < 255)
s += BYTE_MUL_RGB16(*dst, 255 - alpha);
*dst = s;