From ddad7ac4e22727db401da63441427a11c9c1bced Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Fri, 16 Feb 2024 14:21:58 -0500 Subject: [PATCH] qt6.qtwebengine: drop outdated patches --- .../libraries/qt-6/modules/qtwebengine.nix | 3 - ...ine-darwin-no-copy-certificate-chain.patch | 16 ----- ...webengine-darwin-no-low-latency-flag.patch | 61 ------------------- 3 files changed, 80 deletions(-) delete mode 100644 pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch delete mode 100644 pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch diff --git a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix index f07aeefa0be0..e6f785cd833c 100644 --- a/pkgs/development/libraries/qt-6/modules/qtwebengine.nix +++ b/pkgs/development/libraries/qt-6/modules/qtwebengine.nix @@ -122,9 +122,6 @@ qtModule { hardeningDisable = [ "format" ]; patches = [ - # removes macOS 12+ dependencies - ../patches/qtwebengine-darwin-no-low-latency-flag.patch - ../patches/qtwebengine-darwin-no-copy-certificate-chain.patch # Don't assume /usr/share/X11, and also respect the XKB_CONFIG_ROOT # environment variable, since NixOS relies on it working. # See https://github.com/NixOS/nixpkgs/issues/226484 for more context. diff --git a/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch b/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch deleted file mode 100644 index c7e461945c04..000000000000 --- a/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-copy-certificate-chain.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/3rdparty/chromium/net/cert/x509_util_apple.cc b/src/3rdparty/chromium/net/cert/x509_util_apple.cc -index ae69948dfca..7062a9a9b97 100644 ---- a/src/3rdparty/chromium/net/cert/x509_util_apple.cc -+++ b/src/3rdparty/chromium/net/cert/x509_util_apple.cc -@@ -139,11 +139,6 @@ SHA256HashValue CalculateFingerprint256(SecCertificateRef cert) { - - base::ScopedCFTypeRef CertificateChainFromSecTrust( - SecTrustRef trust) { -- if (__builtin_available(macOS 12.0, iOS 15.0, *)) { -- return base::ScopedCFTypeRef( -- SecTrustCopyCertificateChain(trust)); -- } -- - base::ScopedCFTypeRef chain( - CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks)); - const CFIndex chain_length = SecTrustGetCertificateCount(trust); diff --git a/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch b/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch deleted file mode 100644 index 3df917edf5cc..000000000000 --- a/pkgs/development/libraries/qt-6/patches/qtwebengine-darwin-no-low-latency-flag.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff --git a/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc b/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc -index d4b0161b2e..e5a0eb1967 100644 ---- a/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc -+++ b/src/3rdparty/chromium/media/gpu/mac/vt_video_encode_accelerator_mac.cc -@@ -29,12 +29,6 @@ - #include "media/base/video_types.h" - #include "media/video/video_encode_accelerator.h" - --// This is a min version of macOS where we want to support SVC encoding via --// EnableLowLatencyRateControl flag. The flag is actually supported since 11.3, --// but there we see frame drops even with ample bitrate budget. Excessive frame --// drops were fixed in 12.0.1. --#define LOW_LATENCY_FLAG_AVAILABLE_VER 12.0.1 -- - namespace media { - - namespace { -@@ -277,8 +271,6 @@ VTVideoEncodeAccelerator::GetSupportedH264Profiles() { - profile.rate_control_modes = VideoEncodeAccelerator::kConstantMode | - VideoEncodeAccelerator::kVariableMode; - profile.scalability_modes.push_back(SVCScalabilityMode::kL1T1); -- if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) -- profile.scalability_modes.push_back(SVCScalabilityMode::kL1T2); - - for (const auto& supported_profile : kSupportedProfiles) { - if (VideoCodecProfileToVideoCodec(supported_profile) == VideoCodec::kH264) { -@@ -814,14 +806,6 @@ bool VTVideoEncodeAccelerator::CreateCompressionSession( - encoder_values.push_back(kCFBooleanFalse); - } - -- if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) { -- // Remove the validation once HEVC SVC mode is supported on macOS. -- if (require_low_delay_ && codec == VideoCodec::kH264) { -- encoder_keys.push_back( -- kVTVideoEncoderSpecification_EnableLowLatencyRateControl); -- encoder_values.push_back(kCFBooleanTrue); -- } -- } - base::ScopedCFTypeRef encoder_spec = - video_toolbox::DictionaryWithKeysAndValues( - encoder_keys.data(), encoder_values.data(), encoder_keys.size()); -@@ -891,19 +875,8 @@ bool VTVideoEncodeAccelerator::ConfigureCompressionSession(VideoCodec codec) { - - // Remove the validation once HEVC SVC mode is supported on macOS. - if (num_temporal_layers_ == 2 && codec_ == VideoCodec::kH264) { -- if (__builtin_available(macOS LOW_LATENCY_FLAG_AVAILABLE_VER, *)) { -- if (!session_property_setter.IsSupported( -- kVTCompressionPropertyKey_BaseLayerFrameRateFraction)) { -- DLOG(ERROR) << "BaseLayerFrameRateFraction is not supported"; -- return false; -- } -- rv &= session_property_setter.Set( -- kVTCompressionPropertyKey_BaseLayerFrameRateFraction, 0.5); -- DLOG_IF(ERROR, !rv) << " Setting BaseLayerFrameRate property failed."; -- } else { - DLOG(ERROR) << "SVC encoding is not supported on this OS version."; - rv = false; -- } - } - - return rv;