diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-04-17 11:00:31 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-04-20 08:10:38 (GMT) |
commit | f619d17ff3fbc8f8ff60a1175bc83435f977550c (patch) | |
tree | ffee06fe566019723a7cdddcfc6fb88881f2ef41 /src/gui | |
parent | 92d4fc8401a1ef31122804e219a57513e6f37e0a (diff) | |
download | Qt-f619d17ff3fbc8f8ff60a1175bc83435f977550c.zip Qt-f619d17ff3fbc8f8ff60a1175bc83435f977550c.tar.gz Qt-f619d17ff3fbc8f8ff60a1175bc83435f977550c.tar.bz2 |
Fix ARGB8565 onto RGB16 image blending on windows
The rounding was just wrong...
Task-number: 246009
Reviewed-by: Trond
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/painting/qblendfunctions.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index 6589439..84a1e4a 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -363,9 +363,9 @@ template <typename T> void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl, quint32 siag = dg * sia; quint32 siab = db * sia; - quint32 rr = ((siar + (siar>>8) + (0x80 << 11)) >> 8) & 0xf800; - quint32 rg = ((siag + (siag>>8) + (0x80 << 5)) >> 8) & 0x07e0; - quint32 rb = ((siab + (siab>>8) + (0x80 >> 3)) >> 8); + quint32 rr = ((siar + (siar>>8) + (0x80 << 8)) >> 8) & 0xf800; + quint32 rg = ((siag + (siag>>8) + (0x80 << 3)) >> 8) & 0x07e0; + quint32 rb = ((siab + (siab>>8) + (0x80 >> 3)) >> 8) & 0x001f; *dst = alphaFunc.bytemul(spix) + rr + rg + rb; #endif |