summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Kjernaasen <trond@trolltech.com>2010-03-15 14:05:54 (GMT)
committerTrond Kjernaasen <trond@trolltech.com>2010-03-15 14:12:36 (GMT)
commitbe0b2f1eb209c0177500db3bf28bed3631523464 (patch)
treeffa62f97e306b99a78d1e5554ce1409911dd7844
parent5393499e4500ca7038ab6e95453cff89eface2f3 (diff)
downloadQt-be0b2f1eb209c0177500db3bf28bed3631523464.zip
Qt-be0b2f1eb209c0177500db3bf28bed3631523464.tar.gz
Qt-be0b2f1eb209c0177500db3bf28bed3631523464.tar.bz2
Fixed cleartype text rendering on translucent surfaces.
We were using gamma corrected 11 bit values instead of the 8 bit non- corrected values, which caused some strange rendering effects. Task-number: QTBUG-9036 Reviewed-by: Samuel
-rw-r--r--src/gui/painting/qdrawhelper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 070491d..2724d7f 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -7174,9 +7174,9 @@ static inline void rgbBlendPixel(quint32 *dst, int coverage, int sr, int sg, int
) {
int a = qGray(coverage);
- sr = qt_div_255(sr * a);
- sg = qt_div_255(sg * a);
- sb = qt_div_255(sb * a);
+ sr = qt_div_255(qt_pow_rgb_invgamma[sr] * a);
+ sg = qt_div_255(qt_pow_rgb_invgamma[sg] * a);
+ sb = qt_div_255(qt_pow_rgb_invgamma[sb] * a);
int ia = 255 - a;
dr = qt_div_255(dr * ia);