From 9815ebf24b5aa148a416ee3b159088f0092d2715 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 14 Sep 2020 17:30:59 +0200 Subject: Switch QSurfaceFormat::colorSpace to a QColorSpace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows more flexibility in the future. Change-Id: Idcf2d8ddaee268a7b5d55379ccb42dd9b3c33abf Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/windows/qwindowsglcontext.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/windows') 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 #include +#include #include #include @@ -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]) -- cgit v1.2.3