diff --git a/chromium.conf b/chromium.conf index 686a277c..cadab280 100644 --- a/chromium.conf +++ b/chromium.conf @@ -1,3 +1,49 @@ # system wide chromium flags + +# GRAPHIC_DRIVER=[amd|intel|nvidia|default] +GRAPHIC_DRIVER=default + +# WEB_DARKMODE=[on|off] +WEB_DARKMODE=off + CHROMIUM_FLAGS="" -CHROMIUM_FLAGS+=" --use-gl=angle --use-angle=gl --enable-features=VaapiVideoEncoder,VaapiVideoDecodeLinuxGL" +CHROMIUM_FLAGS+=" --disable-features=AudioServiceSandbox" +CHROMIUM_FLAGS+=" --enable-native-gpu-memory-buffers" +CHROMIUM_FLAGS+=" --enable-gpu-memory-buffer-video-frames" +CHROMIUM_FLAGS+=" --enable-zero-copy" +CHROMIUM_FLAGS+=" --use-gl=angle" +CHROMIUM_FLAGS+=" --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround" +CHROMIUM_FLAGS+=" --enable-chrome-browser-cloud-management" + +case "$GRAPHIC_DRIVER" in + amd) + # Need new mesa with AMD multi planes support, is not yet supported in fedora + # see https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26165 + CHROMIUM_FLAGS+=" --use-angle=vulkan --enable-accelerated-video-decode" + CHROMIUM_FLAGS+=" --enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,UseMultiPlaneFormatForHardwareVideo" + ;; + nvidia) + # The NVIDIA VaAPI drivers are known to not support Chromium + # see https://crbug.com/1492880. This feature switch is + # provided for developers to test VaAPI drivers on NVIDIA GPUs + CHROMIUM_FLAGS+=" --use-angle=gl" + CHROMIUM_FLAGS+=" --enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoEncoder,VaapiOnNvidiaGPUs" + ;; + intel) + CHROMIUM_FLAGS+=" --use-angle=gl" + CHROMIUM_FLAGS+=" --enable-features=VaapiVideoEncoder,VaapiVideoDecodeLinuxGL" + ;; + *) + CHROMIUM_FLAGS="" + ;; +esac + +# Web Dark mode +if [ "$WEB_DARKMODE" == "on" ] ; then + darktype="WebContentsForceDark:inversion_method/cielab_based/image_behavior/none/foreground_lightness_threshold/150/background_lightness_threshold/205" + if [ -z "$CHROMIUM_FLAGS" ] ; then + CHROMIUM_FLAGS+=" --enable-features=$darktype" + else + CHROMIUM_FLAGS+=",$darktype" + fi +fi diff --git a/chromium.spec b/chromium.spec index ec897e74..25a9debd 100644 --- a/chromium.spec +++ b/chromium.spec @@ -36,7 +36,7 @@ # enable|disable headless client build %global build_headless 1 %ifarch ppc64le -%global build_headless 0 +%global cfi 0 %endif # enable|disable chrome-remote-desktop build @@ -179,6 +179,11 @@ %endif %endif +%ifarch ppc64le +# workaround for a bug in new llvm on f40/rawhide (ppc64le) +%global cfi 0 +%endif + # set correct toolchain %if %{clang} %global toolchain clang @@ -307,7 +312,7 @@ Name: chromium%{chromium_channel} Version: 125.0.6422.112 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use Url: http://www.chromium.org/Home License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND GPL-2.0-or-later AND ISC AND OpenSSL AND (MPL-1.1 OR GPL-2.0-only OR LGPL-2.0-only) @@ -674,9 +679,7 @@ BuildRequires: pkgconfig(Qt6Core) BuildRequires: pkgconfig(Qt6Widgets) %endif -%if %{cfi} BuildRequires: compiler-rt -%endif %if ! %{bundleharfbuzz} BuildRequires: harfbuzz-devel >= 2.4.0 @@ -1471,7 +1474,7 @@ sed -i 's|OFFICIAL_BUILD|GOOGLE_CHROME_BUILD|g' tools/generate_shim_headers/gene CHROMIUM_CORE_GN_DEFINES+=' chrome_pgo_phase=0' %if ! %{cfi} -CHROMIUM_CORE_GN_DEFINES+=' is_cfi=false' +CHROMIUM_CORE_GN_DEFINES+=' is_cfi=false use_thin_lto=false' %endif %if %{useapikey} @@ -2107,6 +2110,9 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt %endif %changelog +* Tue May 28 2024 Than Ngo - 125.0.6422.112-2 +- Workaround for build error on pp64le + * Sun May 26 2024 Than Ngo - 125.0.6422.112-1 - update to 125.0.6422.112 * High CVE-2024-5274: Type Confusion in V8