diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-14 17:30:59 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-09-15 01:41:13 +0200 |
commit | 9815ebf24b5aa148a416ee3b159088f0092d2715 (patch) | |
tree | b86cf5ddb2ddebe72d6f4ae5040e77342fa459e7 /src/plugins/platforms/windows | |
parent | fce84f76f04957e51f1d92129236733d9bf7d08a (diff) |
Switch QSurfaceFormat::colorSpace to a QColorSpace
Allows more flexibility in the future.
Change-Id: Idcf2d8ddaee268a7b5d55379ccb42dd9b3c33abf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsglcontext.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index aa93b85289..8c41cc135d 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -44,6 +44,7 @@ #include <QtCore/qdebug.h> #include <QtCore/qsysinfo.h> +#include <QtGui/qcolorspace.h> #include <QtGui/qguiapplication.h> #include <qpa/qplatformnativeinterface.h> @@ -588,7 +589,7 @@ static int choosePixelFormat(HDC hdc, iAttributes[i++] = FALSE; } // must be the last - bool srgbRequested = format.colorSpace() == QSurfaceFormat::sRGBColorSpace; + bool srgbRequested = format.colorSpace() == QColorSpace::SRgb; int srgbValuePosition = 0; if (srgbRequested) { srgbValuePosition = i; @@ -710,10 +711,10 @@ static QSurfaceFormat if (hasSampleBuffers) { result.setSamples(iValues[13]); if (hasSrgbSupport && iValues[14]) - result.setColorSpace(QSurfaceFormat::sRGBColorSpace); + result.setColorSpace(QColorSpace::SRgb); } else { if (hasSrgbSupport && iValues[12]) - result.setColorSpace(QSurfaceFormat::sRGBColorSpace); + result.setColorSpace(QColorSpace::SRgb); } if (additionalIn) { if (iValues[7]) |