summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi/qrhimetal.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-08-02 19:53:16 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2022-08-05 16:07:26 +0200
commit1e97a44e765a61305f3d8ffbca5d33c05008744c (patch)
tree21072c6846e4c4737f4b57995ca7cf508ec25f57 /src/gui/rhi/qrhimetal.mm
parenteb774dfc7b3e4cbaeab41f345612ae079361141b (diff)
Remove unneeded @available check for macOS <= 10.14 and iOS <= 13
All versions down to Qt 6.2 require macOS 10.14 or iOS 13. Pick-to: 6.2 6.3 6.4 Change-Id: I5048921ea5a149346a0fa84228227d9156004675 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhimetal.mm')
-rw-r--r--src/gui/rhi/qrhimetal.mm20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm
index 7b5e237d61..186fca63d7 100644
--- a/src/gui/rhi/qrhimetal.mm
+++ b/src/gui/rhi/qrhimetal.mm
@@ -4046,8 +4046,7 @@ QSize QMetalSwapChain::surfacePixelSize()
bool QMetalSwapChain::isFormatSupported(Format f)
{
#ifdef Q_OS_MACOS
- if (@available(macOS 10.12, /*iOS 10.0,*/ *))
- return f == SDR || f == HDRExtendedSrgbLinear;
+ return f == SDR || f == HDRExtendedSrgbLinear;
#endif
return f == SDR;
}
@@ -4081,11 +4080,9 @@ void QMetalSwapChain::chooseFormats()
samples = rhiD->effectiveSampleCount(m_sampleCount);
// pick a format that is allowed for CAMetalLayer.pixelFormat
if (m_format == HDRExtendedSrgbLinear) {
- if (@available(macOS 10.12, /*iOS 10.0,*/ *)) {
- d->colorFormat = MTLPixelFormatRGBA16Float;
- d->rhiColorFormat = QRhiTexture::RGBA16F;
- return;
- }
+ d->colorFormat = MTLPixelFormatRGBA16Float;
+ d->rhiColorFormat = QRhiTexture::RGBA16F;
+ return;
}
d->colorFormat = m_flags.testFlag(sRGB) ? MTLPixelFormatBGRA8Unorm_sRGB : MTLPixelFormatBGRA8Unorm;
d->rhiColorFormat = QRhiTexture::BGRA8;
@@ -4119,11 +4116,10 @@ bool QMetalSwapChain::createOrResize()
if (d->colorFormat != d->layer.pixelFormat)
d->layer.pixelFormat = d->colorFormat;
#ifdef Q_OS_MACOS
- if (@available(macOS 10.12, /*iOS 10.0,*/ *)) { // Can't enable this on iOS until wantsExtendedDynamicRangeContent is available
- if (m_format == HDRExtendedSrgbLinear) {
- d->layer.colorspace = CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearSRGB);
- d->layer.wantsExtendedDynamicRangeContent = YES;
- }
+ // Can't enable this on iOS until wantsExtendedDynamicRangeContent is available
+ if (m_format == HDRExtendedSrgbLinear) {
+ d->layer.colorspace = CGColorSpaceCreateWithName(kCGColorSpaceExtendedLinearSRGB);
+ d->layer.wantsExtendedDynamicRangeContent = YES;
}
#endif