Compare commits

..

17 commits

Author SHA1 Message Date
Troy Dawson
c88d558ed0 rhel9 needs gcc-toolset-13 2024-03-20 14:06:01 -07:00
Troy Dawson
1fd9f02297 Merge branch f39 into epel9-next 2024-03-20 13:51:57 -07:00
Troy Dawson
4e797dfa1c Merge branch f38 into epel9 2023-09-19 07:03:50 -07:00
Jan Grulich
d6c2c9be30 Merge branch 'f39' into f38 2023-09-19 09:03:33 +02:00
Jan Grulich
39cf5491b2 Merge branch 'rawhide' into f38 2023-07-25 11:25:13 +02:00
Jan Grulich
47fcb436c6 Merge branch 'rawhide' into f38 2023-07-12 23:02:23 +02:00
Troy Dawson
c08934a31c Use gcc-toolset-12 2023-05-27 12:12:21 -07:00
Jan Grulich
4ad31b1390 Merge branch 'rawhide' into f38 2023-05-26 08:53:06 +02:00
Troy Dawson
34d307e798 does not like RHEL icu 2023-05-10 07:04:33 -07:00
Jan Grulich
f23b1bec9a Merge branch 'rawhide' into f38 2023-04-25 14:57:29 +02:00
Jan Grulich
75bc5c6299 Merge branch 'f38' into f37 2023-04-03 12:20:26 +02:00
Jan Grulich
0a649da59a Fix changelog 2023-03-27 14:55:25 +02:00
Jan Grulich
94878c13b7 Fix bad merge 2023-03-27 14:21:19 +02:00
Jan Grulich
eba5422a14 Merge branch 'rawhide' into f38 2023-03-27 14:15:18 +02:00
Neal Gompa
1ecc43b03e Rebuild for ffmpeg 6.0 2023-03-12 13:35:33 -04:00
Marek Kasik
5cad61b2fb Rebuild for freetype-2.13.0 2023-02-26 22:01:59 +01:00
Jan Grulich
59b334d37d Rebuild for Qt 6.4.2 update 2023-01-26 10:26:28 +01:00
22 changed files with 910 additions and 29504 deletions

13
.gitignore vendored
View file

@ -8,16 +8,3 @@
/qtwebengine-everywhere-src-6.5.3-clean.tar.xz
/qtwebengine-everywhere-src-6.6.1-clean.tar.xz
/qtwebengine-everywhere-src-6.6.2-clean.tar.xz
/qtwebengine-everywhere-src-6.7.0-clean.tar.xz
/qtwebengine-everywhere-src-6.7.1-clean.tar.xz
/qtwebengine-everywhere-src-6.7.2-clean.tar.xz
/qtwebengine-everywhere-src-6.8.0-clean.tar.xz
/qtwebengine-everywhere-src-6.8.1-clean.tar.xz
/qtwebengine-everywhere-src-6.8.2-clean.tar.xz
/qtwebengine-everywhere-src-6.9.0-rc-clean.tar.xz
/qtwebengine-everywhere-src-6.9.0-clean.tar.xz
/qtwebengine-everywhere-src-6.9.1-clean.tar.xz
/qtwebengine-everywhere-src-6.9.2-clean.tar.xz
/qtwebengine-everywhere-src-6.10.0-rc-clean.tar.xz
/qtwebengine-everywhere-src-6.10.0-clean.tar.xz
/qtwebengine-everywhere-src-6.10.1-clean.tar.xz

View file

@ -21,7 +21,7 @@
if [ -z "$1" ] ; then
echo "usage: ./clean_qtwebengine.sh VERSION"
echo "e.g.: ./clean_qtwebengine.sh 6.10.0"
echo "e.g.: ./clean_qtwebengine.sh 6.5.0"
exit 1
fi

View file

@ -1,52 +0,0 @@
#! /bin/bash
#
# Prepare ppc64le patchset for qtwebengine from Chromium patches using
# - https://quickbuild.io/~raptor-engineering-public/+archive/ubuntu/chromium/ or
# - https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches
#
# Usage
# - check the base Chromium release in CHROMIUM_VERSION
# - get the patches from the URLs above
# - run "prepare-ppc64.sh <path_to_chromium_patches>"
#
patch_cleanup ()
{
file=$1
patch=$2
[ -f $file ] || { echo "File $file doesn't exist"; exit 1; }
remove=$(echo $patch | sed -e 's@\/@\\\/@g')
echo "Removing changes for $patch from $file ..."
sed -i -e "/Index: chromium-[0-9\.]*\/${remove}/,/^Index:/ {
/Index: chromium-[0-9\.]*\/${remove}/d;
/^[-@=+ ]/d;
/^$/d;
}" $file
}
dir=$1
[ -d $dir/ppc64le ] || { echo "Path $dir/ppc64le doesn't exist"; exit 1; }
# remove patches for files not included in the bundled chromium
patch_cleanup $dir/ppc64le/third_party/0001-Add-PPC64-support-for-boringssl.patch third_party/boringssl/src/crypto/test/abi_test.h
patch_cleanup $dir/ppc64le/crashpad/0001-Implement-support-for-PPC64-on-Linux.patch third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.cc
patch_cleanup $dir/ppc64le/crashpad/0001-Implement-support-for-PPC64-on-Linux.patch third_party/crashpad/crashpad/minidump/test/minidump_context_test_util.h
patch_cleanup $dir/ppc64le/crashpad/0001-Implement-support-for-PPC64-on-Linux.patch third_party/crashpad/crashpad/snapshot/test/test_cpu_context.cc
patch_cleanup $dir/ppc64le/crashpad/0001-Implement-support-for-PPC64-on-Linux.patch third_party/crashpad/crashpad/snapshot/test/test_cpu_context.h
patch_cleanup $dir/ppc64le/crashpad/0001-Implement-support-for-PPC64-on-Linux.patch third_party/crashpad/crashpad/test/linux/get_tls.cc
patch_cleanup $dir/ppc64le/crashpad/0001-Implement-support-for-PPC64-on-Linux.patch third_party/crashpad/crashpad/test/multiprocess_posix.cc
# concatenate the patches from the series file to a single patchset
echo "Creating patchset ..."
cat series.ppc64 | while read line; do
case $line in
\#*) ;;
*) [ -z "$line" ] && continue; cat $dir/$line ;;
esac
done > qtwebengine-chromium-ppc64.patch

View file

@ -5,46 +5,12 @@
# package-notes causes FTBFS (#2043178)
%undefine _package_note_file
# defines for Optional system libraries:
%global use_system_re2 1
%global use_system_libicu 1
%global use_system_libwebp 1
%global use_system_opus 1
%global use_system_ffmpeg 1
# libvpx is exclusive with VA-API support (libva) which is enabled by default
%global use_system_libvpx 0
%global use_system_snappy 1
%global use_system_glib 1
%global use_system_zlib 1
%global use_system_minizip 1
%global use_system_libevent 1
%global use_system_libxml 1
%global use_system_lcms2 1
%global use_system_libpng 1
%global use_system_libtiff 1
%global use_system_libjpeg 1
%global use_system_libopenjpeg2 1
%global use_system_harfbuzz 1
%global use_system_freetype 1
%global use_system_libpci 1
%global use_system_libudev 1
%global use_system_jsoncpp 1
%if 0%{?rhel} && 0%{?rhel} == 9
%global use_system_re2 0
%global use_system_libicu 0
%global use_system_minizip 0
%global use_system_harfbuzz 0
%endif
%if 0%{?rhel} && 0%{?rhel} == 10
%global use_system_zlib 0
%endif
# ppc64le builds currently fail with V8/XFA enabled (qt 6.9.0)
%ifarch ppc64le
%global enable_pdf_v8 0
%else
%global enable_pdf_v8 1
%global use_system_libicu 1
%endif
%if 0%{?fedora} && 0%{?fedora} >= 39
@ -52,6 +18,8 @@
%global use_system_py_six 1
%endif
%global use_system_re2 1
# NEON support on ARM (detected at runtime) - disable this if you are hitting
# FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495
#global arm_neon 1
@ -68,6 +36,8 @@
# webcore_debug v8base_debug
%endif
#global prerelease rc
# spellchecking dictionary directory
%global _qtwebengine_dictionaries_dir %{_qt6_datadir}/qtwebengine_dictionaries
@ -76,36 +46,20 @@
# and designer plugins
%global __provides_exclude_from ^%{_qt6_plugindir}/.*\\.so$
# FIXME: we cannot use any ~rc or similar suffix as the build
# would fail for having too long filename
#global unstable 1
%if 0%{?unstable}
%global prerelease rc
%endif
%global examples 1
Summary: Qt6 - QtWebEngine components
Name: qt6-qtwebengine
Version: 6.10.1
Release: 5%{?dist}
Version: 6.6.2
Release: 1%{?dist}
# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
# See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html
# The other licenses are from Chromium and the code it bundles
License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
URL: http://www.qt.io
%global majmin %(echo %{version} | cut -d. -f1-2)
%global qt_version %(echo %{version} | cut -d~ -f1)
# cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg
# ./qtwebengine-release.sh
# ./clean_qtwebengine.sh 6.9.0
%if 0%{?unstable}
Source0: %{qt_module}-everywhere-src-%{qt_version}-%{prerelease}-clean.tar.xz
%else
Source0: %{qt_module}-everywhere-src-%{version}-clean.tar.xz
%endif
# ./clean_qtwebengine.sh 6.4.1
Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz
# cleanup scripts used above
Source2: clean_qtwebengine.sh
@ -118,72 +72,33 @@ Source10: macros.qt6-qtwebengine
Source20: pulseaudio-12.2-headers.tar.gz
# workaround FTBFS against kernel-headers-5.2.0+
Patch1: qtwebengine-SIOCGSTAMP.patch
Patch2: qtwebengine-link-pipewire.patch
Patch1: qtwebengine-SIOCGSTAMP.patch
Patch2: qtwebengine-link-pipewire.patch
# Fix/workaround FTBFS on aarch64 with newer glibc
Patch3: qtwebengine-aarch64-new-stat.patch
Patch3: qtwebengine-aarch64-new-stat.patch
Patch4: qtwebengine-ffmpeg-first_dts.patch
# Enable OpenH264
Patch4: qtwebengine-use-openh264.patch
# FTBFS - /usr/include/bits/siginfo-consts.h:219:3: error: expected identifier
# 219 | SYS_SECCOMP = 1, /* Seccomp triggered. */
Patch5: qtwebengine-chromium-141-glibc-2.42-SYS_SECCOMP.patch
# FTBS warning: elaborated-type-specifier for a scoped enum must not
# use the 'class' keyword
Patch50: qtwebengine-fix-build.patch
## Upstream patches:
# https://bugreports.qt.io/browse/QTBUG-129985
Patch80: qtwebengine-fix-arm-build.patch
# Remove with Qt 6.10.2
# https://codereview.qt-project.org/c/qt/qtwebengine/+/702597
Patch81: qtwebengine-move-gpu-info-logging-to-gpu-thread.patch
# https://qt-project.atlassian.net/browse/QTBUG-142823
Patch82: qtwebengine-fix-quick-popup-window-positioning-under-x11.patch
# https://webrtc-review.googlesource.com/c/src/+/285464
Patch100: qtwebengine-webrtc-dlopen-h264.patch
## Upstreamable patches:
Patch100: qtwebengine-add-missing-pipewire-headers.patch
Patch101: qtwebengine-fix-build-against-gcc16.patch
## ppc64le port
Patch200: qtwebengine-6.9-ppc64.patch
Patch201: qtwebengine-chromium-ppc64.patch
# https://github.com/google/highway/commit/dcc0ca1cd4245ecff9e5ba50818e47d5e2ccf699
Patch202: qtwebengine-chromium-ppc64-highway.patch
Patch110: qtwebengine-blink-dlopen-h264.patch
# handled by qt6-srpm-macros, which defines %%qt6_qtwebengine_arches
# FIXME use/update qt6_qtwebengine_arches
# 32-bit arches not supported (https://bugreports.qt.io/browse/QTBUG-102143)
ExclusiveArch: aarch64 x86_64 ppc64le
ExclusiveArch: aarch64 x86_64
BuildRequires: cmake
BuildRequires: ninja-build >= 1.7.2
BuildRequires: make
%if 0%{?rhel} && 0%{?rhel} < 10
BuildRequires: gcc-toolset-13
BuildRequires: gcc-toolset-13-libatomic-devel
%else
BuildRequires: gcc-c++
%endif
# gn links statically (for now)
BuildRequires: libstdc++-static
BuildRequires: libatomic
BuildRequires: %{__python3}
BuildRequires: python3-html5lib
BuildRequires: gperf
BuildRequires: bison
BuildRequires: flex
BuildRequires: perl-interpreter
BuildRequires: nodejs >= 14.9
BuildRequires: krb5-devel
BuildRequires: git-core
BuildRequires: qt6-srpm-macros
BuildRequires: qt6-qtbase-devel
BuildRequires: qt6-qtbase-private-devel
%{?_qt6_version:Requires: qt6-qtbase%{?_isa} = %{_qt6_version}}
# TODO: check of = is really needed or if >= would be good enough -- rex
%{?_qt6:Requires: %{_qt6}%{?_isa} = %{_qt6_version}}
BuildRequires: qt6-qtdeclarative-devel
@ -193,127 +108,87 @@ BuildRequires: qt6-qtsvg-devel
BuildRequires: qt6-qttools-static
BuildRequires: qt6-qtquickcontrols2-devel
BuildRequires: qt6-qtwebchannel-devel
BuildRequires: qt6-qtwebsockets-devel
BuildRequires: qt6-qthttpserver-devel
# optional system libraries in the order of the -- Configure summary: listing
%if 0%{?use_system_re2}
BuildRequires: pkgconfig(re2) >= 11.0.0
%else
Provides: bundled(re2)
# for examples?
BuildRequires: ninja-build
BuildRequires: cmake
BuildRequires: bison
BuildRequires: flex
BuildRequires: gcc-c++
%if 0%{?rhel} && 0%{?rhel} < 10
BuildRequires: gcc-toolset-13
%endif
# gn links statically (for now)
BuildRequires: libstdc++-static
BuildRequires: git-core
BuildRequires: gperf
BuildRequires: krb5-devel
%if 0%{?use_system_libicu}
BuildRequires: libicu-devel >= 70
BuildRequires: libicu-devel >= 68
%endif
%if 0%{?use_system_libwebp}
BuildRequires: pkgconfig(libwebp) >= 0.6.0
BuildRequires: libjpeg-devel
BuildRequires: nodejs
%if 0%{?use_system_re2}
BuildRequires: re2-devel
%endif
%if 0%{?use_system_opus}
BuildRequires: pkgconfig(opus) >= 1.3.1
%endif
%if %{?use_system_ffmpeg}
BuildRequires: pkgconfig(libavutil) >= 58.29.100
BuildRequires: pkgconfig(libavcodec) >= 60.31.102
BuildRequires: pkgconfig(libavformat) >= 60.16.100
BuildRequires: pkgconfig(openh264)
%endif
%if %{?use_system_libvpx}
BuildRequires: pkgconfig(vpx) >= 1.10.0
%endif
%if 0%{?use_system_snappy}
BuildRequires: pkgconfig(snappy)
%endif
%if 0%{?use_system_glib}
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gio-2.0)
%endif
%if %{?use_system_zlib}
BuildRequires: pkgconfig(zlib)
%endif
%if 0%{?use_system_minizip}
BuildRequires: pkgconfig(minizip)
%else
BuildRequires: snappy-devel
BuildConflicts: minizip-devel
Provides: bundled(minizip) = 2.8.1
%endif
%if 0%{?use_system_libevent}
BuildRequires: pkgconfig(libevent)
%endif
%if %{?use_system_libxml}
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libxslt)
%else
# bundled as "libxml"
# see src/3rdparty/chromium/third_party/libxml/linux/include/libxml/xmlversion.h
Provides: bundled(libxml2) = 2.9.13
# see src/3rdparty/chromium/third_party/libxslt/linux/config.h for version
Provides: bundled(libxslt) = 1.1.3
%endif
%if 0%{?use_system_lcms2}
BuildRequires: pkgconfig(lcms2)
%endif
%if 0%{?use_system_libpng}
BuildRequires: pkgconfig(libpng) >= 1.6.0
%endif
%if 0%{?use_system_libtiff}
BuildRequires: pkgconfig(libtiff-4) >= 4.2.0
%endif
%if 0%{?use_system_libjpeg}
BuildRequires: pkgconfig(libjpeg)
%endif
%if 0%{?use_system_libopenjpeg2}
BuildRequires: pkgconfig(libopenjp2)
%endif
%if 0%{?use_system_harfbuzz}
BuildRequires: pkgconfig(harfbuzz) >= 4.3.0
%endif
%if 0%{?use_system_freetype}
BuildRequires: pkgconfig(freetype2) >= 2.4.2
BuildRequires: pkgconfig(fontconfig)
%endif
%if 0%{?use_system_libpci}
BuildRequires: pkgconfig(libpci)
%endif
%if 0%{?use_system_libudev}
BuildRequires: pkgconfig(libudev)
%endif
# qpa-xcb support libraries
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(xcomposite)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xproto)
BuildRequires: pkgconfig(xshmfence)
BuildRequires: pkgconfig(xtst)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(xkbfile)
BuildRequires: pkgconfig(xcb)
# required for webrtc
BuildRequires: pkgconfig(xdamage)
# required for alsa
BuildRequires: pkgconfig(alsa)
# required for pulseaudio
BuildRequires: pkgconfig(libpulse)
# required for vaapi
BuildRequires: pkgconfig(libva)
# required for pipewire
BuildRequires: pkgconfig(libpipewire-0.3)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(epoxy)
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gbm)
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(harfbuzz)
%if 0%{?use_system_jsoncpp}
BuildRequires: pkgconfig(jsoncpp)
%endif
BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libcap)
BuildRequires: pkgconfig(nss) >= 3.26
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(libevent)
BuildRequires: pkgconfig(libpci)
BuildRequires: pkgconfig(libpipewire-0.3)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libpulse)
BuildRequires: pkgconfig(libudev)
%if 0%{?use_system_libwebp}
BuildRequires: pkgconfig(libwebp) >= 0.6.0
%endif
BuildRequires: pkgconfig(nss)
BuildRequires: pkgconfig(opus)
BuildRequires: pkgconfig(poppler-cpp)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xcomposite)
BuildRequires: pkgconfig(xcursor)
BuildRequires: pkgconfig(xdamage)
BuildRequires: pkgconfig(xext)
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(xkbfile)
BuildRequires: pkgconfig(xrandr)
BuildRequires: pkgconfig(xrender)
BuildRequires: pkgconfig(xscrnsaver)
BuildRequires: pkgconfig(xshmfence)
BuildRequires: pkgconfig(xtst)
BuildRequires: pkgconfig(zlib)
## https://bugreports.qt.io/browse/QTBUG-59094
## requires libxml2 built with icu support
#BuildRequires: pkgconfig(libxslt) pkgconfig(libxml-2.0)
BuildRequires: perl-interpreter
BuildRequires: %{__python3}
BuildRequires: python3-html5lib
BuildRequires: pkgconfig(vpx) >= 1.8.0
BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
%if 0%{?fedora} && 0%{?fedora} >= 39
BuildRequires: python3-zombie-imp
@ -339,7 +214,7 @@ Requires: qt6-qtpdf%{?_isa} = %{version}-%{release}
# Of course, Chromium itself is bundled. It cannot be unbundled because it is
# not a library, but forked (modified) application code.
Provides: bundled(chromium) = 118.0.5993.220
Provides: bundled(chromium) = 102.0.5005.177
# Bundled in src/3rdparty/chromium/third_party:
# Check src/3rdparty/chromium/third_party/*/README.chromium for version numbers,
@ -377,9 +252,15 @@ Provides: bundled(leveldb) = 1.23
Provides: bundled(libjingle)
# see src/3rdparty/chromium/third_party/libsrtp/CHANGES for the version number
Provides: bundled(libsrtp) = 2.4.0
# bundled as "libxml"
# see src/3rdparty/chromium/third_party/libxml/linux/include/libxml/xmlversion.h
Provides: bundled(libxml2) = 2.9.13
# see src/3rdparty/chromium/third_party/libxslt/linux/config.h for version
Provides: bundled(libxslt) = 1.1.3
Provides: bundled(libyuv) = 1819
Provides: bundled(modp_b64)
Provides: bundled(ots)
Provides: bundled(re2)
# see src/3rdparty/chromium/third_party/protobuf/CHANGES.txt for the version
Provides: bundled(protobuf) = 3.13.0.1
Provides: bundled(qcms) = 4
@ -423,12 +304,14 @@ Provides: bundled(nsURLParsers)
# Bundled outside of third_party, apparently not considered as such by Chromium:
Provides: bundled(mojo)
# see src/3rdparty/chromium/v8/include/v8_version.h for the version number
Provides: bundled(v8) = 11.8.172.18
Provides: bundled(v8) = 10.2.154.16
# bundled by v8 (src/3rdparty/chromium/v8/src/base/ieee754.cc)
# The version number is 5.3, the last version that upstream released, years ago:
# http://www.netlib.org/fdlibm/readme
Provides: bundled(fdlibm) = 5.3
%{?_qt6_version:Requires: qt6-qtbase%{?_isa} = %{_qt6_version}}
%description
%{summary}.
@ -449,12 +332,11 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%description devtools
Support for remote debugging.
%if 0%{?examples}
%package examples
Summary: Example files for %{name}
%description examples
%{summary}.
%endif
%package -n qt6-qtpdf
Summary: Qt6 - QtPdf components
@ -471,44 +353,30 @@ Requires: qt6-qtdeclarative-devel%{?_isa}
%package -n qt6-qtpdf-examples
Summary: Example files for qt6-qtpdf
Requires: qt6-qtsvg%{?_isa}
%description -n qt6-qtpdf-examples
%{summary}.
%prep
%setup -q -n %{qt_module}-everywhere-src-%{qt_version}%{?prerelease:-%{prerelease}} -a20
%setup -q -n %{qt_module}-everywhere-src-%{version}%{?prerelease:-%{prerelease}} -a20
mv pulse src/3rdparty/chromium/
pushd src/3rdparty/chromium
popd
%patch -P1 -p1 -b .SIOCGSTAMP
%patch -P2 -p1 -b .link-pipewire
%patch -P3 -p1 -b .aarch64-new-stat
%patch -P4 -p1 -b .use-openh264
%if 0%{?fedora} > 43 || 0%{?rhel} > 10
%patch -P5 -p1 -b .chromium-141-glibc-2.42-SYS_SECCOMP
%endif
%patch1 -p1 -b .SIOCGSTAMP
%patch2 -p1 -b .link-pipewire
%patch3 -p1 -b .aarch64-new-stat
%patch4 -p1 -b .qtwebengine-ffmpeg-first_dts
%patch50 -p1 -b .fix-build.patch
## upstream patches
%patch -P80 -p1 -b .fix-arm-build
%patch -P81 -p1 -b .move-gpu-info-logging-to-gpu-thread
%patch -P82 -p1 -b .fix-quick-popup-window-positioning-under-x11
%patch100 -p1 -b .webrtc-dlopen-h264
## upstreamable patches
%patch -P100 -p1 -b .add-missing-pipewire-headers
%patch -P101 -p1 -b .fix-build-against-gcc16
# ppc64le support
%patch -P200 -p1
pushd src/3rdparty/chromium
%patch -P201 -p1
pushd third_party/highway/src
%patch -P202 -p1
popd
popd
%patch110 -p1 -b .blink-dlopen-h264
# delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we
# never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS
@ -525,25 +393,15 @@ ln -s /usr/lib/python%{python3_version}/site-packages/six.py src/3rdparty/chromi
ln -s /usr/lib/python%{python3_version}/site-packages/six.py src/3rdparty/chromium/third_party/wpt_tools/wpt/tools/third_party/six/six.py
%endif
#%%if 0%{?use_system_re2}
%if 0%{?use_system_re2}
# http://bugzilla.redhat.com/1337585
# can't just delete, but we'll overwrite with system headers to be on the safe side
#cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/src/re2/
#%%endif
cp -bv /usr/include/re2/*.h src/3rdparty/chromium/third_party/re2/src/re2/
%endif
# copy the Chromium license so it is installed with the appropriate name
cp -p src/3rdparty/chromium/LICENSE LICENSE.Chromium
# use system libraries not handled by cmake options correctly
system_libs=()
%if %{?use_system_ffmpeg}
system_libs+=(ffmpeg)
system_libs+=(openh264)
%endif
# Use system libraries
src/3rdparty/chromium/build/linux/unbundle/replace_gn_files.py --system-libraries ${system_libs[@]}
# consider doing this as part of the tarball creation step instead? rdieter
# fix/workaround
# fatal error: QtWebEngineCore/qtwebenginecoreglobal.h: No such file or directory
@ -563,63 +421,22 @@ export STRIP=strip
export NINJAFLAGS="%{__ninja_common_opts}"
export NINJA_PATH=%{__ninja}
# this follows the logic of the Configure summary to turn on and off
%cmake_qt6 \
-DCMAKE_TOOLCHAIN_FILE:STRING="%{_libdir}/cmake/Qt6/qt.toolchain.cmake" \
-DFEATURE_webengine_build_gn:BOOL=ON \
-DFEATURE_webengine_jumbo_build:BOOL=ON \
-DFEATURE_webengine_developer_build:BOOL=OFF \
-DFEATURE_qtwebengine_build:BOOL=ON \
-DFEATURE_qtwebengine_core_build:BOOL=ON \
-DFEATURE_qtwebengine_widgets_build:BOOL=ON \
-DFEATURE_qtwebengine_quick_build:BOOL=ON \
-DFEATURE_qtpdf_build:BOOL=ON \
-DFEATURE_qtpdf_widgets_build:BOOL=ON \
-DFEATURE_qtpdf_quick_build:BOOL=ON \
-DFEATURE_webengine_system_re2:BOOL=%{?use_system_re2} \
-DFEATURE_webengine_system_icu:BOOL=%{?use_system_libicu} \
-DFEATURE_webengine_system_libwebp:BOOL=%{?use_system_libwebp} \
-DFEATURE_webengine_system_opus:BOOL=%{?use_system_opus} \
-DFEATURE_webengine_system_ffmpeg:BOOL=%{?use_system_ffmpeg} \
-DFEATURE_webengine_system_libvpx:BOOL=%{?use_system_libvpx} \
-DFEATURE_webengine_system_snappy:BOOL=%{?use_system_snappy} \
-DFEATURE_webengine_system_glib:BOOL=%{?use_system_glib} \
-DFEATURE_webengine_system_zlib:BOOL=%{?use_system_zlib} \
-DFEATURE_webengine_system_minizip:BOOL=%{?use_system_minizip} \
-DFEATURE_webengine_system_libevent:BOOL=%{?use_system_libevent} \
-DFEATURE_webengine_system_libxml:BOOL=%{?use_system_libxml} \
-DFEATURE_webengine_system_lcms2:BOOL=%{?use_system_lcms2} \
-DFEATURE_webengine_system_libpng:BOOL=%{?use_system_libpng} \
-DFEATURE_webengine_system_libtiff:BOOL=%{?use_system_libtiff} \
-DFEATURE_webengine_system_libjpeg:BOOL=%{?use_system_libjpeg} \
-DFEATURE_webengine_system_libopenjpeg2:BOOL=%{?use_system_libopenjpeg2} \
-DFEATURE_webengine_system_harfbuzz:BOOL=%{?use_system_harfbuzz} \
-DFEATURE_webengine_system_freetype:BOOL=%{?use_system_freetype} \
-DFEATURE_webengine_system_libpci:BOOL=%{?use_system_libpci} \
-DFEATURE_webengine_system_libudev:BOOL=%{?use_system_libudev} \
-DFEATURE_webengine_developer_build:BOOL=OFF \
-DFEATURE_webengine_embedded_build:BOOL=OFF \
-DFEATURE_webengine_pepper_plugins:BOOL=ON \
-DFEATURE_webengine_extensions:BOOL=ON \
-DFEATURE_webengine_kerberos:BOOL=ON \
-DFEATURE_webengine_native_spellchecker:BOOL=OFF \
-DFEATURE_webengine_printing_and_pdf:BOOL=ON \
-DFEATURE_webengine_proprietary_codecs:BOOL=ON \
-DFEATURE_webengine_spellchecker:BOOL=ON \
-DFEATURE_webengine_native_spellchecker:BOOL=OFF \
-DFEATURE_webengine_system_icu:BOOL=%{?use_system_libicu} \
-DFEATURE_webengine_system_libevent:BOOL=ON \
-DFEATURE_webengine_system_ffmpeg:BOOL=ON \
-DFEATURE_webengine_webrtc:BOOL=ON \
-DFEATURE_webengine_webrtc_pipewire:BOOL=ON \
-DFEATURE_webengine_geolocation:BOOL=ON \
-DFEATURE_webengine_webchannel:BOOL=ON \
-DFEATURE_webengine_kerberos:BOOL=ON \
-DFEATURE_webengine_extensions:BOOL=ON \
-DFEATURE_webengine_ozone_x11:BOOL=ON \
-DFEATURE_webengine_vulkan:BOOL=ON \
-DFEATURE_webengine_vaapi:BOOL=ON \
-DFEATURE_webengine_system_alsa:BOOL=ON \
-DFEATURE_webengine_system_pulseaudio:BOOL=ON \
-DFEATURE_webengine_system_gbm:BOOL=ON \
-DFEATURE_webengine_v8_context_snapshot:BOOL=ON \
-DFEATURE_webenginedriver:BOOL=ON \
-DFEATURE_pdf_v8:BOOL=%{?enable_pdf_v8} \
-DQT_BUILD_EXAMPLES:BOOL=%{?examples:ON}%{!?examples:OFF} \
-DQT_INSTALL_EXAMPLES_SOURCES=%{?examples:ON}%{!?examples:OFF}
-DQT_BUILD_EXAMPLES:BOOL=ON
%cmake_build
@ -677,8 +494,9 @@ done
%files
%license LICENSE.*
%{_qt6_archdatadir}/sbom/%{qt_module}-%{version}.spdx
%{_qt6_archdatadir}/sbom/qtpdf-%{version}.spdx
%if 0%{?docs}
%license src/webengine/doc/src/qtwebengine-3rdparty.qdoc
%endif
%{_qt6_libdir}/libQt6WebEngineCore.so.*
%{_qt6_libdir}/libQt6WebEngineQuick.so.*
%{_qt6_libdir}/libQt6WebEngineQuickDelegatesQml.so.*
@ -686,9 +504,9 @@ done
%{_qt6_libdir}/qt6/libexec/gn
%{_qt6_libdir}/qt6/libexec/qwebengine_convert_dict
%{_qt6_libdir}/qt6/libexec/QtWebEngineProcess
%{_qt6_libdir}/qt6/libexec/webenginedriver
%dir %{_qt6_libdir}/qt6/qml/QtWebEngine
%{_qt6_libdir}/qt6/qml/QtWebEngine/*
%{_qt6_plugindir}/designer/libqwebengineview.so
%dir %{_qt6_datadir}/resources/
%{_qt6_datadir}/resources/v8_context_snapshot.bin
%{_qt6_datadir}/resources/qtwebengine_resources.pak
@ -771,40 +589,36 @@ done
%{_qt6_libdir}/libQt6WebEngineQuick.prl
%{_qt6_libdir}/libQt6WebEngineQuickDelegatesQml.prl
%{_qt6_libdir}/libQt6WebEngineWidgets.prl
%dir %{_qt6_libdir}/cmake/Qt6Designer
%dir %{_qt6_libdir}/cmake/Qt6WebEngineCore
%dir %{_qt6_libdir}/cmake/Qt6WebEngineCorePrivate
%dir %{_qt6_libdir}/cmake/Qt6WebEngineCoreTools
%dir %{_qt6_libdir}/cmake/Qt6WebEngineQuick
%dir %{_qt6_libdir}/cmake/Qt6WebEngineQuickDelegatesQml
%dir %{_qt6_libdir}/cmake/Qt6WebEngineQuickPrivate
%dir %{_qt6_libdir}/cmake/Qt6WebEngineWidgets
%dir %{_qt6_libdir}/cmake/Qt6WebEngineWidgetsPrivate
%{_qt6_libdir}/cmake/Qt6/*.cmake
%{_qt6_libdir}/cmake/Qt6BuildInternals/StandaloneTests/QtWebEngine*
%{_qt6_libdir}/cmake/Qt6Designer/Qt6QWebEngine*.cmake
%{_qt6_libdir}/cmake/Qt6Qml/QmlPlugins/Qt6qtwebengine*.cmake
%{_qt6_libdir}/cmake/Qt6WebEngineCore/*.cmake
%{_qt6_libdir}/cmake/Qt6WebEngineCorePrivate/*.cmake
%{_qt6_libdir}/cmake/Qt6WebEngineCoreTools/*.cmake
%dir %{_qt6_libdir}/cmake/Qt6Designer
%{_qt6_libdir}/cmake/Qt6Designer/Qt6QWebEngine*.cmake
%dir %{_qt6_libdir}/cmake/Qt6WebEngineQuick
%{_qt6_libdir}/cmake/Qt6WebEngineQuick/*.cmake
%{_qt6_libdir}/cmake/Qt6WebEngineQuickDelegatesQml/*.cmake
%{_qt6_libdir}/cmake/Qt6WebEngineQuickPrivate/*.cmake
%dir %{_qt6_libdir}/cmake/Qt6WebEngineWidgets
%{_qt6_libdir}/cmake/Qt6WebEngineWidgets/*.cmake
%{_qt6_libdir}/cmake/Qt6WebEngineWidgetsPrivate/*.cmake
%dir %{_qt6_libdir}/cmake/Qt6WebEngineCore
%{_qt6_libdir}/cmake/Qt6WebEngineCore/*.cmake
%dir %{_qt6_libdir}/cmake/Qt6WebEngineCoreTools
%{_qt6_libdir}/cmake/Qt6WebEngineCoreTools/*.cmake
%dir %{_qt6_libdir}/cmake/Qt6WebEngineQuickDelegatesQml
%{_qt6_libdir}/cmake/Qt6WebEngineQuickDelegatesQml/*.cmake
%{_qt6_libdir}/pkgconfig/Qt6WebEngineCore.pc
%{_qt6_libdir}/pkgconfig/Qt6WebEngineQuick.pc
%{_qt6_libdir}/pkgconfig/Qt6WebEngineQuickDelegatesQml.pc
%{_qt6_libdir}/pkgconfig/Qt6WebEngineWidgets.pc
%{_qt6_archdatadir}/mkspecs/modules/qt_lib_webengine*.pri
%{_qt6_plugindir}/designer/libqwebengineview.so
%files devtools
%{_qt6_datadir}/resources/qtwebengine_devtools_resources.pak
%if 0%{?examples}
%files examples
%{_qt6_examplesdir}/webengine*
%if 0%{?docs}
%files doc
%{_qt6_docdir}/*
%endif
%files -n qt6-qtpdf
@ -831,142 +645,24 @@ done
%{_qt6_libdir}/libQt6Pdf.prl
%{_qt6_libdir}/libQt6PdfQuick.prl
%{_qt6_libdir}/libQt6PdfWidgets.prl
%dir %{_qt6_libdir}/cmake/Qt6Pdf
%dir %{_qt6_libdir}/cmake/Qt6PdfPrivate
%dir %{_qt6_libdir}/cmake/Qt6PdfQuick
%dir %{_qt6_libdir}/cmake/Qt6PdfQuickPrivate
%dir %{_qt6_libdir}/cmake/Qt6PdfWidgets
%dir %{_qt6_libdir}/cmake/Qt6PdfWidgetsPrivate
%{_qt6_libdir}/cmake/Qt6Gui/Qt6QPdf*.cmake
%dir %{_qt6_libdir}/cmake/Qt6Pdf
%{_qt6_libdir}/cmake/Qt6Pdf/*.cmake
%{_qt6_libdir}/cmake/Qt6PdfPrivate/*.cmake
%dir %{_qt6_libdir}/cmake/Qt6PdfQuick
%{_qt6_libdir}/cmake/Qt6PdfQuick/*.cmake
%{_qt6_libdir}/cmake/Qt6PdfQuickPrivate/*.cmake
%dir %{_qt6_libdir}/cmake/Qt6PdfWidgets
%{_qt6_libdir}/cmake/Qt6PdfWidgets/*.cmake
%{_qt6_libdir}/cmake/Qt6PdfWidgetsPrivate/*.cmake
%{_qt6_libdir}/cmake/Qt6Qml/QmlPlugins/Qt6Pdf*.cmake
%{_qt6_libdir}/pkgconfig/Qt6Pdf.pc
%{_qt6_libdir}/pkgconfig/Qt6PdfQuick.pc
%{_qt6_libdir}/pkgconfig/Qt6PdfWidgets.pc
%{_qt6_archdatadir}/mkspecs/modules/qt_lib_pdf*.pri
%if 0%{?examples}
%files -n qt6-qtpdf-examples
%{_qt6_examplesdir}/pdf*
%endif
%changelog
* Tue Jan 13 2026 Jan Grulich <jgrulich@redhat.com> - 6.10.1-5
- Fix Quick popup window positioning under X11
* Sun Jan 11 2026 Jan Grulich <jgrulich@redhat.com> - 6.10.1-4
- Apply the "Move GPU info logging into the GPU thread" patch
* Thu Jan 08 2026 Jan Grulich <jgrulich@redhat.com> - 6.10.1-3
- Move GPU info logging into the GPU thread
* Fri Nov 21 2025 Jan Grulich <jgrulich@redhat.com> - 6.10.1-2
- Rebuild for Koji infra issue
* Thu Nov 20 2025 Jan Grulich <jgrulich@redhat.com> - 6.10.1-1
- 6.10.1
* Thu Oct 30 2025 Dominik Mierzejewski <dominik@greysector.net> - 6.10.0-4
- Rebuilt for FFmpeg 8
* Thu Oct 30 2025 Jan Grulich <jgrulich@redhat.com> - 6.10.0-3
- Fix FTBS in rawhide due to glib and PipeWire updates
* Tue Oct 07 2025 Jan Grulich <jgrulich@redhat.com> - 6.10.0-2
- 6.10.0
* Thu Sep 25 2025 Jan Grulich <jgrulich@redhat.com> - 6.10.0~rc-1
- 6.10.0 RC
* Mon Sep 08 2025 Sandro Mani <manisandro@gmail.com> - 6.9.2-2
- Revert commit bcee2dbf412cc655c1b467091b581c696d234e3f
* Fri Aug 29 2025 Jan Grulich <jgrulich@redhat.com> - 6.9.2-1
- 6.9.2
* Wed Aug 06 2025 František Zatloukal <fzatlouk@redhat.com> - 6.9.1-3
- Rebuilt for icu 77.1
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 6.9.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jun 03 2025 Jan Grulich <jgrulich@redhat.com> - 6.9.1-1
- 6.9.1
* Tue Apr 22 2025 Marie Loise Nolden <loise@kde.org> - 6.9.0-2
- global define all optional system libs, enable XFA
- cleanup spec
* Wed Apr 02 2025 Jan Grulich <jgrulich@redhat.com> - 6.9.0-1
- 6.9.0
* Mon Mar 24 2025 Jan Grulich <jgrulich@redhat.com> - 6.9.0-0.1
- 6.9.0 RC
* Thu Mar 13 2025 Fabio Valentini <decathorpe@gmail.com> - 6.8.2-5
- Rebuild for noopenh264 2.6.0
* Tue Mar 04 2025 Jan Grulich <jgrulich@redhat.com> - 6.8.2-4
- Unbundle libxml and libxslt
* Mon Mar 03 2025 Jan Grulich <jgrulich@redhat.com> - 6.8.2-3
- Rework OpenH264 support following Chromium package
- Backport upstream change for ffmpeg codec selection issues.
* Mon Feb 17 2025 Jan Grulich <jgrulich@redhat.com> - 6.8.2-2
- Bump build for ppc64le enablement
* Fri Jan 31 2025 Jan Grulich <jgrulich@redhat.com> - 6.8.2-1
- 6.8.2
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 6.8.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sun Dec 15 2024 Pavel Solovev <daron439@gmail.com> - 6.8.1-3
- Add optional deps
* Thu Dec 05 2024 Jan Grulich <jgrulich@redhat.com> - 6.8.1-2
- Move Software Bill of Materials from -devel
* Tue Dec 03 2024 Jan Grulich <jgrulich@redhat.com> - 6.8.1-1
- 6.8.1
* Mon Oct 14 2024 Jan Grulich <jgrulich@redhat.com> - 6.8.0-1
- 6.8.0
* Mon Sep 23 2024 Fabio Valentini <decathorpe@gmail.com> - 6.7.2-4
- Rebuild for ffmpeg 7
* Mon Aug 05 2024 Jan Grulich <jgrulich@redhat.com> - 6.7.2-3
- Fix building with system ffmpeg
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Jul 02 2024 Jan Grulich <jgrulich@redhat.com> - 6.7.2-1
- 6.7.2
* Wed May 22 2024 Jan Grulich <jgrulich@redhat.com> - 6.7.1-1
- 6.7.1
* Wed Apr 24 2024 Jan Grulich <jgrulich@redhat.com> - 6.7.0-2
- Rework and enable openh264 patches
* Wed Apr 03 2024 Jan Grulich <jgrulich@redhat.com> - 6.7.0-1
- 6.7.0
* Sun Mar 3 2024 Marie Loise Nolden <loise@kde.org> - 6.6.2-3
- move qt designer plugin to -devel
- remove old doc package code (docs are in qt6-doc)
* Mon Feb 19 2024 Jan Grulich <jgrulich@redhat.com> - 6.6.2-2
- Examples: also install source files
* Thu Feb 15 2024 Jan Grulich <jgrulich@redhat.com> - 6.6.2-1
- 6.6.2

View file

@ -1,13 +0,0 @@
diff --git a/cmake/QtToolchainHelpers.cmake b/cmake/QtToolchainHelpers.cmake
index eaa3a4339..5693c4cc4 100644
--- a/cmake/QtToolchainHelpers.cmake
+++ b/cmake/QtToolchainHelpers.cmake
@@ -55,6 +55,8 @@ function(get_gn_arch result arch)
set(${result} "mips64el" PARENT_SCOPE)
elseif(arch STREQUAL "riscv64")
set(${result} "riscv64" PARENT_SCOPE)
+ elseif(arch STREQUAL "power64")
+ set(${result} "ppc64" PARENT_SCOPE)
else()
message(FATAL_ERROR "Unknown architecture: ${arch}")
endif()

View file

@ -1,8 +1,8 @@
diff --git a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc
index d421682..ffa75a7 100644
index c38d7fdfa..0a8b0fd8b 100644
--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc
@@ -77,6 +77,11 @@ typedef void* SockOptArg;
@@ -72,6 +72,11 @@ typedef void* SockOptArg;
#if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__)

View file

@ -1,57 +0,0 @@
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/pipewire_session.h b/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/pipewire_session.h
index 84273ea695..825bb0000a 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/pipewire_session.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/pipewire_session.h
@@ -11,8 +11,10 @@
#ifndef MODULES_VIDEO_CAPTURE_LINUX_PIPEWIRE_SESSION_H_
#define MODULES_VIDEO_CAPTURE_LINUX_PIPEWIRE_SESSION_H_
-#include <pipewire/core.h>
#include <pipewire/pipewire.h>
+#include <spa/pod/pod.h>
+#include <spa/utils/dict.h>
+#include <spa/utils/hook.h>
#include <deque>
#include <string>
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/video_capture_pipewire.cc b/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/video_capture_pipewire.cc
index f6cd57ac36..b9c579d2e3 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/video_capture_pipewire.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/video_capture_pipewire.cc
@@ -10,10 +10,21 @@
#include "modules/video_capture/linux/video_capture_pipewire.h"
+#include <pipewire/pipewire.h>
+#include <spa/buffer/buffer.h>
+#include <spa/buffer/meta.h>
+#include <spa/param/format-utils.h>
#include <spa/param/format.h>
+#include <spa/param/param.h>
#include <spa/param/video/format-utils.h>
+#include <spa/param/video/raw.h>
#include <spa/pod/builder.h>
+#include <spa/pod/iter.h>
+#include <spa/pod/vararg.h>
+#include <spa/utils/defs.h>
#include <spa/utils/result.h>
+#include <spa/utils/type.h>
+#include <sys/mman.h>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/video_capture_pipewire.h b/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/video_capture_pipewire.h
index 789f2034d3..7c1f9390fc 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/video_capture_pipewire.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_capture/linux/video_capture_pipewire.h
@@ -11,6 +11,10 @@
#ifndef MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_
#define MODULES_VIDEO_CAPTURE_LINUX_VIDEO_CAPTURE_PIPEWIRE_H_
+#include <pipewire/pipewire.h>
+#include <spa/pod/pod.h>
+#include <spa/utils/hook.h>
+
#include "modules/video_capture/linux/pipewire_session.h"
#include "modules/video_capture/video_capture_defines.h"
#include "modules/video_capture/video_capture_impl.h"

View file

@ -0,0 +1,146 @@
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/BUILD.gn b/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/BUILD.gn
index cf6de49be..61e8879d6 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/BUILD.gn
+++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/BUILD.gn
@@ -5,12 +5,23 @@
import("//build/buildflag_header.gni")
import("//third_party/blink/renderer/modules/modules.gni")
import("//third_party/webrtc/webrtc.gni")
+import("//tools/generate_stubs/rules.gni")
buildflag_header("buildflags") {
header = "buildflags.h"
flags = [ "RTC_USE_H264=$rtc_use_h264" ]
}
+if (rtc_use_h264 && rtc_dlopen_openh264) {
+ # When OpenH264 is not directly linked, use stubs to allow for dlopening of
+ # the binary.
+ generate_stubs("openh264_stubs") {
+ extra_header = "openh264_stub_header.fragment"
+ output_name = "openh264_stubs"
+ sigs = [ "openh264.sigs" ]
+ }
+}
+
blink_modules_sources("mediarecorder") {
sources = [
"audio_track_encoder.cc",
@@ -56,6 +67,11 @@ blink_modules_sources("mediarecorder") {
"h264_encoder.h",
]
- deps += [ "//third_party/openh264:encoder" ]
+ if (rtc_dlopen_openh264) {
+ defines = [ "BLINK_DLOPEN_OPENH264" ]
+ deps += [ ":openh264_stubs" ]
+ } else {
+ deps += [ "//third_party/openh264:encoder" ]
+ }
}
}
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc b/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
index 4253f3280..56ea1574c 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/h264_encoder.cc
@@ -23,9 +23,21 @@
#include "third_party/openh264/src/codec/api/wels/codec_def.h"
#include "ui/gfx/geometry/size.h"
+#if defined(BLINK_DLOPEN_OPENH264)
+#include "third_party/blink/renderer/modules/mediarecorder/openh264_stubs.h"
+#endif // defined(BLINK_DLOPEN_OPENH264)
+
namespace blink {
namespace {
+#if defined(BLINK_DLOPEN_OPENH264)
+using third_party_blink_renderer_modules_mediarecorder::InitializeStubs;
+using third_party_blink_renderer_modules_mediarecorder::kModuleOpenh264;
+using third_party_blink_renderer_modules_mediarecorder::StubPathMap;
+
+static constexpr char kOpenH264Lib[] = "libopenh264.so.7";
+#endif
+
absl::optional<EProfileIdc> ToOpenH264Profile(
media::VideoCodecProfile profile) {
static const HashMap<media::VideoCodecProfile, EProfileIdc>
@@ -86,6 +98,13 @@ H264Encoder::H264Encoder(
: Encoder(on_encoded_video_cb, bits_per_second),
codec_profile_(codec_profile) {
DCHECK_EQ(codec_profile_.codec_id, VideoTrackRecorder::CodecId::kH264);
+
+#if defined(BLINK_DLOPEN_OPENH264)
+ StubPathMap paths;
+ paths[kModuleOpenh264].push_back(kOpenH264Lib);
+
+ openh264_dlopened_ = InitializeStubs(paths);
+#endif
}
// Needs to be defined here to combat a Windows linking issue.
@@ -167,6 +186,14 @@ void H264Encoder::EncodeFrame(scoped_refptr<media::VideoFrame> frame,
bool H264Encoder::ConfigureEncoder(const gfx::Size& size) {
TRACE_EVENT0("media", "H264Encoder::ConfigureEncoder");
+
+#if defined(BLINK_DLOPEN_OPENH264)
+ if (!openh264_dlopened_) {
+ NOTREACHED() << "Failed to dlopen openh264";
+ return false;
+ }
+#endif
+
ISVCEncoder* temp_encoder = nullptr;
if (WelsCreateSVCEncoder(&temp_encoder) != 0) {
NOTREACHED() << "Failed to create OpenH264 encoder";
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/h264_encoder.h b/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/h264_encoder.h
index 1d9d7bc5a..a5b7eefe3 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/h264_encoder.h
+++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/h264_encoder.h
@@ -58,6 +58,8 @@ class MODULES_EXPORT H264Encoder final : public VideoTrackRecorder::Encoder {
// The |VideoFrame::timestamp()| of the first received frame.
base::TimeTicks first_frame_timestamp_;
base::WeakPtrFactory<H264Encoder> weak_factory_{this};
+
+ bool openh264_dlopened_ = false;
};
} // namespace blink
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/openh264.sigs b/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/openh264.sigs
new file mode 100644
index 000000000..4924f8e9a
--- /dev/null
+++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/openh264.sigs
@@ -0,0 +1,14 @@
+// Copyright 2022 The WebRTC project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+//------------------------------------------------
+// Functions from OpenH264.
+//------------------------------------------------
+int WelsCreateSVCEncoder(ISVCEncoder **ppEncoder);
+void WelsDestroySVCEncoder(ISVCEncoder *pEncoder);
+int WelsGetDecoderCapability(SDecoderCapability *pDecCapability);
+long WelsCreateDecoder(ISVCDecoder **ppDecoder);
+void WelsDestroyDecoder(ISVCDecoder *pDecoder);
+OpenH264Version WelsGetCodecVersion(void);
+void WelsGetCodecVersionEx(OpenH264Version *pVersion);
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/openh264_stub_header.fragment b/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/openh264_stub_header.fragment
new file mode 100644
index 000000000..e8a3727a0
--- /dev/null
+++ b/src/3rdparty/chromium/third_party/blink/renderer/modules/mediarecorder/openh264_stub_header.fragment
@@ -0,0 +1,11 @@
+// The extra include header needed in the generated stub file for defining
+// various OpenH264 types.
+
+extern "C" {
+
+#include "third_party/openh264/src/codec/api/wels/codec_api.h"
+#include "third_party/openh264/src/codec/api/wels/codec_app_def.h"
+#include "third_party/openh264/src/codec/api/wels/codec_def.h"
+#include "third_party/openh264/src/codec/api/wels/codec_ver.h"
+
+}

View file

@ -1,29 +0,0 @@
Fix FTBFS
/usr/include/bits/siginfo-consts.h:219:3: error: expected identifier
219 | SYS_SECCOMP = 1, /* Seccomp triggered. */
| ^
../../sandbox/linux/system_headers/linux_seccomp.h:220:39: note: expanded from macro 'SYS_SECCOMP'
220 | #define SYS_SECCOMP 1
| ^
../../sandbox/linux/seccomp-bpf/trap.cc:159:46: error: use of undeclared identifier 'SYS_SECCOMP'
159 | if (nr != LINUX_SIGSYS || info->si_code != SYS_SECCOMP || !ctx ||
| ^~~~~~~~~~~
/usr/include/bits/siginfo-consts.h:220:23: note: expanded from macro 'SYS_SECCOMP'
220 | # define SYS_SECCOMP SYS_SECCOMP
diff -up chromium-141.0.7390.122/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h.me chromium-141.0.7390.122/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h
--- chromium-141.0.7390.122/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h.me 2025-10-28 10:05:44.970248151 +0100
+++ chromium-141.0.7390.122/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h 2025-10-28 10:05:52.291345772 +0100
@@ -214,8 +214,11 @@ struct seccomp_notif_addfd {
#define SECCOMP_RET_INVALID 0x00010000U // Illegal return value
#endif
+// check glibc version < 2.42
+#if (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 42)
#ifndef SYS_SECCOMP
#define SYS_SECCOMP 1
#endif
+#endif
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SECCOMP_H_

View file

@ -1,258 +0,0 @@
commit dcc0ca1cd4245ecff9e5ba50818e47d5e2ccf699
Author: John Platts <john_platts@hotmail.com>
Date: Fri Jan 17 12:16:49 2025 -0600
Fix for GCC 15 compiler error on PPC8/PPC9/PPC10
diff --git a/hwy/ops/ppc_vsx-inl.h b/hwy/ops/ppc_vsx-inl.h
index 86d6d98c..3564ae0b 100644
--- a/hwy/ops/ppc_vsx-inl.h
+++ b/hwy/ops/ppc_vsx-inl.h
@@ -3744,16 +3744,73 @@ static HWY_INLINE V VsxF2INormalizeSrcVals(V v) {
#endif
}
+template <class VF32>
+static HWY_INLINE HWY_MAYBE_UNUSED VFromD<Repartition<int64_t, DFromV<VF32>>>
+VsxXvcvspsxds(VF32 vf32) {
+ using VI64 = VFromD<Repartition<int64_t, DFromV<VF32>>>;
+#if (HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1500) || \
+ HWY_HAS_BUILTIN(__builtin_vsx_xvcvspsxds)
+ // Use __builtin_vsx_xvcvspsxds if it is available (which is the case with
+ // GCC 4.8 through GCC 14 or Clang 13 or later on PPC8/PPC9/PPC10)
+ return VI64{__builtin_vsx_xvcvspsxds(vf32.raw)};
+#elif HWY_COMPILER_GCC_ACTUAL >= 1500 && HWY_IS_LITTLE_ENDIAN
+ // On little-endian PPC8/PPC9/PPC10 with GCC 15 or later, use the F32->I64
+ // vec_signedo intrinsic as the __builtin_vsx_xvcvspsxds intrinsic has been
+ // removed from GCC in GCC 15
+ return VI64{vec_signedo(vf32.raw)};
+#elif HWY_COMPILER_GCC_ACTUAL >= 1500 && HWY_IS_BIG_ENDIAN
+ // On big-endian PPC8/PPC9/PPC10 with GCC 15 or later, use the F32->I64
+ // vec_signede intrinsic as the __builtin_vsx_xvcvspsxds intrinsic has been
+ // removed from GCC in GCC 15
+ return VI64{vec_signede(vf32.raw)};
+#else
+ // Inline assembly fallback for older versions of Clang that do not have the
+ // __builtin_vsx_xvcvspsxds intrinsic
+ __vector signed long long raw_result;
+ __asm__("xvcvspsxds %x0, %x1" : "=wa"(raw_result) : "wa"(vf32.raw) :);
+ return VI64{raw_result};
+#endif
+}
+
+template <class VF32>
+static HWY_INLINE HWY_MAYBE_UNUSED VFromD<Repartition<uint64_t, DFromV<VF32>>>
+VsxXvcvspuxds(VF32 vf32) {
+ using VU64 = VFromD<Repartition<uint64_t, DFromV<VF32>>>;
+#if (HWY_COMPILER_GCC_ACTUAL && HWY_COMPILER_GCC_ACTUAL < 1500) || \
+ HWY_HAS_BUILTIN(__builtin_vsx_xvcvspuxds)
+ // Use __builtin_vsx_xvcvspuxds if it is available (which is the case with
+ // GCC 4.8 through GCC 14 or Clang 13 or later on PPC8/PPC9/PPC10)
+ return VU64{reinterpret_cast<__vector unsigned long long>(
+ __builtin_vsx_xvcvspuxds(vf32.raw))};
+#elif HWY_COMPILER_GCC_ACTUAL >= 1500 && HWY_IS_LITTLE_ENDIAN
+ // On little-endian PPC8/PPC9/PPC10 with GCC 15 or later, use the F32->U64
+ // vec_unsignedo intrinsic as the __builtin_vsx_xvcvspuxds intrinsic has been
+ // removed from GCC in GCC 15
+ return VU64{vec_unsignedo(vf32.raw)};
+#elif HWY_COMPILER_GCC_ACTUAL >= 1500 && HWY_IS_BIG_ENDIAN
+ // On big-endian PPC8/PPC9/PPC10 with GCC 15 or later, use the F32->U64
+ // vec_unsignedo intrinsic as the __builtin_vsx_xvcvspuxds intrinsic has been
+ // removed from GCC in GCC 15
+ return VU64{vec_unsignede(vf32.raw)};
+#else
+ // Inline assembly fallback for older versions of Clang that do not have the
+ // __builtin_vsx_xvcvspuxds intrinsic
+ __vector unsigned long long raw_result;
+ __asm__("xvcvspuxds %x0, %x1" : "=wa"(raw_result) : "wa"(vf32.raw) :);
+ return VU64{raw_result};
+#endif
+}
+
} // namespace detail
#endif // !HWY_S390X_HAVE_Z14
template <class D, HWY_IF_I64_D(D)>
HWY_API VFromD<D> PromoteTo(D di64, VFromD<Rebind<float, D>> v) {
-#if !HWY_S390X_HAVE_Z14 && \
- (HWY_COMPILER_GCC_ACTUAL || HWY_HAS_BUILTIN(__builtin_vsx_xvcvspsxds))
- const __vector float raw_v =
- detail::VsxF2INormalizeSrcVals(InterleaveLower(v, v)).raw;
- return VFromD<decltype(di64)>{__builtin_vsx_xvcvspsxds(raw_v)};
+#if !HWY_S390X_HAVE_Z14
+ const Repartition<float, decltype(di64)> dt_f32;
+ const auto vt_f32 = ResizeBitCast(dt_f32, v);
+ return detail::VsxXvcvspsxds(
+ detail::VsxF2INormalizeSrcVals(InterleaveLower(vt_f32, vt_f32)));
#else
const RebindToFloat<decltype(di64)> df64;
return ConvertTo(di64, PromoteTo(df64, v));
@@ -3762,12 +3819,11 @@ HWY_API VFromD<D> PromoteTo(D di64, VFromD<Rebind<float, D>> v) {
template <class D, HWY_IF_U64_D(D)>
HWY_API VFromD<D> PromoteTo(D du64, VFromD<Rebind<float, D>> v) {
-#if !HWY_S390X_HAVE_Z14 && \
- (HWY_COMPILER_GCC_ACTUAL || HWY_HAS_BUILTIN(__builtin_vsx_xvcvspuxds))
- const __vector float raw_v =
- detail::VsxF2INormalizeSrcVals(InterleaveLower(v, v)).raw;
- return VFromD<decltype(du64)>{reinterpret_cast<__vector unsigned long long>(
- __builtin_vsx_xvcvspuxds(raw_v))};
+#if !HWY_S390X_HAVE_Z14
+ const Repartition<float, decltype(du64)> dt_f32;
+ const auto vt_f32 = ResizeBitCast(dt_f32, v);
+ return detail::VsxXvcvspuxds(
+ detail::VsxF2INormalizeSrcVals(InterleaveLower(vt_f32, vt_f32)));
#else
const RebindToFloat<decltype(du64)> df64;
return ConvertTo(du64, PromoteTo(df64, v));
@@ -3876,12 +3932,10 @@ HWY_API VFromD<D> PromoteUpperTo(D df64, Vec128<uint32_t> v) {
template <class D, HWY_IF_V_SIZE_D(D, 16), HWY_IF_I64_D(D)>
HWY_API VFromD<D> PromoteUpperTo(D di64, Vec128<float> v) {
-#if !HWY_S390X_HAVE_Z14 && \
- (HWY_COMPILER_GCC_ACTUAL || HWY_HAS_BUILTIN(__builtin_vsx_xvcvspsxds))
- const __vector float raw_v =
- detail::VsxF2INormalizeSrcVals(InterleaveUpper(Full128<float>(), v, v))
- .raw;
- return VFromD<decltype(di64)>{__builtin_vsx_xvcvspsxds(raw_v)};
+#if !HWY_S390X_HAVE_Z14
+ (void)di64;
+ return detail::VsxXvcvspsxds(
+ detail::VsxF2INormalizeSrcVals(InterleaveUpper(Full128<float>(), v, v)));
#else
const RebindToFloat<decltype(di64)> df64;
return ConvertTo(di64, PromoteUpperTo(df64, v));
@@ -3890,13 +3944,10 @@ HWY_API VFromD<D> PromoteUpperTo(D di64, Vec128<float> v) {
template <class D, HWY_IF_V_SIZE_D(D, 16), HWY_IF_U64_D(D)>
HWY_API VFromD<D> PromoteUpperTo(D du64, Vec128<float> v) {
-#if !HWY_S390X_HAVE_Z14 && \
- (HWY_COMPILER_GCC_ACTUAL || HWY_HAS_BUILTIN(__builtin_vsx_xvcvspuxds))
- const __vector float raw_v =
- detail::VsxF2INormalizeSrcVals(InterleaveUpper(Full128<float>(), v, v))
- .raw;
- return VFromD<decltype(du64)>{reinterpret_cast<__vector unsigned long long>(
- __builtin_vsx_xvcvspuxds(raw_v))};
+#if !HWY_S390X_HAVE_Z14
+ (void)du64;
+ return detail::VsxXvcvspuxds(
+ detail::VsxF2INormalizeSrcVals(InterleaveUpper(Full128<float>(), v, v)));
#else
const RebindToFloat<decltype(du64)> df64;
return ConvertTo(du64, PromoteUpperTo(df64, v));
@@ -3984,20 +4035,18 @@ HWY_INLINE VFromD<D> PromoteEvenTo(hwy::SignedTag /*to_type_tag*/,
hwy::SizeTag<8> /*to_lane_size_tag*/,
hwy::FloatTag /*from_type_tag*/, D d_to,
V v) {
-#if !HWY_S390X_HAVE_Z14 && \
- (HWY_COMPILER_GCC_ACTUAL || HWY_HAS_BUILTIN(__builtin_vsx_xvcvspsxds))
+#if !HWY_S390X_HAVE_Z14
(void)d_to;
const auto normalized_v = detail::VsxF2INormalizeSrcVals(v);
#if HWY_IS_LITTLE_ENDIAN
- // __builtin_vsx_xvcvspsxds expects the source values to be in the odd lanes
- // on little-endian PPC, and the vec_sld operation below will shift the even
+ // VsxXvcvspsxds expects the source values to be in the odd lanes on
+ // little-endian PPC, and the Shuffle2103 operation below will shift the even
// lanes of normalized_v into the odd lanes.
- return VFromD<D>{
- __builtin_vsx_xvcvspsxds(vec_sld(normalized_v.raw, normalized_v.raw, 4))};
+ return VsxXvcvspsxds(Shuffle2103(normalized_v));
#else
- // __builtin_vsx_xvcvspsxds expects the source values to be in the even lanes
- // on big-endian PPC.
- return VFromD<D>{__builtin_vsx_xvcvspsxds(normalized_v.raw)};
+ // VsxXvcvspsxds expects the source values to be in the even lanes on
+ // big-endian PPC.
+ return VsxXvcvspsxds(normalized_v);
#endif
#else
const RebindToFloat<decltype(d_to)> df64;
@@ -4012,22 +4061,18 @@ HWY_INLINE VFromD<D> PromoteEvenTo(hwy::UnsignedTag /*to_type_tag*/,
hwy::SizeTag<8> /*to_lane_size_tag*/,
hwy::FloatTag /*from_type_tag*/, D d_to,
V v) {
-#if !HWY_S390X_HAVE_Z14 && \
- (HWY_COMPILER_GCC_ACTUAL || HWY_HAS_BUILTIN(__builtin_vsx_xvcvspuxds))
+#if !HWY_S390X_HAVE_Z14
(void)d_to;
const auto normalized_v = detail::VsxF2INormalizeSrcVals(v);
#if HWY_IS_LITTLE_ENDIAN
- // __builtin_vsx_xvcvspuxds expects the source values to be in the odd lanes
- // on little-endian PPC, and the vec_sld operation below will shift the even
- // lanes of normalized_v into the odd lanes.
- return VFromD<D>{
- reinterpret_cast<__vector unsigned long long>(__builtin_vsx_xvcvspuxds(
- vec_sld(normalized_v.raw, normalized_v.raw, 4)))};
+ // VsxXvcvspuxds expects the source values to be in the odd lanes
+ // on little-endian PPC, and the Shuffle2103 operation below will shift the
+ // even lanes of normalized_v into the odd lanes.
+ return VsxXvcvspuxds(Shuffle2103(normalized_v));
#else
- // __builtin_vsx_xvcvspuxds expects the source values to be in the even lanes
+ // VsxXvcvspuxds expects the source values to be in the even lanes
// on big-endian PPC.
- return VFromD<D>{reinterpret_cast<__vector unsigned long long>(
- __builtin_vsx_xvcvspuxds(normalized_v.raw))};
+ return VsxXvcvspuxds(normalized_v);
#endif
#else
const RebindToFloat<decltype(d_to)> df64;
@@ -4069,20 +4114,18 @@ HWY_INLINE VFromD<D> PromoteOddTo(hwy::SignedTag /*to_type_tag*/,
hwy::SizeTag<8> /*to_lane_size_tag*/,
hwy::FloatTag /*from_type_tag*/, D d_to,
V v) {
-#if !HWY_S390X_HAVE_Z14 && \
- (HWY_COMPILER_GCC_ACTUAL || HWY_HAS_BUILTIN(__builtin_vsx_xvcvspsxds))
+#if !HWY_S390X_HAVE_Z14
(void)d_to;
const auto normalized_v = detail::VsxF2INormalizeSrcVals(v);
#if HWY_IS_LITTLE_ENDIAN
- // __builtin_vsx_xvcvspsxds expects the source values to be in the odd lanes
+ // VsxXvcvspsxds expects the source values to be in the odd lanes
// on little-endian PPC
- return VFromD<D>{__builtin_vsx_xvcvspsxds(normalized_v.raw)};
+ return VsxXvcvspsxds(normalized_v);
#else
- // __builtin_vsx_xvcvspsxds expects the source values to be in the even lanes
- // on big-endian PPC, and the vec_sld operation below will shift the odd lanes
- // of normalized_v into the even lanes.
- return VFromD<D>{
- __builtin_vsx_xvcvspsxds(vec_sld(normalized_v.raw, normalized_v.raw, 4))};
+ // VsxXvcvspsxds expects the source values to be in the even lanes
+ // on big-endian PPC, and the Shuffle0321 operation below will shift the odd
+ // lanes of normalized_v into the even lanes.
+ return VsxXvcvspsxds(Shuffle0321(normalized_v));
#endif
#else
const RebindToFloat<decltype(d_to)> df64;
@@ -4097,22 +4140,18 @@ HWY_INLINE VFromD<D> PromoteOddTo(hwy::UnsignedTag /*to_type_tag*/,
hwy::SizeTag<8> /*to_lane_size_tag*/,
hwy::FloatTag /*from_type_tag*/, D d_to,
V v) {
-#if !HWY_S390X_HAVE_Z14 && \
- (HWY_COMPILER_GCC_ACTUAL || HWY_HAS_BUILTIN(__builtin_vsx_xvcvspuxds))
+#if !HWY_S390X_HAVE_Z14
(void)d_to;
const auto normalized_v = detail::VsxF2INormalizeSrcVals(v);
#if HWY_IS_LITTLE_ENDIAN
- // __builtin_vsx_xvcvspuxds expects the source values to be in the odd lanes
+ // VsxXvcvspuxds expects the source values to be in the odd lanes
// on little-endian PPC
- return VFromD<D>{reinterpret_cast<__vector unsigned long long>(
- __builtin_vsx_xvcvspuxds(normalized_v.raw))};
+ return VsxXvcvspuxds(normalized_v);
#else
- // __builtin_vsx_xvcvspuxds expects the source values to be in the even lanes
- // on big-endian PPC, and the vec_sld operation below will shift the odd lanes
- // of normalized_v into the even lanes.
- return VFromD<D>{
- reinterpret_cast<__vector unsigned long long>(__builtin_vsx_xvcvspuxds(
- vec_sld(normalized_v.raw, normalized_v.raw, 4)))};
+ // VsxXvcvspuxds expects the source values to be in the even lanes
+ // on big-endian PPC, and the Shuffle0321 operation below will shift the odd
+ // lanes of normalized_v into the even lanes.
+ return VsxXvcvspuxds(Shuffle0321(normalized_v));
#endif
#else
const RebindToFloat<decltype(d_to)> df64;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,168 @@
diff --git a/configure.cmake b/configure.cmake
index 8f30b34..bbd934e 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -209,25 +209,6 @@ int main(void){
}"
)
-qt_config_compile_test(libavformat
- LABEL "libavformat"
- LIBRARIES
- PkgConfig::FFMPEG
- CODE
-"
-#include \"libavformat/version.h\"
-extern \"C\" {
-#include \"libavformat/avformat.h\"
-}
-int main(void) {
-#if LIBAVFORMAT_VERSION_MAJOR >= 59
- AVStream stream;
- auto first_dts = av_stream_get_first_dts(&stream);
-#endif
- return 0;
-}"
-)
-
#### Features
qt_feature("qtwebengine-build" PUBLIC
@@ -563,11 +544,6 @@ add_check_for_support(
CONDITION NOT LINUX OR DBUS_FOUND
MESSAGE "Build requires dbus."
)
-add_check_for_support(
- MODULES QtWebEngine
- CONDITION NOT LINUX OR NOT QT_FEATURE_webengine_system_ffmpeg OR TEST_libavformat
- MESSAGE "Unmodified ffmpeg >= 5.0 is not supported."
-)
# FIXME: This prevents non XCB Linux builds from building:
set(xcbSupport X11 LIBDRM XCOMPOSITE XCURSOR XRANDR XI XPROTO XSHMFENCE XTST)
foreach(xs ${xcbSupport})
diff --git a/src/3rdparty/chromium/AUTHORS b/src/3rdparty/chromium/AUTHORS
index ff6abe8..0fd7937 100644
--- a/src/3rdparty/chromium/AUTHORS
+++ b/src/3rdparty/chromium/AUTHORS
@@ -99,6 +99,7 @@ Andra Paraschiv <andra.paraschiv@intel.com>
Andras Tokodi <a.tokodi@eyeo.com>
Andreas Nazlidis <andreas221b@gmail.com>
Andreas Papacharalampous <andreas@apap04.com>
+Andreas Schneider <asn@cryptomilk.org>
Andrei Borza <andrei.borza@gmail.com>
Andrei Parvu <andrei.prv@gmail.com>
Andrei Parvu <parvu@adobe.com>
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
index f41464b..3aa3918 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.cc
@@ -59,7 +59,7 @@ namespace media {
namespace {
-constexpr int64_t kInvalidPTSMarker = static_cast<int64_t>(0x8000000000000000);
+constexpr int64_t kRelativeTsBase = static_cast<int64_t>(0x7ffeffffffffffff);
void SetAVStreamDiscard(AVStream* stream, AVDiscard discard) {
DCHECK(stream);
@@ -97,7 +97,7 @@ static base::TimeDelta FramesToTimeDelta(int frames, double sample_rate) {
sample_rate);
}
-static base::TimeDelta ExtractStartTime(AVStream* stream) {
+static base::TimeDelta ExtractStartTime(AVStream* stream, int64_t first_dts) {
// The default start time is zero.
base::TimeDelta start_time;
@@ -107,12 +107,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) {
// Next try to use the first DTS value, for codecs where we know PTS == DTS
// (excludes all H26x codecs). The start time must be returned in PTS.
- if (av_stream_get_first_dts(stream) != kInvalidPTSMarker &&
+ if (first_dts != AV_NOPTS_VALUE &&
stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
const base::TimeDelta first_pts =
- ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
+ ConvertFromTimeBase(stream->time_base, first_dts);
if (first_pts < start_time)
start_time = first_pts;
}
@@ -270,6 +270,7 @@ FFmpegDemuxerStream::FFmpegDemuxerStream(
fixup_negative_timestamps_(false),
fixup_chained_ogg_(false),
num_discarded_packet_warnings_(0),
+ first_dts_(AV_NOPTS_VALUE),
last_packet_pos_(AV_NOPTS_VALUE),
last_packet_dts_(AV_NOPTS_VALUE) {
DCHECK(demuxer_);
@@ -336,6 +337,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
int64_t packet_dts =
packet->dts == AV_NOPTS_VALUE ? packet->pts : packet->dts;
+ if (first_dts_ == AV_NOPTS_VALUE && packet->dts != AV_NOPTS_VALUE &&
+ last_packet_dts_ != AV_NOPTS_VALUE) {
+ first_dts_ = packet->dts - (last_packet_dts_ + kRelativeTsBase);
+ }
+
// Chained ogg files have non-monotonically increasing position and time stamp
// values, which prevents us from using them to determine if a packet should
// be dropped. Since chained ogg is only allowed on single track audio only
@@ -683,6 +689,7 @@ void FFmpegDemuxerStream::FlushBuffers(bool preserve_packet_position) {
ResetBitstreamConverter();
if (!preserve_packet_position) {
+ first_dts_ = AV_NOPTS_VALUE;
last_packet_pos_ = AV_NOPTS_VALUE;
last_packet_dts_ = AV_NOPTS_VALUE;
}
@@ -1452,7 +1459,8 @@ void FFmpegDemuxer::OnFindStreamInfoDone(int result) {
max_duration = std::max(max_duration, streams_[i]->duration());
- base::TimeDelta start_time = ExtractStartTime(stream);
+ base::TimeDelta start_time =
+ ExtractStartTime(stream, streams_[i]->first_dts());
// Note: This value is used for seeking, so we must take the true value and
// not the one possibly clamped to zero below.
@@ -1609,7 +1617,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::FindStreamWithLowestStartTimestamp(
for (const auto& stream : streams_) {
if (!stream || stream->IsEnabled() != enabled)
continue;
- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
+ if (stream->first_dts() == AV_NOPTS_VALUE)
continue;
if (!lowest_start_time_stream ||
stream->start_time() < lowest_start_time_stream->start_time()) {
@@ -1630,7 +1638,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::FindPreferredStreamForSeeking(
if (stream->type() != DemuxerStream::VIDEO)
continue;
- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
+ if (stream->first_dts() == AV_NOPTS_VALUE)
continue;
if (!stream->IsEnabled())
diff --git a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.h b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.h
index 086a795..ba9c665 100644
--- a/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.h
+++ b/src/3rdparty/chromium/media/filters/ffmpeg_demuxer.h
@@ -145,6 +145,8 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream {
base::TimeDelta start_time() const { return start_time_; }
void set_start_time(base::TimeDelta time) { start_time_ = time; }
+ int64_t first_dts() const { return first_dts_; }
+
private:
friend class FFmpegDemuxerTest;
@@ -202,6 +204,7 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream {
bool fixup_chained_ogg_;
int num_discarded_packet_warnings_;
+ int64_t first_dts_;
int64_t last_packet_pos_;
int64_t last_packet_dts_;
// Requested buffer count. The actual returned buffer count could be less

View file

@ -1,15 +0,0 @@
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index d5e9b715e..af4c046c4 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -570,6 +570,10 @@ foreach(arch ${archs})
list(APPEND gnArgArg libyuv_use_sve=false)
endif()
endif()
+ if(cpu MATCHES "arm.*")
+ # https://bugreports.qt.io/browse/QTBUG-129985
+ list(APPEND gnArgArg build_webnn_with_xnnpack=false)
+ endif()
unset(cpu)
endif()

View file

@ -1,12 +0,0 @@
diff --git a/src/3rdparty/chromium/base/strings/to_string.h b/src/3rdparty/chromium/base/strings/to_string.h
index 96e61daa9e..5d097946f7 100644
--- a/src/3rdparty/chromium/base/strings/to_string.h
+++ b/src/3rdparty/chromium/base/strings/to_string.h
@@ -6,6 +6,7 @@
#define BASE_STRINGS_TO_STRING_H_
#include <concepts>
+#include <cstdint>
#include <iomanip>
#include <ios>
#include <memory>

287
qtwebengine-fix-build.patch Normal file
View file

@ -0,0 +1,287 @@
diff --git a/src/3rdparty/chromium/base/debug/profiler.h b/src/3rdparty/chromium/base/debug/profiler.h
index 80c73feb9..d3921a6aa 100644
--- a/src/3rdparty/chromium/base/debug/profiler.h
+++ b/src/3rdparty/chromium/base/debug/profiler.h
@@ -5,6 +5,7 @@
#ifndef BASE_DEBUG_PROFILER_H_
#define BASE_DEBUG_PROFILER_H_
+#include <cstdint>
#include <stddef.h>
#include <cstdint>
diff --git a/src/3rdparty/chromium/cc/trees/target_property.cc b/src/3rdparty/chromium/cc/trees/target_property.cc
index 714bd5efe..cf0bb5fa9 100644
--- a/src/3rdparty/chromium/cc/trees/target_property.cc
+++ b/src/3rdparty/chromium/cc/trees/target_property.cc
@@ -8,6 +8,8 @@
#include "ui/gfx/animation/keyframe/target_property.h"
+#include <cstdint>
+
namespace cc {
static_assert(TargetProperty::LAST_TARGET_PROPERTY <
diff --git a/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc b/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc
index c62a00ee0..af54520b7 100644
--- a/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc
+++ b/src/3rdparty/chromium/device/base/synchronization/one_writer_seqlock.cc
@@ -6,6 +6,8 @@
#include "base/threading/platform_thread.h"
+#include <cstdint>
+
namespace device {
OneWriterSeqLock::OneWriterSeqLock() : sequence_(0) {}
diff --git a/src/3rdparty/chromium/extensions/common/constants.h b/src/3rdparty/chromium/extensions/common/constants.h
index 27adc05bf..a4839e859 100644
--- a/src/3rdparty/chromium/extensions/common/constants.h
+++ b/src/3rdparty/chromium/extensions/common/constants.h
@@ -12,6 +12,8 @@
#include "build/chromeos_buildflags.h"
#include "extensions/common/extensions_export.h"
+#include <cstdint>
+
namespace extensions {
// Scheme we serve extension content from.
diff --git a/src/3rdparty/chromium/gpu/config/gpu_util.h b/src/3rdparty/chromium/gpu/config/gpu_util.h
index 574aca1ff..fca32671c 100644
--- a/src/3rdparty/chromium/gpu/config/gpu_util.h
+++ b/src/3rdparty/chromium/gpu/config/gpu_util.h
@@ -5,6 +5,8 @@
#ifndef GPU_CONFIG_GPU_UTIL_H_
#define GPU_CONFIG_GPU_UTIL_H_
+#include <cstdint>
+
#include "build/build_config.h"
#include "gpu/config/gpu_feature_info.h"
#include "gpu/gpu_export.h"
diff --git a/src/3rdparty/chromium/net/base/parse_number.h b/src/3rdparty/chromium/net/base/parse_number.h
index 091649590..a49ed9382 100644
--- a/src/3rdparty/chromium/net/base/parse_number.h
+++ b/src/3rdparty/chromium/net/base/parse_number.h
@@ -10,6 +10,8 @@
#include "base/strings/string_piece.h"
#include "net/base/net_export.h"
+#include <cstdint>
+
// This file contains utility functions for parsing numbers, in the context of
// network protocols.
//
diff --git a/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h b/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h
index 7c0dcdecb..97054d476 100644
--- a/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h
+++ b/src/3rdparty/chromium/ppapi/utility/completion_callback_factory_thread_traits.h
@@ -38,6 +38,10 @@ namespace pp {
/// As a further optimization, we can add support for this later.
class ThreadSafeThreadTraits {
public:
+
+ typedef pp::Lock Lock;
+ typedef pp::AutoLock AutoLock;
+
class RefCount {
public:
/// Default constructor. In debug mode, this checks that the object is being
@@ -67,8 +71,6 @@ class ThreadSafeThreadTraits {
int32_t ref_;
};
- typedef pp::Lock Lock;
- typedef pp::AutoLock AutoLock;
};
/// The non-thread-safe version of thread traits. Using this class as the
diff --git a/src/3rdparty/chromium/third_party/dawn/src/dawn/native/CacheKey.h b/src/3rdparty/chromium/third_party/dawn/src/dawn/native/CacheKey.h
index 6cec3b6b8..541bba5b1 100644
--- a/src/3rdparty/chromium/third_party/dawn/src/dawn/native/CacheKey.h
+++ b/src/3rdparty/chromium/third_party/dawn/src/dawn/native/CacheKey.h
@@ -15,6 +15,7 @@
#ifndef SRC_DAWN_NATIVE_CACHEKEY_H_
#define SRC_DAWN_NATIVE_CACHEKEY_H_
+#include <cstdint>
#include <utility>
#include "dawn/native/stream/ByteVectorSink.h"
diff --git a/src/3rdparty/chromium/third_party/dawn/src/tint/reader/spirv/entry_point_info.h b/src/3rdparty/chromium/third_party/dawn/src/tint/reader/spirv/entry_point_info.h
index 90077421d..f303f9e8b 100644
--- a/src/3rdparty/chromium/third_party/dawn/src/tint/reader/spirv/entry_point_info.h
+++ b/src/3rdparty/chromium/third_party/dawn/src/tint/reader/spirv/entry_point_info.h
@@ -15,6 +15,7 @@
#ifndef SRC_TINT_READER_SPIRV_ENTRY_POINT_INFO_H_
#define SRC_TINT_READER_SPIRV_ENTRY_POINT_INFO_H_
+#include <cstdint>
#include <string>
#include "src/tint/ast/pipeline_stage.h"
diff --git a/src/3rdparty/chromium/third_party/dawn/src/tint/reader/spirv/namer.h b/src/3rdparty/chromium/third_party/dawn/src/tint/reader/spirv/namer.h
index 7a20e8738..655f69ce3 100644
--- a/src/3rdparty/chromium/third_party/dawn/src/tint/reader/spirv/namer.h
+++ b/src/3rdparty/chromium/third_party/dawn/src/tint/reader/spirv/namer.h
@@ -15,6 +15,7 @@
#ifndef SRC_TINT_READER_SPIRV_NAMER_H_
#define SRC_TINT_READER_SPIRV_NAMER_H_
+#include <cstdint>
#include <string>
#include <unordered_map>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/dawn/src/tint/reader/wgsl/lexer.h b/src/3rdparty/chromium/third_party/dawn/src/tint/reader/wgsl/lexer.h
index 8e0306b6a..0fc0cc2b0 100644
--- a/src/3rdparty/chromium/third_party/dawn/src/tint/reader/wgsl/lexer.h
+++ b/src/3rdparty/chromium/third_party/dawn/src/tint/reader/wgsl/lexer.h
@@ -15,6 +15,7 @@
#ifndef SRC_TINT_READER_WGSL_LEXER_H_
#define SRC_TINT_READER_WGSL_LEXER_H_
+#include <cstdint>
#include <string>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/dawn/src/tint/reader/wgsl/token.h b/src/3rdparty/chromium/third_party/dawn/src/tint/reader/wgsl/token.h
index 222f28ef8..335c4c396 100644
--- a/src/3rdparty/chromium/third_party/dawn/src/tint/reader/wgsl/token.h
+++ b/src/3rdparty/chromium/third_party/dawn/src/tint/reader/wgsl/token.h
@@ -15,6 +15,7 @@
#ifndef SRC_TINT_READER_WGSL_TOKEN_H_
#define SRC_TINT_READER_WGSL_TOKEN_H_
+#include <cstdint>
#include <string>
#include <string_view>
#include <variant>
diff --git a/src/3rdparty/chromium/third_party/dawn/src/tint/writer/spirv/operand.h b/src/3rdparty/chromium/third_party/dawn/src/tint/writer/spirv/operand.h
index 0601ca068..ac9dde64e 100644
--- a/src/3rdparty/chromium/third_party/dawn/src/tint/writer/spirv/operand.h
+++ b/src/3rdparty/chromium/third_party/dawn/src/tint/writer/spirv/operand.h
@@ -15,6 +15,7 @@
#ifndef SRC_TINT_WRITER_SPIRV_OPERAND_H_
#define SRC_TINT_WRITER_SPIRV_OPERAND_H_
+#include <cstdint>
#include <cstring>
#include <string>
#include <variant>
diff --git a/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc b/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc
index a3099e15d..2e6f0eea7 100644
--- a/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc
+++ b/src/3rdparty/chromium/third_party/libgav1/src/src/utils/threadpool.cc
@@ -30,6 +30,7 @@
#include <cstddef>
#include <cstdint>
#include <cstring>
+#include <cstdio>
#include <new>
#include <utility>
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h
index 3ff56aa0b..a36388bb8 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/proto_importer_module.h
@@ -21,6 +21,8 @@
#include "perfetto/ext/base/optional.h"
#include "src/trace_processor/importers/common/trace_parser.h"
+#include <cstdint>
+
namespace perfetto {
namespace protos {
diff --git a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
index 0101632c5..3f04a2dd2 100644
--- a/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
+++ b/src/3rdparty/chromium/third_party/skia/src/utils/SkParseColor.cpp
@@ -15,6 +15,10 @@
#include <iterator>
#include <string>
+#include <string.h>
+#include <algorithm>
+#include <iterator>
+
static constexpr const char* gColorNames[] = {
"aliceblue",
"antiquewhite",
diff --git a/src/3rdparty/chromium/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h b/src/3rdparty/chromium/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
index 9e073d4e1..da96f327c 100644
--- a/src/3rdparty/chromium/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
+++ b/src/3rdparty/chromium/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
@@ -105,6 +105,8 @@ Documentation of all members: vk_mem_alloc.h
- [Source repository on GitHub](https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator)
*/
+#include <cstdio>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/portal/xdg_session_details.h b/src/3rdparty/chromium/third_party/webrtc/modules/portal/xdg_session_details.h
index ab52508c2..050229a2f 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/portal/xdg_session_details.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/portal/xdg_session_details.h
@@ -13,6 +13,7 @@
#include <gio/gio.h>
+#include <cstdint>
#include <string>
namespace webrtc {
diff --git a/src/3rdparty/chromium/ui/events/gesture_event_details.h b/src/3rdparty/chromium/ui/events/gesture_event_details.h
index 41ff9906d..1864e9e21 100644
--- a/src/3rdparty/chromium/ui/events/gesture_event_details.h
+++ b/src/3rdparty/chromium/ui/events/gesture_event_details.h
@@ -5,6 +5,7 @@
#ifndef UI_EVENTS_GESTURE_EVENT_DETAILS_H_
#define UI_EVENTS_GESTURE_EVENT_DETAILS_H_
+#include <cstdint>
#include <string.h>
#include "base/check_op.h"
diff --git a/src/3rdparty/chromium/ui/gfx/geometry/linear_gradient.h b/src/3rdparty/chromium/ui/gfx/geometry/linear_gradient.h
index ab0ce5808..9a9f187bb 100644
--- a/src/3rdparty/chromium/ui/gfx/geometry/linear_gradient.h
+++ b/src/3rdparty/chromium/ui/gfx/geometry/linear_gradient.h
@@ -5,6 +5,7 @@
#ifndef UI_GFX_LINEAR_GRADIENT_H_
#define UI_GFX_LINEAR_GRADIENT_H_
+#include <cstdint>
#include <array>
#include <cstdint>
#include <string>
diff --git a/src/3rdparty/chromium/v8/src/base/macros.h b/src/3rdparty/chromium/v8/src/base/macros.h
index cd5b91f74..a74c0021f 100644
--- a/src/3rdparty/chromium/v8/src/base/macros.h
+++ b/src/3rdparty/chromium/v8/src/base/macros.h
@@ -5,6 +5,7 @@
#ifndef V8_BASE_MACROS_H_
#define V8_BASE_MACROS_H_
+#include <cstdint>
#include <limits>
#include <type_traits>
diff --git a/src/core/browsing_data_remover_delegate_qt.h b/src/core/browsing_data_remover_delegate_qt.h
index a611a710c..67743f52b 100644
--- a/src/core/browsing_data_remover_delegate_qt.h
+++ b/src/core/browsing_data_remover_delegate_qt.h
@@ -8,6 +8,8 @@
#include "content/public/browser/browsing_data_remover_delegate.h"
+#include <cstdint>
+
namespace QtWebEngineCore {
class BrowsingDataRemoverDelegateQt : public content::BrowsingDataRemoverDelegate {

View file

@ -1,45 +0,0 @@
From 65ea28e7204eaeb39588a33cfc2f69c48951aa6a Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Thu, 14 Aug 2025 16:17:41 +0200
Subject: [PATCH] Fix Quick popup window positioning under X11
If the popup window has the Qt::Dialog flag, some window managers may
try to resize and move the popup after it becomes visible. This can lead
to a blinking popup or even worse, it can cause a loop that continuously
moves the popup window.
Replace Qt::Tool flag with Qt::Popup to get rid of the Qt::Dialog flag
but keep popup as popup.
Note on Wayland Qt:Tool is xdg toplevel not a 'popup' neither 'grabbing
popup' and it creates shell surface. This means it will get random
position on the screen.
Note this tricky issue as we already changed that several times both
for widgets and quick due to different reasons (see 1390979a, 2f720836,
58467ed19, 7e7dd2625, c56169f7a1)
Fixes: QTBUG-140321
Task-number: QTBUG-132794
Task-number: QTBUG-138747
Pick-to: 6.10
Change-Id: I8c3a94519008455fac2d8ab4c3bf34d860e2475b
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
---
.../render_widget_host_view_qt_delegate_quickwindow.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/webenginequick/render_widget_host_view_qt_delegate_quickwindow.cpp b/src/webenginequick/render_widget_host_view_qt_delegate_quickwindow.cpp
index 3ad88ca39aa..95b5e3500b3 100644
--- a/src/webenginequick/render_widget_host_view_qt_delegate_quickwindow.cpp
+++ b/src/webenginequick/render_widget_host_view_qt_delegate_quickwindow.cpp
@@ -31,7 +31,8 @@ RenderWidgetHostViewQtDelegateQuickWindow::RenderWidgetHostViewQtDelegateQuickWi
RenderWidgetHostViewQtDelegateItem *realDelegate, QWindow *parent)
: QQuickWindow(), m_realDelegate(realDelegate), m_virtualParent(nullptr), m_transformed(false)
{
- setFlags(Qt::Tool | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint | Qt::WindowDoesNotAcceptFocus);
+ setFlags(Qt::Popup | Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint
+ | Qt::WindowDoesNotAcceptFocus);
realDelegate->setParentItem(contentItem());
setTransientParent(parent);
}

View file

@ -1,13 +1,13 @@
diff --git a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni b/src/3rdparty/chromium/third_party/webrtc/webrtc.gni
index 5a1c43c..82870d2 100644
index a5da76c..9c5d358 100644
--- a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni
+++ b/src/3rdparty/chromium/third_party/webrtc/webrtc.gni
@@ -150,7 +150,7 @@ declare_args() {
@@ -138,7 +138,7 @@ declare_args() {
rtc_use_pipewire = is_linux && use_sysroot
# Set this to link PipeWire and required libraries directly instead of using the dlopen.
- rtc_link_pipewire = false
+ rtc_link_pipewire = true
# Enable to use the Mozilla internal settings.
build_with_mozilla = false

View file

@ -1,607 +0,0 @@
From 1534a75e57b47d763af8f32eec91bc8471442816 Mon Sep 17 00:00:00 2001
From: Peter Varga <pvarga@inf.u-szeged.hu>
Date: Mon, 20 Oct 2025 10:43:49 +0200
Subject: [PATCH] Move GPU info logging to the GPU thread
Accessing certain GPU information (eg. GPU feature status values) from
the browser thread requires extra API on top of Chromium, such as
content::GpuChildThread::gpu_channel_manager().
This change moves the logging to the GPU thread, allowing use of
existing APIs like content::GpuDataManager::GetFeatureStatus().
Task-number: QTBUG-139335
Fixes: QTBUG-142497
Fixes: QTBUG-142720
Change-Id: I4e4471a78258a1502ec0e11683cae3936e170ce1
Reviewed-by: Moss Heim <moss.heim@qt.io>
(cherry picked from commit 0b65b0754d1534280acc3fe48be61127ce24ac93)
---
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 64ef09f..eb83a82 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -132,6 +132,7 @@
file_system_access/file_system_access_permission_request_manager_qt.cpp file_system_access/file_system_access_permission_request_manager_qt.h
find_text_helper.cpp find_text_helper.h
global_descriptors_qt.h
+ gpu/content_gpu_client_qt.cpp gpu/content_gpu_client_qt.h
javascript_dialog_controller.cpp javascript_dialog_controller.h javascript_dialog_controller_p.h
javascript_dialog_manager_qt.cpp javascript_dialog_manager_qt.h
login_delegate_qt.cpp login_delegate_qt.h
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index 4d81e39..ed63980 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -4,8 +4,6 @@
#include "content_client_qt.h"
-#include "compositor/compositor.h"
-
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/json/json_string_value_serializer.h"
@@ -13,15 +11,11 @@
#include "base/strings/string_util.h"
#include "base/values.h"
#include "base/version.h"
-#include "content/gpu/gpu_child_thread.h"
#include "content/public/common/cdm_info.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_switches.h"
#include "extensions/buildflags/buildflags.h"
#include "extensions/common/constants.h"
-#include "gpu/config/gpu_feature_info.h"
-#include "gpu/config/gpu_preferences.h"
-#include "gpu/ipc/service/gpu_channel_manager.h"
#include "media/base/media_switches.h"
#include "media/base/video_codecs.h"
#include "media/cdm/supported_audio_codecs.h"
@@ -34,10 +28,8 @@
#include <QCoreApplication>
#include <QFile>
#include <QLibraryInfo>
-#include <QRegularExpression>
#include <QString>
#include <QSysInfo>
-#include <QThread>
#if BUILDFLAG(IS_WIN)
#include "ui/gl/gl_utils.h"
@@ -497,165 +489,4 @@
return origin_trial_policy_.get();
}
-void ContentClientQt::SetGpuInfo(const gpu::GPUInfo &gpu_info)
-{
- base::CommandLine *commandLine = base::CommandLine::ForCurrentProcess();
- const bool isBrowserProcess = !commandLine->HasSwitch(switches::kProcessType);
- const bool isMainThread = QThread::currentThread() == qApp->thread();
-
- // Limit this to the main thread of the browser process for now.
- if (!isBrowserProcess || !isMainThread)
- return;
-
- if (!gpu_info.IsInitialized()) {
- // This is probably not an issue but suspicious.
- qWarning("Failed to initialize GPUInfo.");
- return;
- }
-
- const gpu::GPUInfo::GPUDevice &primary = gpu_info.gpu;
-
- // Do not print the info again if the device hasn't been changed.
- // Change of the device is unexpected: we don't support or implement fallback yet.
- // It is suspicious if the info is logged twice.
- if (m_gpuInfo && m_gpuInfo->gpu.device_string == primary.device_string)
- return;
- m_gpuInfo = gpu_info;
-
- auto *gpuChannelManager = content::GpuChildThread::instance()->gpu_channel_manager();
- const gpu::GpuFeatureStatus gpuCompositingStatus =
- gpuChannelManager->gpu_feature_info()
- .status_values[gpu::GPU_FEATURE_TYPE_ACCELERATED_GL];
-
-#if BUILDFLAG(IS_OZONE)
- if (gpuCompositingStatus == gpu::kGpuFeatureStatusEnabled) {
- // See entry 3 in //gpu/config/software_rendering_list.json
- QRegularExpression filter(u"software|llvmpipe|softpipe"_s,
- QRegularExpression::CaseInsensitiveOption);
- if (filter.match(QLatin1StringView(gpu_info.gl_renderer)).hasMatch()) {
- qWarning("Hardware rendering is enabled but it is not supported with Mesa software "
- "rasterizer. Expect troubles.");
-
- if (gpuChannelManager->gpu_preferences().ignore_gpu_blocklist)
- qWarning("Rendering may fail because --ignore-gpu-blocklist is set.");
- }
- }
-#endif
-
- if (Q_LIKELY(!lcWebEngineCompositor().isDebugEnabled()))
- return;
-
- auto deviceToString = [](const gpu::GPUInfo::GPUDevice &device) -> QString {
- if (device.vendor_id == 0x0)
- return "Disabled"_L1;
-
- QString log;
-
- // TODO: Factor vendor translation out from QtWebEngineCore::GPUInfo.
- // Only name the most common desktop GPU hardware vendors for now.
- switch (device.vendor_id) {
- case 0x1002:
- log += "AMD"_L1;
- break;
- case 0x10DE:
- log += "Nvidia"_L1;
- break;
- case 0x8086:
- log += "Intel"_L1;
- break;
- default:
- log += "vendor id: 0x"_L1 + QString::number(device.vendor_id, 16);
- }
-
- log += ", device id: 0x"_L1 + QString::number(device.device_id, 16);
-
- if (!device.driver_vendor.empty()) {
- log += ", driver: "_L1 + QLatin1StringView(device.driver_vendor) + u' '
- + QLatin1StringView(device.driver_version);
- }
- log += ", system device id: 0x"_L1 + QString::number(device.system_device_id, 16);
-
- log += ", preference: "_L1;
- switch (device.gpu_preference) {
- case gl::GpuPreference::kNone:
- log += "None"_L1;
- break;
- case gl::GpuPreference::kDefault:
- log += "Default"_L1;
- break;
- case gl::GpuPreference::kLowPower:
- log += "LowPower"_L1;
- break;
- case gl::GpuPreference::kHighPerformance:
- log += "HighPerformance"_L1;
- break;
- }
-
- log += ", active: "_L1 + (device.active ? "yes"_L1 : "no"_L1);
- return log;
- };
-
- QString log;
-
- log = "GPU Compositing: ";
- switch (gpuCompositingStatus) {
- case gpu::kGpuFeatureStatusEnabled:
- log += "Enabled"_L1;
- break;
- case gpu::kGpuFeatureStatusBlocklisted:
- log += "Blocklisted"_L1;
- break;
- case gpu::kGpuFeatureStatusDisabled:
- log += "Disabled"_L1;
- break;
- case gpu::kGpuFeatureStatusSoftware:
- log += "Software"_L1;
- break;
- case gpu::kGpuFeatureStatusUndefined:
- log += "Undefined"_L1;
- break;
- case gpu::kGpuFeatureStatusMax:
- log += "Max"_L1;
- break;
- }
- qCDebug(lcWebEngineCompositor, "%ls", qUtf16Printable(log));
-
- if (gpu_info.gl_vendor.empty() || gpu_info.gl_vendor == "Disabled") {
- log = "ANGLE is disabled:\n"_L1;
- log += " GL Renderer: "_L1 + QLatin1StringView(gpu_info.gl_renderer) + u'\n';
- log += " Software Renderer: "_L1 + (primary.IsSoftwareRenderer() ? "yes"_L1 : "no"_L1)
- + u'\n';
- log += " Primary GPU: "_L1 + deviceToString(primary) + u'\n';
- } else {
- log = QLatin1StringView(gpu_info.display_type) + " display is initialized:\n"_L1;
- log += " GL Renderer: "_L1 + QLatin1StringView(gpu_info.gl_renderer) + u'\n';
- log += " "_L1 + QString::number(gpu_info.GpuCount()) + " GPU(s) detected:\n"_L1;
- log += " "_L1 + deviceToString(primary) + u'\n';
- for (auto &secondary : gpu_info.secondary_gpus)
- log += " "_L1 + deviceToString(secondary) + u'\n';
-
- log += " NVIDIA Optimus: "_L1 + (gpu_info.optimus ? "enabled"_L1 : "disabled"_L1) + u'\n';
- log += " AMD Switchable: "_L1 + (gpu_info.amd_switchable ? "enabled"_L1 : "disabled"_L1);
- }
-
- qCDebug(lcWebEngineCompositor, "%ls", qUtf16Printable(log));
-
-#if BUILDFLAG(IS_WIN)
- log = "Windows specific driver information:\n"_L1;
-
- log += " Direct Composition: "_L1;
- if (gpu_info.overlay_info.direct_composition)
- log += "enabled\n"_L1;
- else if (gl::GetGlWorkarounds().disable_direct_composition)
- log += "disabled by workaround\n"_L1;
- else
- log += "disabled\n"_L1;
-
- log += " Supports Overlays: "_L1
- + (gpu_info.overlay_info.supports_overlays ? "yes"_L1 : "no"_L1) + u'\n';
- log += " Supports D3D Shared Images: "_L1 + (gpu_info.shared_image_d3d ? "yes"_L1 : "no"_L1);
- qCDebug(lcWebEngineCompositor, "%ls", qUtf16Printable(log));
-#endif
-}
-
} // namespace QtWebEngineCore
diff --git a/src/core/content_client_qt.h b/src/core/content_client_qt.h
index 2936c23..d5f9e71 100644
--- a/src/core/content_client_qt.h
+++ b/src/core/content_client_qt.h
@@ -10,11 +10,9 @@
#include "base/synchronization/lock.h"
#include "components/embedder_support/origin_trials/origin_trial_policy_impl.h"
#include "content/public/common/content_client.h"
-#include "gpu/config/gpu_info.h"
#include "ui/base/layout.h"
#include <memory>
-#include <optional>
namespace QtWebEngineCore {
@@ -32,13 +30,11 @@
gfx::Image &GetNativeImageNamed(int resource_id) override;
std::u16string GetLocalizedString(int message_id) override;
blink::OriginTrialPolicy *GetOriginTrialPolicy() override;
- void SetGpuInfo(const gpu::GPUInfo &gpu_info) override;
private:
// Used to lock when |origin_trial_policy_| is initialized.
base::Lock origin_trial_policy_lock_;
std::unique_ptr<embedder_support::OriginTrialPolicyImpl> origin_trial_policy_;
- std::optional<gpu::GPUInfo> m_gpuInfo;
};
} // namespace QtWebEngineCore
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index 6c61c7a..1512f9a 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -194,6 +194,12 @@
return m_browserClient.get();
}
+content::ContentGpuClient *ContentMainDelegateQt::CreateContentGpuClient()
+{
+ m_gpuClient.reset(new ContentGpuClientQt);
+ return m_gpuClient.get();
+}
+
content::ContentRendererClient *ContentMainDelegateQt::CreateContentRendererClient()
{
#if BUILDFLAG(IS_LINUX)
diff --git a/src/core/content_main_delegate_qt.h b/src/core/content_main_delegate_qt.h
index cb320ec..b725d88 100644
--- a/src/core/content_main_delegate_qt.h
+++ b/src/core/content_main_delegate_qt.h
@@ -10,6 +10,7 @@
#include "content_browser_client_qt.h"
#include "content_client_qt.h"
#include "content_utility_client_qt.h"
+#include "gpu/content_gpu_client_qt.h"
namespace QtWebEngineCore {
@@ -23,6 +24,7 @@
content::ContentClient *CreateContentClient() override;
content::ContentBrowserClient* CreateContentBrowserClient() override;
+ content::ContentGpuClient* CreateContentGpuClient() override;
content::ContentRendererClient* CreateContentRendererClient() override;
content::ContentUtilityClient* CreateContentUtilityClient() override;
std::optional<int> BasicStartupComplete() override;
@@ -30,6 +32,7 @@
private:
ContentClientQt m_contentClient;
std::unique_ptr<ContentBrowserClientQt> m_browserClient;
+ std::unique_ptr<ContentGpuClientQt> m_gpuClient;
std::unique_ptr<ContentUtilityClientQt> m_utilityClient;
};
diff --git a/src/core/gpu/content_gpu_client_qt.cpp b/src/core/gpu/content_gpu_client_qt.cpp
new file mode 100644
index 0000000..2cb6592
--- /dev/null
+++ b/src/core/gpu/content_gpu_client_qt.cpp
@@ -0,0 +1,236 @@
+// Copyright (C) 2025 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant reason:default
+
+#include "content_gpu_client_qt.h"
+
+#include "compositor/compositor.h"
+
+#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/gpu_data_manager.h"
+#include "content/public/browser/gpu_data_manager_observer.h"
+#include "gpu/config/gpu_driver_bug_workarounds.h"
+#include "gpu/config/gpu_info.h"
+#include "mojo/public/cpp/bindings/binder_map.h"
+
+#include <QtCore/qregularexpression.h>
+#include <QtCore/qstring.h>
+
+#include <optional>
+#include <tuple>
+
+#if BUILDFLAG(IS_WIN)
+#include "ui/gl/gl_utils.h"
+#endif
+
+using namespace Qt::StringLiterals;
+
+namespace QtWebEngineCore {
+
+namespace {
+static inline bool isSameDevice(const gpu::GPUInfo::GPUDevice &d1,
+ const gpu::GPUInfo::GPUDevice &d2)
+{
+ return std::tie(d1.vendor_id, d1.device_id, d1.system_device_id, d1.vendor_string,
+ d1.device_string, d1.driver_vendor, d1.driver_version)
+ == std::tie(d2.vendor_id, d2.device_id, d2.system_device_id, d2.vendor_string,
+ d2.device_string, d2.driver_vendor, d2.driver_version);
+}
+
+static QString gpuDeviceToString(const gpu::GPUInfo::GPUDevice &device)
+{
+ if (device.vendor_id == 0x0)
+ return "Disabled"_L1;
+
+ QString deviceString;
+
+ // TODO: Factor vendor translation out from QtWebEngineCore::GPUInfo.
+ // Only name the most common desktop GPU hardware vendors for now.
+ switch (device.vendor_id) {
+ case 0x1002:
+ deviceString += "AMD"_L1;
+ break;
+ case 0x10DE:
+ deviceString += "Nvidia"_L1;
+ break;
+ case 0x8086:
+ deviceString += "Intel"_L1;
+ break;
+ default:
+ deviceString += "vendor id: 0x"_L1 + QString::number(device.vendor_id, 16);
+ }
+
+ deviceString += ", device id: 0x"_L1 + QString::number(device.device_id, 16);
+
+ if (!device.driver_vendor.empty()) {
+ deviceString += ", driver: "_L1 + QLatin1StringView(device.driver_vendor) + u' '
+ + QLatin1StringView(device.driver_version);
+ }
+ deviceString += ", system device id: 0x"_L1 + QString::number(device.system_device_id, 16);
+
+ deviceString += ", preference: "_L1;
+ switch (device.gpu_preference) {
+ case gl::GpuPreference::kNone:
+ deviceString += "None"_L1;
+ break;
+ case gl::GpuPreference::kDefault:
+ deviceString += "Default"_L1;
+ break;
+ case gl::GpuPreference::kLowPower:
+ deviceString += "LowPower"_L1;
+ break;
+ case gl::GpuPreference::kHighPerformance:
+ deviceString += "HighPerformance"_L1;
+ break;
+ }
+
+ deviceString += ", active: "_L1 + (device.active ? "yes"_L1 : "no"_L1);
+ return deviceString;
+}
+
+static inline const char *gpuFeatureStatusToString(const gpu::GpuFeatureStatus &status)
+{
+ switch (status) {
+ case gpu::kGpuFeatureStatusEnabled:
+ return "Enabled";
+ case gpu::kGpuFeatureStatusBlocklisted:
+ return "Blocklisted";
+ case gpu::kGpuFeatureStatusDisabled:
+ return "Disabled";
+ case gpu::kGpuFeatureStatusSoftware:
+ return "Software";
+ case gpu::kGpuFeatureStatusUndefined:
+ return "Undefined";
+ case gpu::kGpuFeatureStatusMax:
+ return "Max";
+ }
+}
+
+static QString angleInfo(const gpu::GPUInfo &gpuInfo)
+{
+ QString info;
+
+ if (gpuInfo.gl_vendor.empty() || gpuInfo.gl_vendor == "Disabled") {
+ info = "ANGLE is disabled:\n"_L1;
+ info += " GL Renderer: "_L1 + QLatin1StringView(gpuInfo.gl_renderer) + u'\n';
+ info += " Software Renderer: "_L1 + (gpuInfo.gpu.IsSoftwareRenderer() ? "yes"_L1 : "no"_L1)
+ + u'\n';
+ info += " Primary GPU: "_L1 + gpuDeviceToString(gpuInfo.gpu) + u'\n';
+ return info;
+ }
+
+ info = QLatin1StringView(gpuInfo.display_type) + " display is initialized:\n"_L1;
+ info += " GL Renderer: "_L1 + QLatin1StringView(gpuInfo.gl_renderer) + u'\n';
+ info += " "_L1 + QString::number(gpuInfo.GpuCount()) + " GPU(s) detected:\n"_L1;
+ info += " "_L1 + gpuDeviceToString(gpuInfo.gpu) + u'\n';
+ for (auto &secondary : gpuInfo.secondary_gpus)
+ info += " "_L1 + gpuDeviceToString(secondary) + u'\n';
+
+ info += " NVIDIA Optimus: "_L1 + (gpuInfo.optimus ? "enabled"_L1 : "disabled"_L1) + u'\n';
+ info += " AMD Switchable: "_L1 + (gpuInfo.amd_switchable ? "enabled"_L1 : "disabled"_L1);
+
+ return info;
+}
+
+#if BUILDFLAG(IS_WIN)
+static QString windowsInfo(const gpu::GPUInfo &gpuInfo)
+{
+ QString info;
+ info = "Windows specific driver information:\n"_L1;
+
+ info += " Direct Composition: "_L1;
+ if (gpuInfo.overlay_info.direct_composition)
+ info += "enabled\n"_L1;
+ else if (gl::GetGlWorkarounds().disable_direct_composition)
+ info += "disabled by workaround\n"_L1;
+ else
+ info += "disabled\n"_L1;
+
+ info += " Supports Overlays: "_L1
+ + (gpuInfo.overlay_info.supports_overlays ? "yes"_L1 : "no"_L1) + u'\n';
+ info += " Supports D3D Shared Images: "_L1 + (gpuInfo.shared_image_d3d ? "yes"_L1 : "no"_L1);
+ return info;
+}
+#endif
+} // namespace
+
+class GpuObserver : public content::GpuDataManagerObserver
+{
+public:
+ GpuObserver(ContentGpuClientQt *client) : m_client(client)
+ {
+ content::GpuDataManager *manager = content::GpuDataManager::GetInstance();
+ if (manager->IsEssentialGpuInfoAvailable())
+ OnGpuInfoUpdate();
+ }
+
+ ~GpuObserver() { content::GpuDataManager::GetInstance()->RemoveObserver(this); }
+
+ void OnGpuInfoUpdate() override
+ {
+ content::GpuDataManager *manager = content::GpuDataManager::GetInstance();
+ Q_ASSERT(manager->IsEssentialGpuInfoAvailable());
+
+ const gpu::GPUInfo &gpuInfo = manager->GetGPUInfo();
+ Q_ASSERT(gpuInfo.IsInitialized());
+
+ // Avoid logging the info again if the device hasn't changed.
+ // A change in the device is unexpected, as we currently don't support or implement
+ // fallback. Logging the info multiple times may indicate a problem.
+ if (m_gpuInfo && isSameDevice(m_gpuInfo->gpu, gpuInfo.gpu))
+ return;
+ m_gpuInfo = gpuInfo;
+
+ const gpu::GpuFeatureStatus gpuCompositingStatus =
+ manager->GetFeatureStatus(gpu::GPU_FEATURE_TYPE_ACCELERATED_GL);
+ qCDebug(lcWebEngineCompositor, "GPU Compositing: %s",
+ gpuFeatureStatusToString(gpuCompositingStatus));
+
+#if BUILDFLAG(IS_OZONE)
+ if (gpuCompositingStatus == gpu::kGpuFeatureStatusEnabled) {
+ // See entry 3 in //gpu/config/software_rendering_list.json
+ QRegularExpression filter(u"software|llvmpipe|softpipe"_s,
+ QRegularExpression::CaseInsensitiveOption);
+ if (filter.match(QLatin1StringView(gpuInfo.gl_renderer)).hasMatch()) {
+ qWarning("Hardware rendering is enabled but it is not supported with Mesa software "
+ "rasterizer. Expect troubles.");
+
+ if (m_client->gpuPreferences().ignore_gpu_blocklist)
+ qWarning("Rendering may fail because --ignore-gpu-blocklist is set.");
+ }
+ }
+#endif
+
+ qCDebug(lcWebEngineCompositor, "%ls", qUtf16Printable(angleInfo(gpuInfo)));
+#if BUILDFLAG(IS_WIN)
+ qCDebug(lcWebEngineCompositor, "%ls", qUtf16Printable(windowsInfo(gpuInfo)));
+#endif
+ }
+
+private:
+ ContentGpuClientQt *m_client;
+ std::optional<gpu::GPUInfo> m_gpuInfo;
+};
+
+ContentGpuClientQt::ContentGpuClientQt() = default;
+ContentGpuClientQt::~ContentGpuClientQt() = default;
+
+void ContentGpuClientQt::GpuServiceInitialized()
+{
+ // This is expected to be called on the GPU thread.
+ Q_ASSERT(!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
+
+ m_gpuObserver.reset(new GpuObserver(this));
+ content::GpuDataManager::GetInstance()->AddObserver(m_gpuObserver.get());
+}
+
+void ContentGpuClientQt::ExposeInterfacesToBrowser(
+ const gpu::GpuPreferences &gpu_preferences,
+ const gpu::GpuDriverBugWorkarounds &gpu_workarounds, mojo::BinderMap *binders)
+{
+ Q_UNUSED(gpu_workarounds);
+ Q_UNUSED(binders);
+ m_gpuPreferences = gpu_preferences;
+}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/gpu/content_gpu_client_qt.h b/src/core/gpu/content_gpu_client_qt.h
new file mode 100644
index 0000000..51b3a0d
--- /dev/null
+++ b/src/core/gpu/content_gpu_client_qt.h
@@ -0,0 +1,46 @@
+// Copyright (C) 2025 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+// Qt-Security score:significant reason:default
+
+#ifndef CONTENT_GPU_CLIENT_QT_H
+#define CONTENT_GPU_CLIENT_QT_H
+
+#include "content/public/gpu/content_gpu_client.h"
+#include "gpu/config/gpu_preferences.h"
+
+#include <QtCore/qscopedpointer.h>
+
+namespace gpu {
+class GpuDriverBugWorkarounds;
+}
+
+namespace mojo {
+class BinderMap;
+}
+
+namespace QtWebEngineCore {
+
+class GpuObserver;
+
+class ContentGpuClientQt : public content::ContentGpuClient
+{
+public:
+ ContentGpuClientQt();
+ ~ContentGpuClientQt();
+
+ gpu::GpuPreferences gpuPreferences() const { return m_gpuPreferences; }
+
+ // Overridden from content::ContentGpuClient:
+ void GpuServiceInitialized() override;
+ void ExposeInterfacesToBrowser(const gpu::GpuPreferences &gpu_preferences,
+ const gpu::GpuDriverBugWorkarounds &gpu_workarounds,
+ mojo::BinderMap *binders) override;
+
+private:
+ QScopedPointer<GpuObserver> m_gpuObserver;
+ gpu::GpuPreferences m_gpuPreferences;
+};
+
+} // namespace QtWebEngineCore
+
+#endif // CONTENT_GPU_CLIENT_QT_H

View file

@ -1,13 +0,0 @@
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index cc992b4..7b6326f 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -449,6 +449,8 @@ foreach(arch ${archs})
use_bluez=false
is_cfi=false
use_ozone=true
+ media_use_openh264=true
+ rtc_use_h264=true
ozone_auto_platforms=false
ozone_platform_headless=false
ozone_platform_external=true

View file

@ -0,0 +1,159 @@
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/BUILD.gn b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/BUILD.gn
index 8e3529974..ca7370599 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/BUILD.gn
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/BUILD.gn
@@ -7,6 +7,7 @@
# be found in the AUTHORS file in the root of the source tree.
import("//third_party/libaom/options.gni")
+import("//tools/generate_stubs/rules.gni")
import("../../webrtc.gni")
rtc_library("encoded_frame") {
@@ -461,6 +462,17 @@ rtc_library("video_coding_utility") {
]
}
+if (rtc_use_h264 && rtc_dlopen_openh264) {
+ # When OpenH264 is not directly linked, use stubs to allow for dlopening of
+ # the binary.
+ generate_stubs("openh264_stubs") {
+ configs = [ "../../:common_config" ]
+ extra_header = "codecs/h264/openh264_stub_header.fragment"
+ output_name = "codecs/h264/openh264_stubs"
+ sigs = [ "codecs/h264/openh264.sigs" ]
+ }
+}
+
rtc_library("webrtc_h264") {
visibility = [ "*" ]
sources = [
@@ -507,10 +519,15 @@ rtc_library("webrtc_h264") {
]
if (rtc_use_h264) {
- deps += [
- "//third_party/ffmpeg",
- "//third_party/openh264:encoder",
- ]
+ deps += [ "//third_party/ffmpeg" ]
+
+ if (rtc_dlopen_openh264) {
+ defines = [ "WEBRTC_DLOPEN_OPENH264" ]
+ deps += [ ":openh264_stubs" ]
+ } else {
+ deps += [ "//third_party/openh264:encoder" ]
+ }
+
if (!build_with_mozilla) {
deps += [ "../../media:rtc_media_base" ]
}
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
index b6023ac50..228486870 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/h264_encoder_impl.cc
@@ -39,10 +39,22 @@
#include "third_party/openh264/src/codec/api/wels/codec_def.h"
#include "third_party/openh264/src/codec/api/wels/codec_ver.h"
+#if defined(WEBRTC_DLOPEN_OPENH264)
+#include "modules/video_coding/codecs/h264/openh264_stubs.h"
+#endif // defined(WEBRTC_DLOPEN_OPENH264)
+
namespace webrtc {
namespace {
+#if defined(WEBRTC_DLOPEN_OPENH264)
+using third_party_webrtc_modules_video_coding_codecs_h264::InitializeStubs;
+using third_party_webrtc_modules_video_coding_codecs_h264::kModuleOpenh264;
+using third_party_webrtc_modules_video_coding_codecs_h264::StubPathMap;
+
+static constexpr char kOpenH264Lib[] = "libopenh264.so.7";
+#endif
+
const bool kOpenH264EncoderDetailedLogging = false;
// QP scaling thresholds.
@@ -198,6 +210,15 @@ H264EncoderImpl::~H264EncoderImpl() {
int32_t H264EncoderImpl::InitEncode(const VideoCodec* inst,
const VideoEncoder::Settings& settings) {
+#if defined(WEBRTC_DLOPEN_OPENH264)
+ StubPathMap paths;
+ paths[kModuleOpenh264].push_back(kOpenH264Lib);
+
+ static bool result = InitializeStubs(paths);
+ if (!result)
+ return WEBRTC_VIDEO_CODEC_UNINITIALIZED;
+#endif
+
ReportInit();
if (!inst || inst->codecType != kVideoCodecH264) {
ReportError();
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/openh264.sigs b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/openh264.sigs
new file mode 100644
index 000000000..4924f8e9a
--- /dev/null
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/openh264.sigs
@@ -0,0 +1,14 @@
+// Copyright 2022 The WebRTC project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+//------------------------------------------------
+// Functions from OpenH264.
+//------------------------------------------------
+int WelsCreateSVCEncoder(ISVCEncoder **ppEncoder);
+void WelsDestroySVCEncoder(ISVCEncoder *pEncoder);
+int WelsGetDecoderCapability(SDecoderCapability *pDecCapability);
+long WelsCreateDecoder(ISVCDecoder **ppDecoder);
+void WelsDestroyDecoder(ISVCDecoder *pDecoder);
+OpenH264Version WelsGetCodecVersion(void);
+void WelsGetCodecVersionEx(OpenH264Version *pVersion);
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/openh264_stub_header.fragment b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/openh264_stub_header.fragment
new file mode 100644
index 000000000..9bc0a7cbe
--- /dev/null
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/codecs/h264/openh264_stub_header.fragment
@@ -0,0 +1,11 @@
+// The extra include header needed in the generated stub file for defining
+// various OpenH264 types.
+
+extern "C" {
+
+#include "third_party/openh264/src/codec/api/wels/codec_api.h"
+#include "third_party/openh264/src/codec/api/wels/codec_app_def.h"
+#include "third_party/openh264/src/codec/api/wels/codec_def.h"
+#include "third_party/openh264/src/codec/api/wels/codec_ver.h"
+
+}
diff --git a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni b/src/3rdparty/chromium/third_party/webrtc/webrtc.gni
index 8dfcc9d24..0a27fd2d6 100644
--- a/src/3rdparty/chromium/third_party/webrtc/webrtc.gni
+++ b/src/3rdparty/chromium/third_party/webrtc/webrtc.gni
@@ -181,6 +181,10 @@ declare_args() {
rtc_use_h264 =
proprietary_codecs && !is_android && !is_ios && !(is_win && !is_clang)
+ # Allow to use OpenH264 on systems where OpenH264 cannot be installed by
+ # default due to licensing, but can be installed later from other sources.
+ rtc_dlopen_openh264 = false
+
# Enable this flag to make webrtc::Mutex be implemented by absl::Mutex.
rtc_use_absl_mutex = false
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 4153ce180..afaa9dcb1 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -418,6 +418,9 @@ foreach(arch ${archs})
use_udev=true
is_cfi=false
use_ozone=true
+ media_use_openh264=false
+ rtc_use_h264=true
+ rtc_dlopen_openh264=true
ozone_auto_platforms=false
ozone_platform_headless=false
ozone_platform_external=true

View file

@ -1,44 +0,0 @@
# from chromium-130 branch at https://gitlab.raptorengineering.com/raptor-engineering-public/chromium/openpower-patches.git
# do following edits to the patches:
# - third_party/0001-Add-PPC64-support-for-boringssl.patch
# - remove third_party/boringssl/src/crypto/test/abi_test.h
# - crashpad/0001-Implement-support-for-PPC64-on-Linux.patch
# - remove all tests
# - crashpad/minidump/test/*
# - crashpad/snapshot/test/*
# - crashpad/test/*
#
# or use prepare-ppc64.sh script to generate the patchset
#
ppc64le/sandbox/0001-linux-seccomp-bpf-ppc64-glibc-workaround-in-SIGSYS-h.patch
ppc64le/sandbox/0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch
ppc64le/sandbox/0001-services-service_manager-sandbox-linux-Fix-TCGETS-de.patch
ppc64le/sandbox/0001-sandbox-linux-bpf_dsl-Update-syscall-ranges-for-ppc6.patch
ppc64le/sandbox/0001-sandbox-linux-Implement-partial-support-for-ppc64-sy.patch
ppc64le/sandbox/0001-sandbox-linux-Update-IsSyscallAllowed-in-broker_proc.patch
ppc64le/sandbox/0001-sandbox-linux-Update-syscall-helpers-lists-for-ppc64.patch
ppc64le/sandbox/0002-sandbox-linux-bpf_dsl-Modify-seccomp_macros-to-add-s.patch
ppc64le/sandbox/0003-sandbox-linux-system_headers-Update-linux-seccomp-he.patch
ppc64le/sandbox/0004-sandbox-linux-system_headers-Update-linux-signal-hea.patch
ppc64le/sandbox/0005-sandbox-linux-seccomp-bpf-Add-ppc64-syscall-stub.patch
ppc64le/sandbox/0005-sandbox-linux-update-unit-test-for-ppc64.patch
ppc64le/sandbox/0006-sandbox-linux-disable-timedwait-time64-ppc64.patch
ppc64le/sandbox/0007-sandbox-linux-add-ppc64-stat.patch
ppc64le/sandbox/Sandbox-linux-services-credentials.cc-PPC.patch
ppc64le/sandbox/0008-sandbox-fix-ppc64le-glibc234.patch
ppc64le/third_party/0001-third_party-angle-Include-missing-header-cstddef-in-.patch
ppc64le/third_party/0001-Add-PPC64-support-for-boringssl.patch
ppc64le/third_party/0001-third_party-lss-Don-t-look-for-mmap2-on-ppc64.patch
ppc64le/third_party/0002-third_party-lss-kernel-structs.patch
ppc64le/libaom/0001-Add-ppc64-target-to-libaom.patch
ppc64le/libaom/0001-Add-pregenerated-config-for-libaom-on-ppc64.patch
ppc64le/third_party/0002-third_party-libvpx-Remove-bad-ppc64-config.patch
ppc64le/third_party/0002-Add-PPC64-generated-files-for-boringssl.patch
ppc64le/third_party/0003-third_party-libvpx-Add-ppc64-generated-config.patch
ppc64le/crashpad/0001-Implement-support-for-PPC64-on-Linux.patch
ppc64le/fixes/fix-partition-alloc-compile.patch
ppc64le/third_party/use-sysconf-page-size-on-ppc64.patch
ppc64le/third_party/dawn-fix-ppc64le-detection.patch
ppc64le/core/add-ppc64-pthread-stack-size.patch
ppc64le/third_party/0001-third-party-hwy-wrong-include.patch

View file

@ -1,2 +1,2 @@
SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be
SHA512 (qtwebengine-everywhere-src-6.10.1-clean.tar.xz) = c297c030623663dce4943562ca60ac64067702dd96b487f5786fb765c477162ee7d040e6ecb4b820ff9ef162259e1f56bd1054e20e0982fef90fa32857a462c9
SHA512 (qtwebengine-everywhere-src-6.6.2-clean.tar.xz) = d86fab76f7f8d332eadf9e995210cf5e964a59276dc46d51bc0325c6db96e8c53536e6eaf75aad4a6f80dae9a680951dd878e5198ef84b43e3073c411ddaca3d