diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/browsers/chromium/patches')
6 files changed, 93 insertions, 152 deletions
diff --git a/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/chromium-vaapi.patch b/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/chromium-vaapi.patch deleted file mode 100644 index 38d77e215516..000000000000 --- a/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/chromium-vaapi.patch +++ /dev/null @@ -1,117 +0,0 @@ -From abc7295ca1653c85472916909f0eb76e28e79a58 Mon Sep 17 00:00:00 2001 -From: Akarshan Biswas <akarshan.biswas@gmail.com> -Date: Thu, 24 Jan 2019 12:45:29 +0530 -Subject: [PATCH] Enable mojo with VDA2 on Linux - ---- - chrome/browser/about_flags.cc | 8 ++++---- - chrome/browser/flag_descriptions.cc | 9 +++++++-- - chrome/browser/flag_descriptions.h | 10 ++++++++-- - gpu/config/software_rendering_list.json | 3 ++- - media/media_options.gni | 9 ++++++--- - media/mojo/services/gpu_mojo_media_client.cc | 4 ++-- - 6 files changed, 29 insertions(+), 14 deletions(-) - -diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc -index 0a84c6ac1..be2aa1d8b 100644 ---- a/chrome/browser/about_flags.cc -+++ b/chrome/browser/about_flags.cc -@@ -1714,7 +1714,7 @@ const FeatureEntry kFeatureEntries[] = { - "disable-accelerated-video-decode", - flag_descriptions::kAcceleratedVideoDecodeName, - flag_descriptions::kAcceleratedVideoDecodeDescription, -- kOsMac | kOsWin | kOsCrOS | kOsAndroid, -+ kOsMac | kOsWin | kOsCrOS | kOsAndroid | kOsLinux, - SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), - }, - #if defined(OS_WIN) -@@ -2345,12 +2345,12 @@ const FeatureEntry kFeatureEntries[] = { - FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)}, - #endif // ENABLE_ISOLATED_XR_SERVICE - #endif // ENABLE_VR --#if defined(OS_CHROMEOS) -+#if defined(OS_CHROMEOS) || defined(OS_LINUX) - {"disable-accelerated-mjpeg-decode", - flag_descriptions::kAcceleratedMjpegDecodeName, -- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS, -+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux, - SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)}, --#endif // OS_CHROMEOS -+#endif // OS_CHROMEOS // OS_LINUX - {"v8-cache-options", flag_descriptions::kV8CacheOptionsName, - flag_descriptions::kV8CacheOptionsDescription, kOsAll, - MULTI_VALUE_TYPE(kV8CacheOptionsChoices)}, -diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc -index 62637e092..86f89fc6e 100644 ---- a/chrome/browser/flag_descriptions.cc -+++ b/chrome/browser/flag_descriptions.cc -@@ -3085,15 +3085,20 @@ const char kTextSuggestionsTouchBarDescription[] = - - #endif - --// Chrome OS ------------------------------------------------------------------- -+// Chrome OS Linux------------------------------------------------------------------- - --#if defined(OS_CHROMEOS) -+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID)) - - const char kAcceleratedMjpegDecodeName[] = - "Hardware-accelerated mjpeg decode for captured frame"; - const char kAcceleratedMjpegDecodeDescription[] = - "Enable hardware-accelerated mjpeg decode for captured frame where " - "available."; -+#endif -+ -+// Chrome OS -------------------------------------------------- -+ -+#if defined(OS_CHROMEOS) - - const char kAllowTouchpadThreeFingerClickName[] = "Touchpad three-finger-click"; - const char kAllowTouchpadThreeFingerClickDescription[] = -diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h -index 5dac660bb..6cc4115da 100644 ---- a/chrome/browser/flag_descriptions.h -+++ b/chrome/browser/flag_descriptions.h -@@ -1846,13 +1846,19 @@ extern const char kPermissionPromptPersistenceToggleDescription[]; - - #endif // defined(OS_MACOSX) - --// Chrome OS ------------------------------------------------------------------ -+// Chrome OS and Linux ------------------------------------------------------------------ - --#if defined(OS_CHROMEOS) -+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID)) - - extern const char kAcceleratedMjpegDecodeName[]; - extern const char kAcceleratedMjpegDecodeDescription[]; - -+#endif // defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID)) -+ -+// Chrome OS ------------------------------------------------------------------------ -+ -+#if defined(OS_CHROMEOS) -+ - extern const char kAllowTouchpadThreeFingerClickName[]; - extern const char kAllowTouchpadThreeFingerClickDescription[]; - -diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json -index 65f37b3f1..ae8a1718f 100644 ---- a/gpu/config/software_rendering_list.json -+++ b/gpu/config/software_rendering_list.json -@@ -371,11 +371,12 @@ - }, - { - "id": 48, -- "description": "Accelerated video decode is unavailable on Linux", -+ "description": "Accelerated VA-API video decode is not supported on NVIDIA platforms", - "cr_bugs": [137247], - "os": { - "type": "linux" - }, -+ "vendor_id": "0x10de", - "features": [ - "accelerated_video_decode" - ] --- -2.20.1 - diff --git a/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/dont-use-ANGLE-by-default.patch b/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/dont-use-ANGLE-by-default.patch new file mode 100644 index 000000000000..9f14a304eb34 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/dont-use-ANGLE-by-default.patch @@ -0,0 +1,26 @@ +A field trial currently enables the passthrough command decoder, which causes +gl_factory.cc to try kGLImplementationEGLANGLE first, which causes Chromium to fail +to load libGLESv2.so on NixOS. It somehow does not try kGLImplementationDesktopGL, +and so there is no GL support at all. + +Revert to using the validating command decoder, which prevents gl_factory.cc +from touching allowed_impls, allowing it to successfully use kGLImplementationDesktopGL. + +diff --git a/ui/gl/gl_utils.cc b/ui/gl/gl_utils.cc +index 697cbed5fe2d..8419bdb21a2f 100644 +--- a/ui/gl/gl_utils.cc ++++ b/ui/gl/gl_utils.cc +@@ -71,9 +71,10 @@ bool UsePassthroughCommandDecoder(const base::CommandLine* command_line) { + } else if (switch_value == kCmdDecoderValidatingName) { + return false; + } else { +- // Unrecognized or missing switch, use the default. +- return base::FeatureList::IsEnabled( +- features::kDefaultPassthroughCommandDecoder); ++ // Ignore the field trial that enables it; disable it until ++ // gl_factory.cc kGLImplementationEGLANGLE issues are sorted ++ // out on NixOS. ++ return false; + } + } + } diff --git a/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/jumbo-sorted.patch b/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/jumbo-sorted.patch deleted file mode 100644 index cdf0f695f761..000000000000 --- a/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/jumbo-sorted.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- chromium-70.0.3538.67/build/config/merge_for_jumbo.py.old 2018-10-25 19:15:54.578222230 +0300 -+++ chromium-70.0.3538.67/build/config/merge_for_jumbo.py 2018-10-25 19:20:44.397613032 +0300 -@@ -132,6 +132,8 @@ - assert not inputs - continue - -+ inputs.sort() -+ outputs.sort() - write_jumbo_files(inputs, outputs, written_input_set, written_output_set) - - assert set(args.outputs) == written_output_set, "Did not fill all outputs" diff --git a/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/vaapi-fix.patch b/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/vaapi-fix.patch new file mode 100644 index 000000000000..db9d6082756d --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/vaapi-fix.patch @@ -0,0 +1,54 @@ +--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc ++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc +@@ -635,6 +635,7 @@ + // |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's + // internal decoded frame. + if (buffer_allocation_mode_ != BufferAllocationMode::kNone && ++ buffer_allocation_mode_ != BufferAllocationMode::kWrapVdpau && + !vpp_vaapi_wrapper_) { + vpp_vaapi_wrapper_ = VaapiWrapper::Create( + VaapiWrapper::kVideoProcess, VAProfileNone, +@@ -650,7 +651,8 @@ + // only used as a copy destination. Therefore, the VaapiWrapper used and + // owned by |picture| is |vpp_vaapi_wrapper_|. + std::unique_ptr<VaapiPicture> picture = vaapi_picture_factory_->Create( +- (buffer_allocation_mode_ == BufferAllocationMode::kNone) ++ ((buffer_allocation_mode_ == BufferAllocationMode::kNone) || ++ (buffer_allocation_mode_ == BufferAllocationMode::kWrapVdpau)) + ? vaapi_wrapper_ + : vpp_vaapi_wrapper_, + make_context_current_cb_, bind_image_cb_, buffers[i]); +@@ -1077,6 +1079,14 @@ + + VaapiVideoDecodeAccelerator::BufferAllocationMode + VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() { ++ // NVIDIA blobs use VDPAU ++ if (base::StartsWith(VaapiWrapper::GetVendorStringForTesting(), ++ "Splitted-Desktop Systems VDPAU", ++ base::CompareCase::SENSITIVE)) { ++ LOG(INFO) << "VA-API driver on VDPAU backend"; ++ return BufferAllocationMode::kWrapVdpau; ++ } ++ + // TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT + // |output_mode_| as well. + if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT) +@@ -1089,7 +1099,7 @@ + // depends on the bitstream and sometimes it's not enough to cover the amount + // of frames needed by the client pipeline (see b/133733739). + // TODO(crbug.com/911754): Enable for VP9 Profile 2. +- if (IsGeminiLakeOrLater() && ++ if (false && IsGeminiLakeOrLater() && + (profile_ == VP9PROFILE_PROFILE0 || profile_ == VP8PROFILE_ANY)) { + // Add one to the reference frames for the one being currently egressed, and + // an extra allocation for both |client_| and |decoder_|, see +--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.h ++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.h +@@ -204,6 +204,7 @@ + // Using |client_|s provided PictureBuffers and as many internally + // allocated. + kNormal, ++ kWrapVdpau, + }; + + // Decides the concrete buffer allocation mode, depending on the hardware diff --git a/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/widevine-79.patch b/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/widevine-79.patch new file mode 100644 index 000000000000..32f0ae2fb5e6 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/widevine-79.patch @@ -0,0 +1,13 @@ +diff --git a/third_party/widevine/cdm/BUILD.gn b/third_party/widevine/cdm/BUILD.gn +index ed0e2f5208b..5b431a030d5 100644 +--- a/third_party/widevine/cdm/BUILD.gn ++++ b/third_party/widevine/cdm/BUILD.gn +@@ -14,7 +14,7 @@ buildflag_header("buildflags") { + + flags = [ + "ENABLE_WIDEVINE=$enable_widevine", +- "BUNDLE_WIDEVINE_CDM=$bundle_widevine_cdm", ++ "BUNDLE_WIDEVINE_CDM=true", + "ENABLE_WIDEVINE_CDM_COMPONENT=$enable_widevine_cdm_component", + ] + } diff --git a/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/widevine.patch b/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/widevine.patch deleted file mode 100644 index 2de6024141d7..000000000000 --- a/nixpkgs/pkgs/applications/networking/browsers/chromium/patches/widevine.patch +++ /dev/null @@ -1,24 +0,0 @@ -Description: enable widevine and set its version string to "undefined" -Author: Michael Gilbert <mgilbert@debian.org> -Author: Olivier Tilloy <olivier.tilloy@canonical.com> - ---- a/third_party/widevine/cdm/widevine_cdm_version.h -+++ b/third_party/widevine/cdm/widevine_cdm_version.h -@@ -11,5 +11,6 @@ - // If the Widevine CDM is available define the following: - // - WIDEVINE_CDM_VERSION_STRING (with the version of the CDM that's available - // as a string, e.g., "1.0.123.456"). -+#define WIDEVINE_CDM_VERSION_STRING "undefined" - - #endif // WIDEVINE_CDM_VERSION_H_ ---- a/chrome/common/chrome_content_client.cc -+++ b/chrome/common/chrome_content_client.cc -@@ -99,7 +99,7 @@ - // Registers Widevine CDM if Widevine is enabled, the Widevine CDM is - // bundled and not a component. When the Widevine CDM is a component, it is - // registered in widevine_cdm_component_installer.cc. --#if BUILDFLAG(BUNDLE_WIDEVINE_CDM) && !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) -+#if !BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT) - #define REGISTER_BUNDLED_WIDEVINE_CDM - #include "third_party/widevine/cdm/widevine_cdm_common.h" // nogncheck - // TODO(crbug.com/663554): Needed for WIDEVINE_CDM_VERSION_STRING. Support |