From ffd316ebe3963b7ff8d94a3484ac85de793b8299 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 21 Nov 2016 15:10:39 +0100 Subject: 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) --- src/gui/kernel/qguiapplication_p.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui/kernel/qguiapplication_p.h') 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 m_gammaTables; + QAtomicPointer m_a8ColorProfile; + QAtomicPointer m_a32ColorProfile; bool ownGlobalShareContext; -- cgit v1.2.3