diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-11-21 15:10:39 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-11-24 09:40:14 +0000 |
commit | ffd316ebe3963b7ff8d94a3484ac85de793b8299 (patch) | |
tree | 6b933591f176af9451c746ee2c340ae7bd8c72fb /src/gui/kernel/qguiapplication_p.h | |
parent | 38a446b69e95423d8d42d33b30b3154caa475e09 (diff) |
Replace QDrawHelperGammaTables with QColorProfile
Turns the two set of tables in QDrawHelperGammaTables into two
QColorProfile classes that use similar structures and can be reused for
other gamma correction.
At the same time clean-up and improve the comma-correct blending code
to use the new profiles and QRgba64 precision.
Change-Id: I302bd87a5c836e1010fff6d633eeb56fd4ae2ff0
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/gui/kernel/qguiapplication_p.h')
-rw-r--r-- | src/gui/kernel/qguiapplication_p.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index e1a35e048c..996ea748b0 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -66,10 +66,10 @@ QT_BEGIN_NAMESPACE +class QColorProfile; class QPlatformIntegration; class QPlatformTheme; class QPlatformDragQtResponse; -struct QDrawHelperGammaTables; #ifndef QT_NO_DRAGANDDROP class QDrag; #endif // QT_NO_DRAGANDDROP @@ -292,7 +292,8 @@ public: static QInputDeviceManager *inputDeviceManager(); - const QDrawHelperGammaTables *gammaTables(); + const QColorProfile *colorProfileForA8Text(); + const QColorProfile *colorProfileForA32Text(); // hook reimplemented in QApplication to apply the QStyle function on the QIcon virtual QPixmap applyQIconStyleHelper(QIcon::Mode, const QPixmap &basePixmap) const { return basePixmap; } @@ -316,7 +317,8 @@ private: static QGuiApplicationPrivate *self; static QTouchDevice *m_fakeTouchDevice; static int m_fakeMouseSourcePointId; - QAtomicPointer<QDrawHelperGammaTables> m_gammaTables; + QAtomicPointer<QColorProfile> m_a8ColorProfile; + QAtomicPointer<QColorProfile> m_a32ColorProfile; bool ownGlobalShareContext; |