diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-03-27 08:30:47 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-27 12:33:42 +0200 |
commit | 4f92f9b7251addef556b25e8ab88e00acfaf61b0 (patch) | |
tree | cadb3a0fe7e4c2564e609c3d27d2bc47be516029 /src/gui/image/qimage.cpp | |
parent | 8d28f263aa14cc450085c9df3623a483b6021c56 (diff) |
Introduce FontSmoothingGamma as a platform style hint.
- Allocate gamma tables on the heap in a thread-safe way, use
font smoothing returned by the style hints of the platform to
calculate them.
- Improve font rendering on Windows.
Change-Id: I8cd39b51cf03cbd642474c02b9076814baecd597
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r-- | src/gui/image/qimage.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 61a3895a6b..9770aca9e5 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -51,6 +51,7 @@ #include "qvariant.h" #include "qimagepixmapcleanuphooks_p.h" #include "qplatformintegration_qpa.h" +#include <private/qguiapplication_p.h> #include <ctype.h> #include <stdlib.h> #include <limits.h> @@ -3303,10 +3304,10 @@ extern const uchar *qt_pow_rgb_gamma(); void qGamma_correct_back_to_linear_cs(QImage *image) { - const uchar *gamma = qt_pow_rgb_gamma(); - if (!gamma) + const QDrawHelperGammaTables *tables = QGuiApplicationPrivate::instance()->gammaTables(); + if (!tables) return; - + const uchar *gamma = tables->qt_pow_rgb_gamma; // gamma correct the pixels back to linear color space... int h = image->height(); int w = image->width(); |