[arch-commits] Commit in chromium/repos/extra-x86_64 (26 files)

Evangelos Foutras foutrelis at gemini.archlinux.org
Fri Oct 29 05:26:39 UTC 2021


    Date: Friday, October 29, 2021 @ 05:26:39
  Author: foutrelis
Revision: 426786

archrelease: copy trunk to extra-x86_64

Added:
  chromium/repos/extra-x86_64/PKGBUILD
    (from rev 426785, chromium/trunk/PKGBUILD)
  chromium/repos/extra-x86_64/add-a-TODO-about-a-missing-pnacl-flag.patch
    (from rev 426785, chromium/trunk/add-a-TODO-about-a-missing-pnacl-flag.patch)
  chromium/repos/extra-x86_64/chromium-93-ffmpeg-4.4.patch
    (from rev 426785, chromium/trunk/chromium-93-ffmpeg-4.4.patch)
  chromium/repos/extra-x86_64/chromium-94-ffmpeg-roll.patch
    (from rev 426785, chromium/trunk/chromium-94-ffmpeg-roll.patch)
  chromium/repos/extra-x86_64/chromium-95-harfbuzz-3.patch
    (from rev 426785, chromium/trunk/chromium-95-harfbuzz-3.patch)
  chromium/repos/extra-x86_64/maldoca-depend-on-zlib-instead-of-headers-only.patch
    (from rev 426785, chromium/trunk/maldoca-depend-on-zlib-instead-of-headers-only.patch)
  chromium/repos/extra-x86_64/ozone-x11-fix-VA-API.patch
    (from rev 426785, chromium/trunk/ozone-x11-fix-VA-API.patch)
  chromium/repos/extra-x86_64/pipewire-do-not-typecheck-the-portal-session_handle.patch
    (from rev 426785, chromium/trunk/pipewire-do-not-typecheck-the-portal-session_handle.patch)
  chromium/repos/extra-x86_64/replace-blacklist-with-ignorelist.patch
    (from rev 426785, chromium/trunk/replace-blacklist-with-ignorelist.patch)
  chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch
    (from rev 426785, chromium/trunk/sql-make-VirtualCursor-standard-layout-type.patch)
  chromium/repos/extra-x86_64/unexpire-accelerated-video-decode-flag.patch
    (from rev 426785, chromium/trunk/unexpire-accelerated-video-decode-flag.patch)
  chromium/repos/extra-x86_64/use-ffile-compilation-dir.patch
    (from rev 426785, chromium/trunk/use-ffile-compilation-dir.patch)
  chromium/repos/extra-x86_64/use-oauth2-client-switches-as-default.patch
    (from rev 426785, chromium/trunk/use-oauth2-client-switches-as-default.patch)
Deleted:
  chromium/repos/extra-x86_64/PKGBUILD
  chromium/repos/extra-x86_64/add-a-TODO-about-a-missing-pnacl-flag.patch
  chromium/repos/extra-x86_64/chromium-93-ffmpeg-4.4.patch
  chromium/repos/extra-x86_64/chromium-94-ffmpeg-roll.patch
  chromium/repos/extra-x86_64/chromium-95-harfbuzz-3.patch
  chromium/repos/extra-x86_64/maldoca-depend-on-zlib-instead-of-headers-only.patch
  chromium/repos/extra-x86_64/ozone-x11-fix-VA-API.patch
  chromium/repos/extra-x86_64/pipewire-do-not-typecheck-the-portal-session_handle.patch
  chromium/repos/extra-x86_64/replace-blacklist-with-ignorelist.patch
  chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch
  chromium/repos/extra-x86_64/unexpire-accelerated-video-decode-flag.patch
  chromium/repos/extra-x86_64/use-ffile-compilation-dir.patch
  chromium/repos/extra-x86_64/use-oauth2-client-switches-as-default.patch

-----------------------------------------------------------+
 PKGBUILD                                                  |  564 ++---
 add-a-TODO-about-a-missing-pnacl-flag.patch               |   56 
 chromium-93-ffmpeg-4.4.patch                              |   72 
 chromium-94-ffmpeg-roll.patch                             |   98 
 chromium-95-harfbuzz-3.patch                              |   62 
 maldoca-depend-on-zlib-instead-of-headers-only.patch      |   62 
 ozone-x11-fix-VA-API.patch                                | 1342 ++++++------
 pipewire-do-not-typecheck-the-portal-session_handle.patch |   88 
 replace-blacklist-with-ignorelist.patch                   |  392 +--
 sql-make-VirtualCursor-standard-layout-type.patch         |  476 ++--
 unexpire-accelerated-video-decode-flag.patch              |   22 
 use-ffile-compilation-dir.patch                           |  130 -
 use-oauth2-client-switches-as-default.patch               |   34 
 13 files changed, 1699 insertions(+), 1699 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-10-29 05:26:24 UTC (rev 426785)
+++ PKGBUILD	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,282 +0,0 @@
-# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
-# Contributor: Pierre Schmitz <pierre at archlinux.de>
-# Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
-# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
-
-pkgname=chromium
-pkgver=95.0.4638.54
-pkgrel=2
-_launcher_ver=8
-_gcc_patchset=4
-pkgdesc="A web browser built for speed, simplicity, and security"
-arch=('x86_64')
-url="https://www.chromium.org/Home"
-license=('BSD')
-depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
-         'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva'
-         'desktop-file-utils' 'hicolor-icon-theme')
-makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire'
-             'java-runtime-headless')
-optdepends=('pipewire: WebRTC desktop sharing under Wayland'
-            'kdialog: support for native dialogs in Plasma'
-            'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
-            'kwallet: support for storing passwords in KWallet on Plasma')
-source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
-        https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz
-        https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz
-        maldoca-depend-on-zlib-instead-of-headers-only.patch
-        ozone-x11-fix-VA-API.patch
-        chromium-95-harfbuzz-3.patch
-        replace-blacklist-with-ignorelist.patch
-        add-a-TODO-about-a-missing-pnacl-flag.patch
-        use-ffile-compilation-dir.patch
-        pipewire-do-not-typecheck-the-portal-session_handle.patch
-        sql-make-VirtualCursor-standard-layout-type.patch
-        chromium-93-ffmpeg-4.4.patch
-        chromium-94-ffmpeg-roll.patch
-        unexpire-accelerated-video-decode-flag.patch
-        use-oauth2-client-switches-as-default.patch)
-sha256sums=('3eef88d745e6ddaeaf507358f1510482d6f399cf335061bb1226a5f7120061fd'
-            '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
-            'bc6373f2470a9e6d947a4deaee0612f730112f69552b933c54bb6e60b82dd6f1'
-            '074b32078b9e53fd9b33709ce5785c120eb0346b015a93921897caed4f95f7b6'
-            '3af6dfe5c4e6ed1be52a292c30bc0c447cc8498bb108f7973adb438239961474'
-            'd9002f1e33390c3e770637773c81be6731584b18f68f086e955bcc3f66f4510d'
-            'd3344ba39b8c6ed202334ba7f441c70d81ddf8cdb15af1aa8c16e9a3a75fbb35'
-            'd53da216538f2e741a6e048ed103964a91a98e9a3c10c27fdfa34d4692fdc455'
-            '921010cd8fab5f30be76c68b68c9b39fac9e21f4c4133bb709879592bbdf606e'
-            '1889d890ff512a8b82a0f88972e78c78131177d8034750ff53577dfad99b3e3e'
-            'dd317f85e5abfdcfc89c6f23f4c8edbcdebdd5e083dcec770e5da49ee647d150'
-            '1a9e074f417f8ffd78bcd6874d8e2e74a239905bf662f76a7755fa40dc476b57'
-            '56acb6e743d2ab1ed9f3eb01700ade02521769978d03ac43226dec94659b3ace'
-            '2a97b26c3d6821b15ef4ef1369905c6fa3e9c8da4877eb9af4361452a425290b'
-            'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711')
-
-# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
-# Keys are the names in the above script; values are the dependencies in Arch
-declare -gA _system_libs=(
-  [ffmpeg]=ffmpeg
-  [flac]=flac
-  [fontconfig]=fontconfig
-  [freetype]=freetype2
-  [harfbuzz-ng]=harfbuzz
-  [icu]=icu
-  [libdrm]=
-  [libjpeg]=libjpeg
-  [libpng]=libpng
-  #[libvpx]=libvpx
-  [libwebp]=libwebp
-  [libxml]=libxml2
-  [libxslt]=libxslt
-  [opus]=opus
-  [re2]=re2
-  [snappy]=snappy
-  [zlib]=minizip
-)
-_unwanted_bundled_libs=(
-  $(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/')
-)
-depends+=(${_system_libs[@]})
-
-# Google API keys (see https://www.chromium.org/developers/how-tos/api-keys)
-# Note: These are for Arch Linux use ONLY. For your own distribution, please
-# get your own set of keys.
-#
-# Starting with Chromium 89 (2021-03-02) the OAuth2 credentials have been left
-# out: https://archlinux.org/news/chromium-losing-sync-support-in-early-march/
-_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
-
-prepare() {
-  cd "$srcdir/$pkgname-$pkgver"
-
-  # Allow building against system libraries in official builds
-  sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
-    tools/generate_shim_headers/generate_shim_headers.py
-
-  # https://crbug.com/893950
-  sed -i -e 's/\<xmlMalloc\>/malloc/' -e 's/\<xmlFree\>/free/' \
-    third_party/blink/renderer/core/xml/*.cc \
-    third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \
-    third_party/libxml/chromium/*.cc
-
-  # Use the --oauth2-client-id= and --oauth2-client-secret= switches for
-  # setting GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET at
-  # runtime -- this allows signing into Chromium without baked-in values
-  patch -Np1 -i ../use-oauth2-client-switches-as-default.patch
-
-  # Fix build with older ffmpeg
-  patch -Np1 -i ../chromium-93-ffmpeg-4.4.patch
-
-  # Revert change to custom function av_stream_get_first_dts; will need to
-  # switch to bundled ffmpeg when we're no longer using ffmpeg 4.4 in Arch
-  # Upstream commit that made first_dts internal causing Chromium to add a
-  # custom function: https://github.com/FFmpeg/FFmpeg/commit/591b88e6787c4
-  # https://crbug.com/1251779
-  patch -Rp1 -i ../chromium-94-ffmpeg-roll.patch
-
-  # https://crbug.com/1207478
-  patch -Np0 -i ../unexpire-accelerated-video-decode-flag.patch
-
-  # Upstream fixes
-  patch -Np1 -i ../maldoca-depend-on-zlib-instead-of-headers-only.patch
-  patch -Np1 -i ../ozone-x11-fix-VA-API.patch
-  patch -Np1 -i ../chromium-95-harfbuzz-3.patch
-
-  # Revert transition to -fsanitize-ignorelist (needs newer clang)
-  patch -Rp1 -i ../replace-blacklist-with-ignorelist.patch
-
-  # Revert addition of -ffile-compilation-dir= (needs newer clang)
-  patch -Rp1 -i ../add-a-TODO-about-a-missing-pnacl-flag.patch
-  patch -Rp1 -i ../use-ffile-compilation-dir.patch
-
-  # Fix desktop sharing via Pipewire with xdg-desktop-portal 1.10
-  patch -Np1 -d third_party/webrtc <../pipewire-do-not-typecheck-the-portal-session_handle.patch
-
-  # https://chromium-review.googlesource.com/c/chromium/src/+/2862724
-  patch -Np1 -i ../sql-make-VirtualCursor-standard-layout-type.patch
-
-  # Fixes for building with libstdc++ instead of libc++
-  patch -Np1 -i ../patches/chromium-95-quiche-include.patch
-
-  # Link to system tools required by the build
-  mkdir -p third_party/node/linux/node-linux-x64/bin
-  ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
-  ln -s /usr/bin/java third_party/jdk/current/bin/
-
-  # Remove bundled libraries for which we will use the system copies; this
-  # *should* do what the remove_bundled_libraries.py script does, with the
-  # added benefit of not having to list all the remaining libraries
-  local _lib
-  for _lib in ${_unwanted_bundled_libs[@]}; do
-    find "third_party/$_lib" -type f \
-      \! -path "third_party/$_lib/chromium/*" \
-      \! -path "third_party/$_lib/google/*" \
-      \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \
-      \! -regex '.*\.\(gn\|gni\|isolate\)' \
-      -delete
-  done
-
-  ./build/linux/unbundle/replace_gn_files.py \
-    --system-libraries "${!_system_libs[@]}"
-}
-
-build() {
-  make -C chromium-launcher-$_launcher_ver
-
-  cd "$srcdir/$pkgname-$pkgver"
-
-  export CC=clang
-  export CXX=clang++
-  export AR=ar
-  export NM=nm
-
-  local _flags=(
-    'custom_toolchain="//build/toolchain/linux/unbundle:default"'
-    'host_toolchain="//build/toolchain/linux/unbundle:default"'
-    'clang_use_chrome_plugins=false'
-    'is_official_build=true' # implies is_cfi=true on x86_64
-    'treat_warnings_as_errors=false'
-    'disable_fieldtrial_testing_config=true'
-    'blink_enable_generated_code_formatting=false'
-    'ffmpeg_branding="Chrome"'
-    'proprietary_codecs=true'
-    'rtc_use_pipewire=true'
-    'link_pulseaudio=true'
-    'use_gnome_keyring=false'
-    'use_sysroot=false'
-    'use_custom_libcxx=false'
-    'enable_hangout_services_extension=true'
-    'enable_widevine=true'
-    'enable_nacl=false'
-    "google_api_key=\"$_google_api_key\""
-  )
-
-  if [[ -n ${_system_libs[icu]+set} ]]; then
-    _flags+=('icu_use_data_file=false')
-  fi
-
-  if check_option strip y; then
-    _flags+=('symbol_level=0')
-  fi
-
-  # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
-  CFLAGS+='   -Wno-builtin-macro-redefined'
-  CXXFLAGS+=' -Wno-builtin-macro-redefined'
-  CPPFLAGS+=' -D__DATE__=  -D__TIME__=  -D__TIMESTAMP__='
-
-  # Do not warn about unknown warning options
-  CFLAGS+='   -Wno-unknown-warning-option'
-  CXXFLAGS+=' -Wno-unknown-warning-option'
-
-  gn gen out/Release --args="${_flags[*]}"
-  ninja -C out/Release chrome chrome_sandbox chromedriver
-}
-
-package() {
-  cd chromium-launcher-$_launcher_ver
-  make PREFIX=/usr DESTDIR="$pkgdir" install
-  install -Dm644 LICENSE \
-    "$pkgdir/usr/share/licenses/chromium/LICENSE.launcher"
-
-  cd "$srcdir/$pkgname-$pkgver"
-
-  install -D out/Release/chrome "$pkgdir/usr/lib/chromium/chromium"
-  install -Dm4755 out/Release/chrome_sandbox "$pkgdir/usr/lib/chromium/chrome-sandbox"
-  ln -s /usr/lib/chromium/chromedriver "$pkgdir/usr/bin/chromedriver"
-
-  install -Dm644 chrome/installer/linux/common/desktop.template \
-    "$pkgdir/usr/share/applications/chromium.desktop"
-  install -Dm644 chrome/app/resources/manpage.1.in \
-    "$pkgdir/usr/share/man/man1/chromium.1"
-  sed -i \
-    -e 's/@@MENUNAME@@/Chromium/g' \
-    -e 's/@@PACKAGE@@/chromium/g' \
-    -e 's/@@USR_BIN_SYMLINK_NAME@@/chromium/g' \
-    "$pkgdir/usr/share/applications/chromium.desktop" \
-    "$pkgdir/usr/share/man/man1/chromium.1"
-
-  install -Dm644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \
-    "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
-  sed -ni \
-    -e 's/chromium-browser\.desktop/chromium.desktop/' \
-    -e '/<update_contact>/d' \
-    -e '/<p>/N;/<p>\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \
-    -e '/^<?xml/,$p' \
-    "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
-
-  local toplevel_files=(
-    chrome_100_percent.pak
-    chrome_200_percent.pak
-    resources.pak
-    v8_context_snapshot.bin
-
-    # ANGLE
-    libEGL.so
-    libGLESv2.so
-
-    chromedriver
-    chrome_crashpad_handler
-  )
-
-  if [[ -z ${_system_libs[icu]+set} ]]; then
-    toplevel_files+=(icudtl.dat)
-  fi
-
-  cp "${toplevel_files[@]/#/out/Release/}" "$pkgdir/usr/lib/chromium/"
-  install -Dm644 -t "$pkgdir/usr/lib/chromium/locales" out/Release/locales/*.pak
-  install -Dm755 -t "$pkgdir/usr/lib/chromium/swiftshader" out/Release/swiftshader/*.so
-
-  for size in 24 48 64 128 256; do
-    install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \
-      "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
-  done
-
-  for size in 16 32; do
-    install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
-      "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
-  done
-
-  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/chromium/LICENSE"
-}
-
-# vim:set ts=2 sw=2 et:

Copied: chromium/repos/extra-x86_64/PKGBUILD (from rev 426785, chromium/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,282 @@
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Pierre Schmitz <pierre at archlinux.de>
+# Contributor: Jan "heftig" Steffens <jan.steffens at gmail.com>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+
+pkgname=chromium
+pkgver=95.0.4638.69
+pkgrel=1
+_launcher_ver=8
+_gcc_patchset=4
+pkgdesc="A web browser built for speed, simplicity, and security"
+arch=('x86_64')
+url="https://www.chromium.org/Home"
+license=('BSD')
+depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
+         'ttf-liberation' 'systemd' 'dbus' 'libpulse' 'pciutils' 'libva'
+         'desktop-file-utils' 'hicolor-icon-theme')
+makedepends=('python' 'gn' 'ninja' 'clang' 'lld' 'gperf' 'nodejs' 'pipewire'
+             'java-runtime-headless')
+optdepends=('pipewire: WebRTC desktop sharing under Wayland'
+            'kdialog: support for native dialogs in Plasma'
+            'org.freedesktop.secrets: password storage backend on GNOME / Xfce'
+            'kwallet: support for storing passwords in KWallet on Plasma')
+source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
+        https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver/chromium-launcher-$_launcher_ver.tar.gz
+        https://github.com/stha09/chromium-patches/releases/download/chromium-${pkgver%%.*}-patchset-$_gcc_patchset/chromium-${pkgver%%.*}-patchset-$_gcc_patchset.tar.xz
+        maldoca-depend-on-zlib-instead-of-headers-only.patch
+        ozone-x11-fix-VA-API.patch
+        chromium-95-harfbuzz-3.patch
+        replace-blacklist-with-ignorelist.patch
+        add-a-TODO-about-a-missing-pnacl-flag.patch
+        use-ffile-compilation-dir.patch
+        pipewire-do-not-typecheck-the-portal-session_handle.patch
+        sql-make-VirtualCursor-standard-layout-type.patch
+        chromium-93-ffmpeg-4.4.patch
+        chromium-94-ffmpeg-roll.patch
+        unexpire-accelerated-video-decode-flag.patch
+        use-oauth2-client-switches-as-default.patch)
+sha256sums=('38a37d737c6c9a7198402ca614746b2dbb7abbb793bb2cb02dc796b62a22efe7'
+            '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a'
+            'bc6373f2470a9e6d947a4deaee0612f730112f69552b933c54bb6e60b82dd6f1'
+            '074b32078b9e53fd9b33709ce5785c120eb0346b015a93921897caed4f95f7b6'
+            '3af6dfe5c4e6ed1be52a292c30bc0c447cc8498bb108f7973adb438239961474'
+            'd9002f1e33390c3e770637773c81be6731584b18f68f086e955bcc3f66f4510d'
+            'd3344ba39b8c6ed202334ba7f441c70d81ddf8cdb15af1aa8c16e9a3a75fbb35'
+            'd53da216538f2e741a6e048ed103964a91a98e9a3c10c27fdfa34d4692fdc455'
+            '921010cd8fab5f30be76c68b68c9b39fac9e21f4c4133bb709879592bbdf606e'
+            '1889d890ff512a8b82a0f88972e78c78131177d8034750ff53577dfad99b3e3e'
+            'dd317f85e5abfdcfc89c6f23f4c8edbcdebdd5e083dcec770e5da49ee647d150'
+            '1a9e074f417f8ffd78bcd6874d8e2e74a239905bf662f76a7755fa40dc476b57'
+            '56acb6e743d2ab1ed9f3eb01700ade02521769978d03ac43226dec94659b3ace'
+            '2a97b26c3d6821b15ef4ef1369905c6fa3e9c8da4877eb9af4361452a425290b'
+            'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711')
+
+# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
+# Keys are the names in the above script; values are the dependencies in Arch
+declare -gA _system_libs=(
+  [ffmpeg]=ffmpeg
+  [flac]=flac
+  [fontconfig]=fontconfig
+  [freetype]=freetype2
+  [harfbuzz-ng]=harfbuzz
+  [icu]=icu
+  [libdrm]=
+  [libjpeg]=libjpeg
+  [libpng]=libpng
+  #[libvpx]=libvpx
+  [libwebp]=libwebp
+  [libxml]=libxml2
+  [libxslt]=libxslt
+  [opus]=opus
+  [re2]=re2
+  [snappy]=snappy
+  [zlib]=minizip
+)
+_unwanted_bundled_libs=(
+  $(printf "%s\n" ${!_system_libs[@]} | sed 's/^libjpeg$/&_turbo/')
+)
+depends+=(${_system_libs[@]})
+
+# Google API keys (see https://www.chromium.org/developers/how-tos/api-keys)
+# Note: These are for Arch Linux use ONLY. For your own distribution, please
+# get your own set of keys.
+#
+# Starting with Chromium 89 (2021-03-02) the OAuth2 credentials have been left
+# out: https://archlinux.org/news/chromium-losing-sync-support-in-early-march/
+_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
+
+prepare() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  # Allow building against system libraries in official builds
+  sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \
+    tools/generate_shim_headers/generate_shim_headers.py
+
+  # https://crbug.com/893950
+  sed -i -e 's/\<xmlMalloc\>/malloc/' -e 's/\<xmlFree\>/free/' \
+    third_party/blink/renderer/core/xml/*.cc \
+    third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \
+    third_party/libxml/chromium/*.cc
+
+  # Use the --oauth2-client-id= and --oauth2-client-secret= switches for
+  # setting GOOGLE_DEFAULT_CLIENT_ID and GOOGLE_DEFAULT_CLIENT_SECRET at
+  # runtime -- this allows signing into Chromium without baked-in values
+  patch -Np1 -i ../use-oauth2-client-switches-as-default.patch
+
+  # Fix build with older ffmpeg
+  patch -Np1 -i ../chromium-93-ffmpeg-4.4.patch
+
+  # Revert change to custom function av_stream_get_first_dts; will need to
+  # switch to bundled ffmpeg when we're no longer using ffmpeg 4.4 in Arch
+  # Upstream commit that made first_dts internal causing Chromium to add a
+  # custom function: https://github.com/FFmpeg/FFmpeg/commit/591b88e6787c4
+  # https://crbug.com/1251779
+  patch -Rp1 -i ../chromium-94-ffmpeg-roll.patch
+
+  # https://crbug.com/1207478
+  patch -Np0 -i ../unexpire-accelerated-video-decode-flag.patch
+
+  # Upstream fixes
+  patch -Np1 -i ../maldoca-depend-on-zlib-instead-of-headers-only.patch
+  patch -Np1 -i ../ozone-x11-fix-VA-API.patch
+  patch -Np1 -i ../chromium-95-harfbuzz-3.patch
+
+  # Revert transition to -fsanitize-ignorelist (needs newer clang)
+  patch -Rp1 -i ../replace-blacklist-with-ignorelist.patch
+
+  # Revert addition of -ffile-compilation-dir= (needs newer clang)
+  patch -Rp1 -i ../add-a-TODO-about-a-missing-pnacl-flag.patch
+  patch -Rp1 -i ../use-ffile-compilation-dir.patch
+
+  # Fix desktop sharing via Pipewire with xdg-desktop-portal 1.10
+  patch -Np1 -d third_party/webrtc <../pipewire-do-not-typecheck-the-portal-session_handle.patch
+
+  # https://chromium-review.googlesource.com/c/chromium/src/+/2862724
+  patch -Np1 -i ../sql-make-VirtualCursor-standard-layout-type.patch
+
+  # Fixes for building with libstdc++ instead of libc++
+  patch -Np1 -i ../patches/chromium-95-quiche-include.patch
+
+  # Link to system tools required by the build
+  mkdir -p third_party/node/linux/node-linux-x64/bin
+  ln -s /usr/bin/node third_party/node/linux/node-linux-x64/bin/
+  ln -s /usr/bin/java third_party/jdk/current/bin/
+
+  # Remove bundled libraries for which we will use the system copies; this
+  # *should* do what the remove_bundled_libraries.py script does, with the
+  # added benefit of not having to list all the remaining libraries
+  local _lib
+  for _lib in ${_unwanted_bundled_libs[@]}; do
+    find "third_party/$_lib" -type f \
+      \! -path "third_party/$_lib/chromium/*" \
+      \! -path "third_party/$_lib/google/*" \
+      \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \
+      \! -regex '.*\.\(gn\|gni\|isolate\)' \
+      -delete
+  done
+
+  ./build/linux/unbundle/replace_gn_files.py \
+    --system-libraries "${!_system_libs[@]}"
+}
+
+build() {
+  make -C chromium-launcher-$_launcher_ver
+
+  cd "$srcdir/$pkgname-$pkgver"
+
+  export CC=clang
+  export CXX=clang++
+  export AR=ar
+  export NM=nm
+
+  local _flags=(
+    'custom_toolchain="//build/toolchain/linux/unbundle:default"'
+    'host_toolchain="//build/toolchain/linux/unbundle:default"'
+    'clang_use_chrome_plugins=false'
+    'is_official_build=true' # implies is_cfi=true on x86_64
+    'treat_warnings_as_errors=false'
+    'disable_fieldtrial_testing_config=true'
+    'blink_enable_generated_code_formatting=false'
+    'ffmpeg_branding="Chrome"'
+    'proprietary_codecs=true'
+    'rtc_use_pipewire=true'
+    'link_pulseaudio=true'
+    'use_gnome_keyring=false'
+    'use_sysroot=false'
+    'use_custom_libcxx=false'
+    'enable_hangout_services_extension=true'
+    'enable_widevine=true'
+    'enable_nacl=false'
+    "google_api_key=\"$_google_api_key\""
+  )
+
+  if [[ -n ${_system_libs[icu]+set} ]]; then
+    _flags+=('icu_use_data_file=false')
+  fi
+
+  if check_option strip y; then
+    _flags+=('symbol_level=0')
+  fi
+
+  # Facilitate deterministic builds (taken from build/config/compiler/BUILD.gn)
+  CFLAGS+='   -Wno-builtin-macro-redefined'
+  CXXFLAGS+=' -Wno-builtin-macro-redefined'
+  CPPFLAGS+=' -D__DATE__=  -D__TIME__=  -D__TIMESTAMP__='
+
+  # Do not warn about unknown warning options
+  CFLAGS+='   -Wno-unknown-warning-option'
+  CXXFLAGS+=' -Wno-unknown-warning-option'
+
+  gn gen out/Release --args="${_flags[*]}"
+  ninja -C out/Release chrome chrome_sandbox chromedriver
+}
+
+package() {
+  cd chromium-launcher-$_launcher_ver
+  make PREFIX=/usr DESTDIR="$pkgdir" install
+  install -Dm644 LICENSE \
+    "$pkgdir/usr/share/licenses/chromium/LICENSE.launcher"
+
+  cd "$srcdir/$pkgname-$pkgver"
+
+  install -D out/Release/chrome "$pkgdir/usr/lib/chromium/chromium"
+  install -Dm4755 out/Release/chrome_sandbox "$pkgdir/usr/lib/chromium/chrome-sandbox"
+  ln -s /usr/lib/chromium/chromedriver "$pkgdir/usr/bin/chromedriver"
+
+  install -Dm644 chrome/installer/linux/common/desktop.template \
+    "$pkgdir/usr/share/applications/chromium.desktop"
+  install -Dm644 chrome/app/resources/manpage.1.in \
+    "$pkgdir/usr/share/man/man1/chromium.1"
+  sed -i \
+    -e 's/@@MENUNAME@@/Chromium/g' \
+    -e 's/@@PACKAGE@@/chromium/g' \
+    -e 's/@@USR_BIN_SYMLINK_NAME@@/chromium/g' \
+    "$pkgdir/usr/share/applications/chromium.desktop" \
+    "$pkgdir/usr/share/man/man1/chromium.1"
+
+  install -Dm644 chrome/installer/linux/common/chromium-browser/chromium-browser.appdata.xml \
+    "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
+  sed -ni \
+    -e 's/chromium-browser\.desktop/chromium.desktop/' \
+    -e '/<update_contact>/d' \
+    -e '/<p>/N;/<p>\n.*\(We invite\|Chromium supports Vorbis\)/,/<\/p>/d' \
+    -e '/^<?xml/,$p' \
+    "$pkgdir/usr/share/metainfo/chromium.appdata.xml"
+
+  local toplevel_files=(
+    chrome_100_percent.pak
+    chrome_200_percent.pak
+    resources.pak
+    v8_context_snapshot.bin
+
+    # ANGLE
+    libEGL.so
+    libGLESv2.so
+
+    chromedriver
+    chrome_crashpad_handler
+  )
+
+  if [[ -z ${_system_libs[icu]+set} ]]; then
+    toplevel_files+=(icudtl.dat)
+  fi
+
+  cp "${toplevel_files[@]/#/out/Release/}" "$pkgdir/usr/lib/chromium/"
+  install -Dm644 -t "$pkgdir/usr/lib/chromium/locales" out/Release/locales/*.pak
+  install -Dm755 -t "$pkgdir/usr/lib/chromium/swiftshader" out/Release/swiftshader/*.so
+
+  for size in 24 48 64 128 256; do
+    install -Dm644 "chrome/app/theme/chromium/product_logo_$size.png" \
+      "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
+  done
+
+  for size in 16 32; do
+    install -Dm644 "chrome/app/theme/default_100_percent/chromium/product_logo_$size.png" \
+      "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/chromium.png"
+  done
+
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/chromium/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: add-a-TODO-about-a-missing-pnacl-flag.patch
===================================================================
--- add-a-TODO-about-a-missing-pnacl-flag.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ add-a-TODO-about-a-missing-pnacl-flag.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,28 +0,0 @@
-From 7a23987acb698c2934958cb42a5e7b1cd73fe142 Mon Sep 17 00:00:00 2001
-From: Nico Weber <thakis at chromium.org>
-Date: Tue, 20 Jul 2021 21:54:09 +0000
-Subject: [PATCH] build: Add a TODO about a missing pnacl flag
-
-Change-Id: I1700d185a23afe4120e14c755782450b1bf89289
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3041785
-Commit-Queue: Nico Weber <thakis at chromium.org>
-Commit-Queue: Hans Wennborg <hans at chromium.org>
-Auto-Submit: Nico Weber <thakis at chromium.org>
-Reviewed-by: Hans Wennborg <hans at chromium.org>
-Cr-Commit-Position: refs/heads/master@{#903659}
----
- build/config/compiler/BUILD.gn | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
-index b6e095b705..ef6d1dfc12 100644
---- a/build/config/compiler/BUILD.gn
-+++ b/build/config/compiler/BUILD.gn
-@@ -1217,6 +1217,7 @@ config("compiler_deterministic") {
-     # we build same files with same compile flag.
-     # Other paths are already given in relative, no need to normalize them.
-     if (is_nacl) {
-+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
-       cflags += [
-         "-Xclang",
-         "-fdebug-compilation-dir",

Copied: chromium/repos/extra-x86_64/add-a-TODO-about-a-missing-pnacl-flag.patch (from rev 426785, chromium/trunk/add-a-TODO-about-a-missing-pnacl-flag.patch)
===================================================================
--- add-a-TODO-about-a-missing-pnacl-flag.patch	                        (rev 0)
+++ add-a-TODO-about-a-missing-pnacl-flag.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,28 @@
+From 7a23987acb698c2934958cb42a5e7b1cd73fe142 Mon Sep 17 00:00:00 2001
+From: Nico Weber <thakis at chromium.org>
+Date: Tue, 20 Jul 2021 21:54:09 +0000
+Subject: [PATCH] build: Add a TODO about a missing pnacl flag
+
+Change-Id: I1700d185a23afe4120e14c755782450b1bf89289
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3041785
+Commit-Queue: Nico Weber <thakis at chromium.org>
+Commit-Queue: Hans Wennborg <hans at chromium.org>
+Auto-Submit: Nico Weber <thakis at chromium.org>
+Reviewed-by: Hans Wennborg <hans at chromium.org>
+Cr-Commit-Position: refs/heads/master@{#903659}
+---
+ build/config/compiler/BUILD.gn | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
+index b6e095b705..ef6d1dfc12 100644
+--- a/build/config/compiler/BUILD.gn
++++ b/build/config/compiler/BUILD.gn
+@@ -1217,6 +1217,7 @@ config("compiler_deterministic") {
+     # we build same files with same compile flag.
+     # Other paths are already given in relative, no need to normalize them.
+     if (is_nacl) {
++      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+       cflags += [
+         "-Xclang",
+         "-fdebug-compilation-dir",

Deleted: chromium-93-ffmpeg-4.4.patch
===================================================================
--- chromium-93-ffmpeg-4.4.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ chromium-93-ffmpeg-4.4.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,36 +0,0 @@
-diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
-index ac4713b07268..492a9a37d096 100644
---- a/media/filters/ffmpeg_demuxer.cc
-+++ b/media/filters/ffmpeg_demuxer.cc
-@@ -427,11 +427,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
-   scoped_refptr<DecoderBuffer> buffer;
- 
-   if (type() == DemuxerStream::TEXT) {
--    size_t id_size = 0;
-+    int id_size = 0;
-     uint8_t* id_data = av_packet_get_side_data(
-         packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
- 
--    size_t settings_size = 0;
-+    int settings_size = 0;
-     uint8_t* settings_data = av_packet_get_side_data(
-         packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
- 
-@@ -443,7 +443,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
-     buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
-                                      side_data.data(), side_data.size());
-   } else {
--    size_t side_data_size = 0;
-+    int side_data_size = 0;
-     uint8_t* side_data = av_packet_get_side_data(
-         packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
- 
-@@ -504,7 +504,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
-                                        packet->size - data_offset);
-     }
- 
--    size_t skip_samples_size = 0;
-+    int skip_samples_size = 0;
-     const uint32_t* skip_samples_ptr =
-         reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
-             packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));

Copied: chromium/repos/extra-x86_64/chromium-93-ffmpeg-4.4.patch (from rev 426785, chromium/trunk/chromium-93-ffmpeg-4.4.patch)
===================================================================
--- chromium-93-ffmpeg-4.4.patch	                        (rev 0)
+++ chromium-93-ffmpeg-4.4.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,36 @@
+diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
+index ac4713b07268..492a9a37d096 100644
+--- a/media/filters/ffmpeg_demuxer.cc
++++ b/media/filters/ffmpeg_demuxer.cc
+@@ -427,11 +427,11 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+   scoped_refptr<DecoderBuffer> buffer;
+ 
+   if (type() == DemuxerStream::TEXT) {
+-    size_t id_size = 0;
++    int id_size = 0;
+     uint8_t* id_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_WEBVTT_IDENTIFIER, &id_size);
+ 
+-    size_t settings_size = 0;
++    int settings_size = 0;
+     uint8_t* settings_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_WEBVTT_SETTINGS, &settings_size);
+ 
+@@ -443,7 +443,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+     buffer = DecoderBuffer::CopyFrom(packet->data, packet->size,
+                                      side_data.data(), side_data.size());
+   } else {
+-    size_t side_data_size = 0;
++    int side_data_size = 0;
+     uint8_t* side_data = av_packet_get_side_data(
+         packet.get(), AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL, &side_data_size);
+ 
+@@ -504,7 +504,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+                                        packet->size - data_offset);
+     }
+ 
+-    size_t skip_samples_size = 0;
++    int skip_samples_size = 0;
+     const uint32_t* skip_samples_ptr =
+         reinterpret_cast<const uint32_t*>(av_packet_get_side_data(
+             packet.get(), AV_PKT_DATA_SKIP_SAMPLES, &skip_samples_size));

Deleted: chromium-94-ffmpeg-roll.patch
===================================================================
--- chromium-94-ffmpeg-roll.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ chromium-94-ffmpeg-roll.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,49 +0,0 @@
-From b94755e4633045be96ab5e0bdde0db7e16a804bd Mon Sep 17 00:00:00 2001
-From: "liberato at chromium.org" <liberato at chromium.org>
-Date: Fri, 6 Aug 2021 04:25:31 +0000
-Subject: [PATCH] FFmpeg M94 roll.
-
-Contains DEPS update + chromium-side fixes.
-
-Bug: 1227259
-Change-Id: I61c5eaa789ea12c17d0cbcbf837435b9cf32479b
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011889
-Reviewed-by: Thomas Guilbert <tguilbert at chromium.org>
-Commit-Queue: Frank Liberato <liberato at chromium.org>
-Cr-Commit-Position: refs/heads/master@{#909174}
----
- media/ffmpeg/ffmpeg_common.h    | 1 +
- media/filters/ffmpeg_demuxer.cc | 4 ++--
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
-index cede8ac5a7..97d6307e28 100644
---- a/media/ffmpeg/ffmpeg_common.h
-+++ b/media/ffmpeg/ffmpeg_common.h
-@@ -29,6 +29,7 @@ extern "C" {
- #include <libavformat/avformat.h>
- #include <libavformat/avio.h>
- #include <libavutil/avutil.h>
-+#include <libavutil/channel_layout.h>
- #include <libavutil/imgutils.h>
- #include <libavutil/log.h>
- #include <libavutil/mastering_display_metadata.h>
-diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
-index ac4713b072..605001d935 100644
---- a/media/filters/ffmpeg_demuxer.cc
-+++ b/media/filters/ffmpeg_demuxer.cc
-@@ -106,12 +106,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 (stream->first_dts != kNoFFmpegTimestamp &&
-+  if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
-       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, stream->first_dts);
-+        ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
-     if (first_pts < start_time)
-       start_time = first_pts;
-   }

Copied: chromium/repos/extra-x86_64/chromium-94-ffmpeg-roll.patch (from rev 426785, chromium/trunk/chromium-94-ffmpeg-roll.patch)
===================================================================
--- chromium-94-ffmpeg-roll.patch	                        (rev 0)
+++ chromium-94-ffmpeg-roll.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,49 @@
+From b94755e4633045be96ab5e0bdde0db7e16a804bd Mon Sep 17 00:00:00 2001
+From: "liberato at chromium.org" <liberato at chromium.org>
+Date: Fri, 6 Aug 2021 04:25:31 +0000
+Subject: [PATCH] FFmpeg M94 roll.
+
+Contains DEPS update + chromium-side fixes.
+
+Bug: 1227259
+Change-Id: I61c5eaa789ea12c17d0cbcbf837435b9cf32479b
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011889
+Reviewed-by: Thomas Guilbert <tguilbert at chromium.org>
+Commit-Queue: Frank Liberato <liberato at chromium.org>
+Cr-Commit-Position: refs/heads/master@{#909174}
+---
+ media/ffmpeg/ffmpeg_common.h    | 1 +
+ media/filters/ffmpeg_demuxer.cc | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
+index cede8ac5a7..97d6307e28 100644
+--- a/media/ffmpeg/ffmpeg_common.h
++++ b/media/ffmpeg/ffmpeg_common.h
+@@ -29,6 +29,7 @@ extern "C" {
+ #include <libavformat/avformat.h>
+ #include <libavformat/avio.h>
+ #include <libavutil/avutil.h>
++#include <libavutil/channel_layout.h>
+ #include <libavutil/imgutils.h>
+ #include <libavutil/log.h>
+ #include <libavutil/mastering_display_metadata.h>
+diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
+index ac4713b072..605001d935 100644
+--- a/media/filters/ffmpeg_demuxer.cc
++++ b/media/filters/ffmpeg_demuxer.cc
+@@ -106,12 +106,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 (stream->first_dts != kNoFFmpegTimestamp &&
++  if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
+       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, stream->first_dts);
++        ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
+     if (first_pts < start_time)
+       start_time = first_pts;
+   }

Deleted: chromium-95-harfbuzz-3.patch
===================================================================
--- chromium-95-harfbuzz-3.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ chromium-95-harfbuzz-3.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,31 +0,0 @@
-From 9e00e702633c47c590a869bc66b5c2ceec09da50 Mon Sep 17 00:00:00 2001
-From: Dominik Röttsches <drott at chromium.org>
-Date: Tue, 28 Sep 2021 15:31:50 +0000
-Subject: [PATCH] Roll src/third_party/harfbuzz-ng/src/ 6602cbb70..a52c6df38 (80 commits)
-
-Fixed: 1252284
-Change-Id: Ie2ff99da5e41ca97b8881e1bd3e158881f4d5a8e
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3190252
-Commit-Queue: Dominik Röttsches <drott at chromium.org>
-Commit-Queue: Calder Kitagawa <ckitagawa at chromium.org>
-Auto-Submit: Dominik Röttsches <drott at chromium.org>
-Reviewed-by: Calder Kitagawa <ckitagawa at chromium.org>
-Reviewed-by: Anders Hartvoll Ruud <andruud at chromium.org>
-Cr-Commit-Position: refs/heads/main@{#925776}
-
-(only components/paint_preview/common/subset_font.cc)
----
-
-diff --git a/components/paint_preview/common/subset_font.cc b/components/paint_preview/common/subset_font.cc
-index 45daea7b1..43a448e 100644
---- a/components/paint_preview/common/subset_font.cc
-+++ b/components/paint_preview/common/subset_font.cc
-@@ -79,7 +79,7 @@
-   // Retain all variation information for OpenType variation fonts. See:
-   // https://docs.microsoft.com/en-us/typography/opentype/spec/otvaroverview
-   hb_set_t* skip_subset =
--      hb_subset_input_no_subset_tables_set(input.get());  // Owned by |input|.
-+      hb_subset_input_set(input.get(), HB_SUBSET_SETS_NO_SUBSET_TABLE_TAG);
-   hb_set_add(skip_subset, HB_TAG('a', 'v', 'a', 'r'));
-   hb_set_add(skip_subset, HB_TAG('c', 'v', 'a', 'r'));
-   hb_set_add(skip_subset, HB_TAG('f', 'v', 'a', 'r'));

Copied: chromium/repos/extra-x86_64/chromium-95-harfbuzz-3.patch (from rev 426785, chromium/trunk/chromium-95-harfbuzz-3.patch)
===================================================================
--- chromium-95-harfbuzz-3.patch	                        (rev 0)
+++ chromium-95-harfbuzz-3.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,31 @@
+From 9e00e702633c47c590a869bc66b5c2ceec09da50 Mon Sep 17 00:00:00 2001
+From: Dominik Röttsches <drott at chromium.org>
+Date: Tue, 28 Sep 2021 15:31:50 +0000
+Subject: [PATCH] Roll src/third_party/harfbuzz-ng/src/ 6602cbb70..a52c6df38 (80 commits)
+
+Fixed: 1252284
+Change-Id: Ie2ff99da5e41ca97b8881e1bd3e158881f4d5a8e
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3190252
+Commit-Queue: Dominik Röttsches <drott at chromium.org>
+Commit-Queue: Calder Kitagawa <ckitagawa at chromium.org>
+Auto-Submit: Dominik Röttsches <drott at chromium.org>
+Reviewed-by: Calder Kitagawa <ckitagawa at chromium.org>
+Reviewed-by: Anders Hartvoll Ruud <andruud at chromium.org>
+Cr-Commit-Position: refs/heads/main@{#925776}
+
+(only components/paint_preview/common/subset_font.cc)
+---
+
+diff --git a/components/paint_preview/common/subset_font.cc b/components/paint_preview/common/subset_font.cc
+index 45daea7b1..43a448e 100644
+--- a/components/paint_preview/common/subset_font.cc
++++ b/components/paint_preview/common/subset_font.cc
+@@ -79,7 +79,7 @@
+   // Retain all variation information for OpenType variation fonts. See:
+   // https://docs.microsoft.com/en-us/typography/opentype/spec/otvaroverview
+   hb_set_t* skip_subset =
+-      hb_subset_input_no_subset_tables_set(input.get());  // Owned by |input|.
++      hb_subset_input_set(input.get(), HB_SUBSET_SETS_NO_SUBSET_TABLE_TAG);
+   hb_set_add(skip_subset, HB_TAG('a', 'v', 'a', 'r'));
+   hb_set_add(skip_subset, HB_TAG('c', 'v', 'a', 'r'));
+   hb_set_add(skip_subset, HB_TAG('f', 'v', 'a', 'r'));

Deleted: maldoca-depend-on-zlib-instead-of-headers-only.patch
===================================================================
--- maldoca-depend-on-zlib-instead-of-headers-only.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ maldoca-depend-on-zlib-instead-of-headers-only.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,31 +0,0 @@
-From 0aa878b7839141077071db97ba1cd30edf486827 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09 at googlemail.com>
-Date: Wed, 15 Sep 2021 17:14:14 +0000
-Subject: [PATCH] maldoca: depend on zlib instead of headers only
-
-There is no zlib_common_headers target for unbundled zlib
-and in the end code links against zlib static library anyways.
-
-Bug: None
-Change-Id: I50b8bb5b480770b637904de00aecc3a629f09471
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3162976
-Reviewed-by: Daniel Rubery <drubery at chromium.org>
-Commit-Queue: Stephan Hartmann <stha09 at googlemail.com>
-Cr-Commit-Position: refs/heads/main@{#921717}
----
- third_party/maldoca/BUILD.gn | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/third_party/maldoca/BUILD.gn b/third_party/maldoca/BUILD.gn
-index eeab2056b5..29a0a2ca49 100644
---- a/third_party/maldoca/BUILD.gn
-+++ b/third_party/maldoca/BUILD.gn
-@@ -224,7 +224,7 @@ source_set("maldoca-ole") {
-     "//third_party/libxml",
-     "//third_party/protobuf:protobuf_lite",
-     "//third_party/re2",
--    "//third_party/zlib:zlib_common_headers",
-+    "//third_party/zlib:zlib",
-     "//third_party/zlib/google:zip",
-   ]
- 

Copied: chromium/repos/extra-x86_64/maldoca-depend-on-zlib-instead-of-headers-only.patch (from rev 426785, chromium/trunk/maldoca-depend-on-zlib-instead-of-headers-only.patch)
===================================================================
--- maldoca-depend-on-zlib-instead-of-headers-only.patch	                        (rev 0)
+++ maldoca-depend-on-zlib-instead-of-headers-only.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,31 @@
+From 0aa878b7839141077071db97ba1cd30edf486827 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Wed, 15 Sep 2021 17:14:14 +0000
+Subject: [PATCH] maldoca: depend on zlib instead of headers only
+
+There is no zlib_common_headers target for unbundled zlib
+and in the end code links against zlib static library anyways.
+
+Bug: None
+Change-Id: I50b8bb5b480770b637904de00aecc3a629f09471
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3162976
+Reviewed-by: Daniel Rubery <drubery at chromium.org>
+Commit-Queue: Stephan Hartmann <stha09 at googlemail.com>
+Cr-Commit-Position: refs/heads/main@{#921717}
+---
+ third_party/maldoca/BUILD.gn | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/third_party/maldoca/BUILD.gn b/third_party/maldoca/BUILD.gn
+index eeab2056b5..29a0a2ca49 100644
+--- a/third_party/maldoca/BUILD.gn
++++ b/third_party/maldoca/BUILD.gn
+@@ -224,7 +224,7 @@ source_set("maldoca-ole") {
+     "//third_party/libxml",
+     "//third_party/protobuf:protobuf_lite",
+     "//third_party/re2",
+-    "//third_party/zlib:zlib_common_headers",
++    "//third_party/zlib:zlib",
+     "//third_party/zlib/google:zip",
+   ]
+ 

Deleted: ozone-x11-fix-VA-API.patch
===================================================================
--- ozone-x11-fix-VA-API.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ ozone-x11-fix-VA-API.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,671 +0,0 @@
-From a4de986102a45e29c3ef596f22704bdca244c26c Mon Sep 17 00:00:00 2001
-From: Maksim Sisov <msisov at igalia.com>
-Date: Fri, 17 Sep 2021 08:45:55 +0000
-Subject: [PATCH] ozone/x11: fix VA-API.
-
-This patch fixes VA-API usage with Ozone/X11 backend (which
-is our default backend now as X11 has been deprecated -
-crrev.com/c/3114071)).
-
-non-Ozone X11 is disabled now and Ozone is always used
-on Linux. However, VA-API implementation is not Ozone friendly
-yet and requires major refactoring. But given that VA-API
-implementation on Linux worked only with X11, it's fine for
-now to change USE_X11 and !IsUsingOzonePlatform to
-BUILDFLAG(OZONE_PLATFORM_X11) and fail VA-API initialization
-in VADisplayState::Initialize for Ozone/Linux other than
-non-X11 backends.
-
-Bug: 1121948
-Change-Id: If85d289235e6d358103d9fa2bbe0f741fb599a26
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3141878
-Commit-Queue: Maksim Sisov <msisov at igalia.com>
-Reviewed-by: Andres Calderon Jaramillo <andrescj at chromium.org>
-Reviewed-by: Robert Kroeger <rjkroege at chromium.org>
-Reviewed-by: Xiaohan Wang <xhwang at chromium.org>
-Reviewed-by: Alexander Dunaev <adunaev at igalia.com>
-Cr-Commit-Position: refs/heads/main@{#922466}
----
- media/BUILD.gn                                |  3 -
- media/gpu/BUILD.gn                            |  5 +-
- media/gpu/args.gni                            | 13 +++-
- media/gpu/vaapi/BUILD.gn                      |  8 +-
- media/gpu/vaapi/va_stub_header.fragment       |  6 +-
- media/gpu/vaapi/vaapi_picture_factory.cc      | 72 ++++++++----------
- .../vaapi_picture_native_pixmap_angle.cc      |  2 -
- media/gpu/vaapi/vaapi_picture_tfp.cc          |  2 -
- .../vaapi/vaapi_video_decode_accelerator.cc   |  9 +--
- ...vaapi_video_decode_accelerator_unittest.cc | 11 +--
- media/gpu/vaapi/vaapi_wrapper.cc              | 76 +++++++++----------
- media/gpu/vaapi/vaapi_wrapper.h               |  8 +-
- ui/ozone/platform/x11/ozone_platform_x11.cc   |  3 +
- ui/ozone/public/ozone_platform.h              | 10 +++
- 14 files changed, 108 insertions(+), 120 deletions(-)
-
-diff --git a/media/BUILD.gn b/media/BUILD.gn
-index dbee1d4338..d5c158c08f 100644
---- a/media/BUILD.gn
-+++ b/media/BUILD.gn
-@@ -130,9 +130,6 @@ component("media") {
-     public_deps += [ "//media/base/mac" ]
-   }
- 
--  if (use_x11) {
--    deps += [ "//ui/base/x" ]
--  }
-   if (use_ozone) {
-     deps += [ "//ui/ozone" ]
-   }
-diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn
-index c7499485ac..3fedc78948 100644
---- a/media/gpu/BUILD.gn
-+++ b/media/gpu/BUILD.gn
-@@ -20,6 +20,7 @@ buildflag_header("buildflags") {
-     "USE_VAAPI_IMAGE_CODECS=$use_vaapi_image_codecs",
-     "USE_V4L2_CODEC=$use_v4l2_codec",
-     "USE_LIBV4L2=$use_v4lplugin",
-+    "USE_VAAPI_X11=$use_vaapi_x11",
-   ]
- }
- 
-@@ -215,9 +216,7 @@ component("gpu") {
-       "windows/supported_profile_helpers.cc",
-       "windows/supported_profile_helpers.h",
-     ]
--    configs += [
--      "//third_party/khronos:khronos_headers",
--    ]
-+    configs += [ "//third_party/khronos:khronos_headers" ]
-     public_deps += [ "//media/base/win:media_foundation_util" ]
-     deps += [
-       "//gpu/ipc/common:common",
-diff --git a/media/gpu/args.gni b/media/gpu/args.gni
-index 4004937949..2f53843918 100644
---- a/media/gpu/args.gni
-+++ b/media/gpu/args.gni
-@@ -3,7 +3,15 @@
- # found in the LICENSE file.
- 
- import("//build/config/chromeos/ui_mode.gni")
--import("//build/config/ui.gni")
-+import("//build/config/ozone.gni")
-+
-+declare_args() {
-+  # Indicates if X11 VA-API-based hardware acceleration is to be used.
-+  # See also the comment near the |use_vaapi| arg.
-+  use_vaapi_x11 =
-+      is_linux && ozone_platform_x11 && !is_chromecast && !is_chromeos_lacros &&
-+      (target_cpu == "x86" || target_cpu == "x64")
-+}
- 
- declare_args() {
-   # Indicates if V4L plugin is used.
-@@ -21,8 +29,7 @@ declare_args() {
-   # is typically the case on x86-based ChromeOS devices.
-   # VA-API should also be compiled by default on x11-using linux devices
-   # using x86/x64.
--  use_vaapi =
--      is_linux && use_x11 && (target_cpu == "x86" || target_cpu == "x64")
-+  use_vaapi = use_vaapi_x11
- 
-   # Indicates if ChromeOS protected media support exists. This is used
-   # to enable the CDM daemon in Chrome OS as well as support for
-diff --git a/media/gpu/vaapi/BUILD.gn b/media/gpu/vaapi/BUILD.gn
-index b11d2c60fa..0c2520dd6b 100644
---- a/media/gpu/vaapi/BUILD.gn
-+++ b/media/gpu/vaapi/BUILD.gn
-@@ -17,7 +17,7 @@ assert(use_vaapi)
- generate_stubs("libva_stubs") {
-   extra_header = "va_stub_header.fragment"
-   sigs = [ "va.sigs" ]
--  if (use_x11) {
-+  if (use_vaapi_x11) {
-     sigs += [ "va_x11.sigs" ]
-   }
-   if (is_chromeos_ash) {
-@@ -131,14 +131,14 @@ source_set("vaapi") {
-     ]
-   }
- 
--  if (use_x11 || use_ozone || use_egl) {
-+  if (use_ozone || use_egl) {
-     sources += [
-       "vaapi_picture_native_pixmap.cc",
-       "vaapi_picture_native_pixmap.h",
-     ]
-   }
- 
--  if (use_x11) {
-+  if (use_vaapi_x11) {
-     deps += [ "//ui/gfx/x" ]
-     sources += [
-       "vaapi_picture_native_pixmap_angle.cc",
-@@ -197,7 +197,7 @@ source_set("common") {
-     deps += [ "//ui/ozone" ]
-   }
- 
--  if (use_x11) {
-+  if (use_vaapi_x11) {
-     deps += [ "//ui/gfx/x" ]
-   }
- 
-diff --git a/media/gpu/vaapi/va_stub_header.fragment b/media/gpu/vaapi/va_stub_header.fragment
-index bed198484d..e8c46c5e81 100644
---- a/media/gpu/vaapi/va_stub_header.fragment
-+++ b/media/gpu/vaapi/va_stub_header.fragment
-@@ -1,12 +1,14 @@
- // The extra include header needed in the generated stub file for defining
- // various libva types.
- 
-+#include "media/gpu/buildflags.h"
-+
- extern "C" {
- 
- #include <va/va_drm.h>
- #include <va/va.h>
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
- #include <va/va_x11.h>
--#endif
-+#endif  // BUILDFLAG(USE_VAAPI_X11)
- 
- }
-diff --git a/media/gpu/vaapi/vaapi_picture_factory.cc b/media/gpu/vaapi/vaapi_picture_factory.cc
-index 719035b87c..9c7d7387d2 100644
---- a/media/gpu/vaapi/vaapi_picture_factory.cc
-+++ b/media/gpu/vaapi/vaapi_picture_factory.cc
-@@ -10,13 +10,13 @@
- #include "ui/base/ui_base_features.h"
- #include "ui/gl/gl_bindings.h"
- 
--#if defined(USE_X11)
--#include "media/gpu/vaapi/vaapi_picture_native_pixmap_angle.h"
--#include "media/gpu/vaapi/vaapi_picture_tfp.h"
--#endif
- #if defined(USE_OZONE)
- #include "media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.h"
--#endif
-+#endif  // defined(USE_OZONE)
-+#if BUILDFLAG(USE_VAAPI_X11)
-+#include "media/gpu/vaapi/vaapi_picture_native_pixmap_angle.h"
-+#include "media/gpu/vaapi/vaapi_picture_tfp.h"
-+#endif  // BUILDFLAG(USE_VAAPI_X11)
- #if defined(USE_EGL)
- #include "media/gpu/vaapi/vaapi_picture_native_pixmap_egl.h"
- #endif
-@@ -46,15 +46,13 @@ VaapiPictureFactory::VaapiPictureFactory() {
-   vaapi_impl_pairs_.insert(
-       std::make_pair(gl::kGLImplementationEGLGLES2,
-                      VaapiPictureFactory::kVaapiImplementationDrm));
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
-   vaapi_impl_pairs_.insert(
-       std::make_pair(gl::kGLImplementationEGLANGLE,
-                      VaapiPictureFactory::kVaapiImplementationAngle));
--  if (!features::IsUsingOzonePlatform()) {
--    vaapi_impl_pairs_.insert(
--        std::make_pair(gl::kGLImplementationDesktopGL,
--                       VaapiPictureFactory::kVaapiImplementationX11));
--  }
-+  vaapi_impl_pairs_.insert(
-+      std::make_pair(gl::kGLImplementationDesktopGL,
-+                     VaapiPictureFactory::kVaapiImplementationX11));
- #endif
- 
-   DeterminePictureCreationAndDownloadingMechanism();
-@@ -96,19 +94,19 @@ VaapiPictureFactory::GetVaapiImplementation(gl::GLImplementation gl_impl) {
- }
- 
- uint32_t VaapiPictureFactory::GetGLTextureTarget() {
--#if defined(USE_OZONE)
--  if (features::IsUsingOzonePlatform())
--    return GL_TEXTURE_EXTERNAL_OES;
--#endif
-+#if BUILDFLAG(USE_VAAPI_X11)
-   return GL_TEXTURE_2D;
-+#else
-+  return GL_TEXTURE_EXTERNAL_OES;
-+#endif
- }
- 
- gfx::BufferFormat VaapiPictureFactory::GetBufferFormat() {
--#if defined(USE_OZONE)
--  if (features::IsUsingOzonePlatform())
--    return gfx::BufferFormat::YUV_420_BIPLANAR;
--#endif
-+#if BUILDFLAG(USE_VAAPI_X11)
-   return gfx::BufferFormat::RGBX_8888;
-+#else
-+  return gfx::BufferFormat::YUV_420_BIPLANAR;
-+#endif
- }
- 
- void VaapiPictureFactory::DeterminePictureCreationAndDownloadingMechanism() {
-@@ -116,51 +114,43 @@ void VaapiPictureFactory::DeterminePictureCreationAndDownloadingMechanism() {
- #if defined(USE_OZONE)
-     // We can be called without GL initialized, which is valid if we use Ozone.
-     case kVaapiImplementationNone:
--      if (features::IsUsingOzonePlatform()) {
--        create_picture_cb_ = base::BindRepeating(
--            &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapOzone>);
--        needs_vpp_for_downloading_ = true;
--      }
--
--      // This is reached by unit tests which don't require create_picture_cb_
--      // to be initialized or called.
-+      create_picture_cb_ = base::BindRepeating(
-+          &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapOzone>);
-+      needs_vpp_for_downloading_ = true;
-       break;
- #endif  // defined(USE_OZONE)
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
-     case kVaapiImplementationX11:
--      DCHECK(!features::IsUsingOzonePlatform());
-       create_picture_cb_ =
-           base::BindRepeating(&CreateVaapiPictureNativeImpl<VaapiTFPPicture>);
-       // Neither VaapiTFPPicture or VaapiPictureNativePixmapAngle needs the VPP.
-       needs_vpp_for_downloading_ = false;
-       break;
-     case kVaapiImplementationAngle:
--      DCHECK(!features::IsUsingOzonePlatform());
-       create_picture_cb_ = base::BindRepeating(
-           &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapAngle>);
-       // Neither VaapiTFPPicture or VaapiPictureNativePixmapAngle needs the VPP.
-       needs_vpp_for_downloading_ = false;
-       break;
--#endif  // defined(USE_X11)
-+#endif  // BUILDFLAG(USE_VAAPI_X11)
-     case kVaapiImplementationDrm:
- #if defined(USE_OZONE)
--      if (features::IsUsingOzonePlatform()) {
--        create_picture_cb_ = base::BindRepeating(
--            &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapOzone>);
--        needs_vpp_for_downloading_ = true;
--        break;
--      }
--#endif  // defined(USE_OZONE)
--#if defined(USE_EGL)
-+      create_picture_cb_ = base::BindRepeating(
-+          &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapOzone>);
-+      needs_vpp_for_downloading_ = true;
-+      break;
-+#elif defined(USE_EGL)
-       create_picture_cb_ = base::BindRepeating(
-           &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapEgl>);
-       needs_vpp_for_downloading_ = true;
-       break;
--#endif  // defined(USE_EGL)
-+#else
-       // ozone or egl must be used to use the DRM implementation.
--      NOTREACHED();
-+      FALLTHROUGH;
-+#endif
-     default:
-       NOTREACHED();
-+      break;
-   }
- }
- 
-diff --git a/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc b/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc
-index 9de0c93b44..e5b9908490 100644
---- a/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc
-+++ b/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc
-@@ -6,7 +6,6 @@
- 
- #include "media/gpu/vaapi/va_surface.h"
- #include "media/gpu/vaapi/vaapi_wrapper.h"
--#include "ui/base/ui_base_features.h"
- #include "ui/gfx/x/connection.h"
- #include "ui/gfx/x/future.h"
- #include "ui/gfx/x/xproto.h"
-@@ -92,7 +91,6 @@ Status VaapiPictureNativePixmapAngle::Allocate(gfx::BufferFormat format) {
-   if (!make_context_current_cb_ || !make_context_current_cb_.Run())
-     return StatusCode::kVaapiBadContext;
- 
--  DCHECK(!features::IsUsingOzonePlatform());
-   auto image =
-       base::MakeRefCounted<gl::GLImageEGLPixmap>(visible_size_, format);
-   if (!image)
-diff --git a/media/gpu/vaapi/vaapi_picture_tfp.cc b/media/gpu/vaapi/vaapi_picture_tfp.cc
-index 3f7e221d8a..11914e3640 100644
---- a/media/gpu/vaapi/vaapi_picture_tfp.cc
-+++ b/media/gpu/vaapi/vaapi_picture_tfp.cc
-@@ -6,7 +6,6 @@
- 
- #include "media/gpu/vaapi/va_surface.h"
- #include "media/gpu/vaapi/vaapi_wrapper.h"
--#include "ui/base/ui_base_features.h"
- #include "ui/gfx/x/connection.h"
- #include "ui/gfx/x/future.h"
- #include "ui/gl/gl_bindings.h"
-@@ -37,7 +36,6 @@ VaapiTFPPicture::VaapiTFPPicture(
-       connection_(x11::Connection::Get()),
-       x_pixmap_(x11::Pixmap::None) {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
--  DCHECK(!features::IsUsingOzonePlatform());
-   DCHECK(texture_id);
-   DCHECK(client_texture_id);
- }
-diff --git a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
-index 7514fe4fdd..e4cd7c8d89 100644
---- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
-+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
-@@ -184,12 +184,6 @@ bool VaapiVideoDecodeAccelerator::Initialize(const Config& config,
-                                              Client* client) {
-   DCHECK(task_runner_->BelongsToCurrentThread());
- 
--#if defined(USE_X11)
--  // TODO(crbug/1116701): implement decode acceleration when running with Ozone.
--  if (features::IsUsingOzonePlatform())
--    return false;
--#endif
--
-   vaapi_picture_factory_ = std::make_unique<VaapiPictureFactory>();
- 
-   if (config.is_encrypted()) {
-@@ -1213,12 +1207,11 @@ VaapiVideoDecodeAccelerator::GetSupportedProfiles() {
- 
- VaapiVideoDecodeAccelerator::BufferAllocationMode
- VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
-   // The IMPORT mode is used for Android on Chrome OS, so this doesn't apply
-   // here.
-   DCHECK_NE(output_mode_, VideoDecodeAccelerator::Config::OutputMode::IMPORT);
-   // TODO(crbug/1116701): get video decode acceleration working with ozone.
--  DCHECK(!features::IsUsingOzonePlatform());
-   // For H.264 on older devices, another +1 is experimentally needed for
-   // high-to-high resolution changes.
-   // TODO(mcasas): Figure out why and why only H264, see crbug.com/912295 and
-diff --git a/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc b/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc
-index 5b9a543386..826bb103b1 100644
---- a/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc
-+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc
-@@ -17,7 +17,6 @@
- #include "media/gpu/vaapi/vaapi_wrapper.h"
- #include "testing/gmock/include/gmock/gmock.h"
- #include "testing/gtest/include/gtest/gtest.h"
--#include "ui/base/ui_base_features.h"
- 
- using base::test::RunClosure;
- using ::testing::_;
-@@ -416,12 +415,10 @@ TEST_P(VaapiVideoDecodeAcceleratorTest, SupportedPlatforms) {
-             mock_vaapi_picture_factory_->GetVaapiImplementation(
-                 gl::kGLImplementationEGLGLES2));
- 
--#if defined(USE_X11)
--  if (!features::IsUsingOzonePlatform()) {
--    EXPECT_EQ(VaapiPictureFactory::kVaapiImplementationX11,
--              mock_vaapi_picture_factory_->GetVaapiImplementation(
--                  gl::kGLImplementationDesktopGL));
--  }
-+#if BUILDFLAG(USE_VAAPI_X11)
-+  EXPECT_EQ(VaapiPictureFactory::kVaapiImplementationX11,
-+            mock_vaapi_picture_factory_->GetVaapiImplementation(
-+                gl::kGLImplementationDesktopGL));
- #endif
- }
- 
-diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc
-index 754d258848..e528b0f84d 100644
---- a/media/gpu/vaapi/vaapi_wrapper.cc
-+++ b/media/gpu/vaapi/vaapi_wrapper.cc
-@@ -65,7 +65,7 @@
- #include "ui/gl/gl_bindings.h"
- #include "ui/gl/gl_implementation.h"
- 
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
- typedef XID Drawable;
- 
- extern "C" {
-@@ -73,7 +73,7 @@ extern "C" {
- }
- 
- #include "ui/gfx/x/connection.h"  // nogncheck
--#endif
-+#endif                            // BUILDFLAG(USE_VAAPI_X11)
- 
- #if defined(USE_OZONE)
- #include "ui/ozone/public/ozone_platform.h"
-@@ -87,14 +87,14 @@ using media_gpu_vaapi::kModuleVa_prot;
- 
- using media_gpu_vaapi::kModuleVa;
- using media_gpu_vaapi::kModuleVa_drm;
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
- using media_gpu_vaapi::kModuleVa_x11;
--#endif
-+#endif  // BUILDFLAG(USE_VAAPI_X11)
- using media_gpu_vaapi::InitializeStubs;
- using media_gpu_vaapi::IsVaInitialized;
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
- using media_gpu_vaapi::IsVa_x11Initialized;
--#endif
-+#endif  // BUILDFLAG(USE_VAAPI_X11)
- using media_gpu_vaapi::IsVa_drmInitialized;
- using media_gpu_vaapi::StubPathMap;
- 
-@@ -559,10 +559,20 @@ VADisplayState::VADisplayState()
- bool VADisplayState::Initialize() {
-   base::AutoLock auto_lock(va_lock_);
- 
-+#if defined(USE_OZONE) && defined(OS_LINUX)
-+  // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on
-+  // Linux. See comment in OzonePlatform::PlatformProperties::supports_vaapi
-+  // for more details. This will also require revisiting everything that's
-+  // guarded by USE_VAAPI_X11. For example, if USE_VAAPI_X11 is true, but the
-+  // user chooses the Wayland backend for Ozone at runtime, then many things (if
-+  // not all) that we do for X11 won't apply.
-+  if (!ui::OzonePlatform::GetInstance()->GetPlatformProperties().supports_vaapi)
-+    return false;
-+#endif
-+
-   bool libraries_initialized = IsVaInitialized() && IsVa_drmInitialized();
--#if defined(USE_X11)
--  if (!features::IsUsingOzonePlatform())
--    libraries_initialized = libraries_initialized && IsVa_x11Initialized();
-+#if BUILDFLAG(USE_VAAPI_X11)
-+  libraries_initialized = libraries_initialized && IsVa_x11Initialized();
- #endif
-   if (!libraries_initialized)
-     return false;
-@@ -577,34 +587,25 @@ bool VADisplayState::Initialize() {
-   return success;
- }
- 
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
- 
- absl::optional<VADisplay> GetVADisplayStateX11(const base::ScopedFD& drm_fd) {
--  bool use_drm_as_fallback = false;
-   switch (gl::GetGLImplementation()) {
-     case gl::kGLImplementationEGLGLES2:
-       return vaGetDisplayDRM(drm_fd.get());
- 
-     case gl::kGLImplementationNone:
--      use_drm_as_fallback = true;
--      FALLTHROUGH;
- 
-     case gl::kGLImplementationDesktopGL: {
--      if (!features::IsUsingOzonePlatform()) {
--        VADisplay display =
--            vaGetDisplay(x11::Connection::Get()->GetXlibDisplay());
--        if (vaDisplayIsValid(display))
--          return display;
--        return vaGetDisplayDRM(drm_fd.get());
--      }
--      break;
-+      VADisplay display =
-+          vaGetDisplay(x11::Connection::Get()->GetXlibDisplay());
-+      if (vaDisplayIsValid(display))
-+        return display;
-+      return vaGetDisplayDRM(drm_fd.get());
-     }
- 
--    case gl::kGLImplementationEGLANGLE: {
--      if (!features::IsUsingOzonePlatform())
--        return vaGetDisplay(x11::Connection::Get()->GetXlibDisplay());
--      break;
--    }
-+    case gl::kGLImplementationEGLANGLE:
-+      return vaGetDisplay(x11::Connection::Get()->GetXlibDisplay());
- 
-     default:
-       LOG(WARNING) << "VAAPI video acceleration not available for "
-@@ -612,10 +613,6 @@ absl::optional<VADisplay> GetVADisplayStateX11(const base::ScopedFD& drm_fd) {
-                           gl::GetGLImplementationParts());
-       return absl::nullopt;
-   }
--
--  if (use_drm_as_fallback)
--    return vaGetDisplayDRM(drm_fd.get());
--  return absl::nullopt;
- }
- 
- #else
-@@ -633,11 +630,11 @@ absl::optional<VADisplay> GetVADisplayState(const base::ScopedFD& drm_fd) {
-   }
- }
- 
--#endif  // defined(USE_X11)
-+#endif  // BUILDFLAG(USE_VAAPI_X11)
- 
- bool VADisplayState::InitializeVaDisplay_Locked() {
-   absl::optional<VADisplay> display =
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
-       GetVADisplayStateX11(drm_fd_);
- #else
-       GetVADisplayState(drm_fd_);
-@@ -702,10 +699,9 @@ bool VADisplayState::InitializeOnce() {
-   if (!InitializeVaDisplay_Locked() || !InitializeVaDriver_Locked())
-     return false;
- 
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
-   if (gl::GetGLImplementation() == gl::kGLImplementationEGLANGLE &&
-       implementation_type_ == VAImplementation::kIntelIHD) {
--    DCHECK(!features::IsUsingOzonePlatform());
-     constexpr char libva_driver_impl_env[] = "LIBVA_DRIVER_NAME";
-     // TODO(crbug/1116703) The libva intel-media driver has a known segfault in
-     // vaPutSurface, so until this is fixed, fall back to the i965 driver. There
-@@ -722,7 +718,7 @@ bool VADisplayState::InitializeOnce() {
-     if (!InitializeVaDisplay_Locked() || !InitializeVaDriver_Locked())
-       return false;
-   }
--#endif  // USE_X11
-+#endif  // BUILDFLAG(USE_VAAPI_X11)
- 
-   return true;
- }
-@@ -2452,11 +2448,10 @@ bool VaapiWrapper::MapAndCopyAndExecute(
-   return Execute_Locked(va_surface_id, va_buffer_ids);
- }
- 
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
- bool VaapiWrapper::PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
-                                         x11::Pixmap x_pixmap,
-                                         gfx::Size dest_size) {
--  DCHECK(!features::IsUsingOzonePlatform());
-   base::AutoLock auto_lock(*va_lock_);
- 
-   VAStatus va_res = vaSyncSurface(va_display_, va_surface_id);
-@@ -2470,7 +2465,7 @@ bool VaapiWrapper::PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
-   VA_SUCCESS_OR_RETURN(va_res, VaapiFunctions::kVAPutSurface, false);
-   return true;
- }
--#endif  // USE_X11
-+#endif  // BUILDFLAG(USE_VAAPI_X11)
- 
- std::unique_ptr<ScopedVAImage> VaapiWrapper::CreateVaImage(
-     VASurfaceID va_surface_id,
-@@ -2844,9 +2839,8 @@ void VaapiWrapper::PreSandboxInitialization() {
- 
-   paths[kModuleVa].push_back(std::string("libva.so.") + va_suffix);
-   paths[kModuleVa_drm].push_back(std::string("libva-drm.so.") + va_suffix);
--#if defined(USE_X11)
--  if (!features::IsUsingOzonePlatform())
--    paths[kModuleVa_x11].push_back(std::string("libva-x11.so.") + va_suffix);
-+#if BUILDFLAG(USE_VAAPI_X11)
-+  paths[kModuleVa_x11].push_back(std::string("libva-x11.so.") + va_suffix);
- #endif
- #if BUILDFLAG(IS_CHROMEOS_ASH)
-   paths[kModuleVa_prot].push_back(std::string("libva.so.") + va_suffix);
-diff --git a/media/gpu/vaapi/vaapi_wrapper.h b/media/gpu/vaapi/vaapi_wrapper.h
-index 0e3da53624..88ffcd0799 100644
---- a/media/gpu/vaapi/vaapi_wrapper.h
-+++ b/media/gpu/vaapi/vaapi_wrapper.h
-@@ -36,9 +36,9 @@
- #include "third_party/abseil-cpp/absl/types/optional.h"
- #include "ui/gfx/geometry/size.h"
- 
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
- #include "ui/gfx/x/xproto.h"  // nogncheck
--#endif  // USE_X11
-+#endif                        // BUILDFLAG(USE_VAAPI_X11)
- 
- namespace gfx {
- enum class BufferFormat;
-@@ -426,13 +426,13 @@ class MEDIA_GPU_EXPORT VaapiWrapper
-       const std::vector<std::pair<VABufferID, VABufferDescriptor>>& va_buffers)
-       WARN_UNUSED_RESULT;
- 
--#if defined(USE_X11)
-+#if BUILDFLAG(USE_VAAPI_X11)
-   // Put data from |va_surface_id| into |x_pixmap| of size
-   // |dest_size|, converting/scaling to it.
-   bool PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
-                             x11::Pixmap x_pixmap,
-                             gfx::Size dest_size) WARN_UNUSED_RESULT;
--#endif  // USE_X11
-+#endif  // BUILDFLAG(USE_VAAPI_X11)
- 
-   // Creates a ScopedVAImage from a VASurface |va_surface_id| and map it into
-   // memory with the given |format| and |size|. If |format| is not equal to the
-diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc
-index 8889828e0f..963dc7a0cd 100644
---- a/ui/ozone/platform/x11/ozone_platform_x11.cc
-+++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
-@@ -208,6 +208,9 @@ class OzonePlatformX11 : public OzonePlatform,
-       properties->supports_global_application_menus = true;
-       properties->app_modal_dialogs_use_event_blocker = true;
-       properties->fetch_buffer_formats_for_gmb_on_gpu = true;
-+#if defined(OS_LINUX)
-+      properties->supports_vaapi = true;
-+#endif
- 
-       initialised = true;
-     }
-diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h
-index df95f07486..2d7f44bbfa 100644
---- a/ui/ozone/public/ozone_platform.h
-+++ b/ui/ozone/public/ozone_platform.h
-@@ -15,6 +15,7 @@
- #include "base/macros.h"
- #include "base/message_loop/message_pump_type.h"
- #include "base/single_thread_task_runner.h"
-+#include "build/build_config.h"
- #include "mojo/public/cpp/bindings/binder_map.h"
- #include "ui/gfx/buffer_types.h"
- #include "ui/gfx/native_widget_types.h"
-@@ -154,6 +155,15 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform {
-     // Determines whether buffer formats should be fetched on GPU and passed
-     // back via gpu extra info.
-     bool fetch_buffer_formats_for_gmb_on_gpu = false;
-+
-+#if defined(OS_LINUX)
-+    // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on
-+    // Linux. At the moment, VA-API Linux implementation supports only X11
-+    // backend. This implementation must be refactored to support Ozone
-+    // properly. As a temporary solution, VA-API on Linux checks if vaapi is
-+    // supported (which implicitly means that it is Ozone/X11).
-+    bool supports_vaapi = false;
-+#endif
-   };
- 
-   // Groups platform properties that can only be known at run time.

Copied: chromium/repos/extra-x86_64/ozone-x11-fix-VA-API.patch (from rev 426785, chromium/trunk/ozone-x11-fix-VA-API.patch)
===================================================================
--- ozone-x11-fix-VA-API.patch	                        (rev 0)
+++ ozone-x11-fix-VA-API.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,671 @@
+From a4de986102a45e29c3ef596f22704bdca244c26c Mon Sep 17 00:00:00 2001
+From: Maksim Sisov <msisov at igalia.com>
+Date: Fri, 17 Sep 2021 08:45:55 +0000
+Subject: [PATCH] ozone/x11: fix VA-API.
+
+This patch fixes VA-API usage with Ozone/X11 backend (which
+is our default backend now as X11 has been deprecated -
+crrev.com/c/3114071)).
+
+non-Ozone X11 is disabled now and Ozone is always used
+on Linux. However, VA-API implementation is not Ozone friendly
+yet and requires major refactoring. But given that VA-API
+implementation on Linux worked only with X11, it's fine for
+now to change USE_X11 and !IsUsingOzonePlatform to
+BUILDFLAG(OZONE_PLATFORM_X11) and fail VA-API initialization
+in VADisplayState::Initialize for Ozone/Linux other than
+non-X11 backends.
+
+Bug: 1121948
+Change-Id: If85d289235e6d358103d9fa2bbe0f741fb599a26
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3141878
+Commit-Queue: Maksim Sisov <msisov at igalia.com>
+Reviewed-by: Andres Calderon Jaramillo <andrescj at chromium.org>
+Reviewed-by: Robert Kroeger <rjkroege at chromium.org>
+Reviewed-by: Xiaohan Wang <xhwang at chromium.org>
+Reviewed-by: Alexander Dunaev <adunaev at igalia.com>
+Cr-Commit-Position: refs/heads/main@{#922466}
+---
+ media/BUILD.gn                                |  3 -
+ media/gpu/BUILD.gn                            |  5 +-
+ media/gpu/args.gni                            | 13 +++-
+ media/gpu/vaapi/BUILD.gn                      |  8 +-
+ media/gpu/vaapi/va_stub_header.fragment       |  6 +-
+ media/gpu/vaapi/vaapi_picture_factory.cc      | 72 ++++++++----------
+ .../vaapi_picture_native_pixmap_angle.cc      |  2 -
+ media/gpu/vaapi/vaapi_picture_tfp.cc          |  2 -
+ .../vaapi/vaapi_video_decode_accelerator.cc   |  9 +--
+ ...vaapi_video_decode_accelerator_unittest.cc | 11 +--
+ media/gpu/vaapi/vaapi_wrapper.cc              | 76 +++++++++----------
+ media/gpu/vaapi/vaapi_wrapper.h               |  8 +-
+ ui/ozone/platform/x11/ozone_platform_x11.cc   |  3 +
+ ui/ozone/public/ozone_platform.h              | 10 +++
+ 14 files changed, 108 insertions(+), 120 deletions(-)
+
+diff --git a/media/BUILD.gn b/media/BUILD.gn
+index dbee1d4338..d5c158c08f 100644
+--- a/media/BUILD.gn
++++ b/media/BUILD.gn
+@@ -130,9 +130,6 @@ component("media") {
+     public_deps += [ "//media/base/mac" ]
+   }
+ 
+-  if (use_x11) {
+-    deps += [ "//ui/base/x" ]
+-  }
+   if (use_ozone) {
+     deps += [ "//ui/ozone" ]
+   }
+diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn
+index c7499485ac..3fedc78948 100644
+--- a/media/gpu/BUILD.gn
++++ b/media/gpu/BUILD.gn
+@@ -20,6 +20,7 @@ buildflag_header("buildflags") {
+     "USE_VAAPI_IMAGE_CODECS=$use_vaapi_image_codecs",
+     "USE_V4L2_CODEC=$use_v4l2_codec",
+     "USE_LIBV4L2=$use_v4lplugin",
++    "USE_VAAPI_X11=$use_vaapi_x11",
+   ]
+ }
+ 
+@@ -215,9 +216,7 @@ component("gpu") {
+       "windows/supported_profile_helpers.cc",
+       "windows/supported_profile_helpers.h",
+     ]
+-    configs += [
+-      "//third_party/khronos:khronos_headers",
+-    ]
++    configs += [ "//third_party/khronos:khronos_headers" ]
+     public_deps += [ "//media/base/win:media_foundation_util" ]
+     deps += [
+       "//gpu/ipc/common:common",
+diff --git a/media/gpu/args.gni b/media/gpu/args.gni
+index 4004937949..2f53843918 100644
+--- a/media/gpu/args.gni
++++ b/media/gpu/args.gni
+@@ -3,7 +3,15 @@
+ # found in the LICENSE file.
+ 
+ import("//build/config/chromeos/ui_mode.gni")
+-import("//build/config/ui.gni")
++import("//build/config/ozone.gni")
++
++declare_args() {
++  # Indicates if X11 VA-API-based hardware acceleration is to be used.
++  # See also the comment near the |use_vaapi| arg.
++  use_vaapi_x11 =
++      is_linux && ozone_platform_x11 && !is_chromecast && !is_chromeos_lacros &&
++      (target_cpu == "x86" || target_cpu == "x64")
++}
+ 
+ declare_args() {
+   # Indicates if V4L plugin is used.
+@@ -21,8 +29,7 @@ declare_args() {
+   # is typically the case on x86-based ChromeOS devices.
+   # VA-API should also be compiled by default on x11-using linux devices
+   # using x86/x64.
+-  use_vaapi =
+-      is_linux && use_x11 && (target_cpu == "x86" || target_cpu == "x64")
++  use_vaapi = use_vaapi_x11
+ 
+   # Indicates if ChromeOS protected media support exists. This is used
+   # to enable the CDM daemon in Chrome OS as well as support for
+diff --git a/media/gpu/vaapi/BUILD.gn b/media/gpu/vaapi/BUILD.gn
+index b11d2c60fa..0c2520dd6b 100644
+--- a/media/gpu/vaapi/BUILD.gn
++++ b/media/gpu/vaapi/BUILD.gn
+@@ -17,7 +17,7 @@ assert(use_vaapi)
+ generate_stubs("libva_stubs") {
+   extra_header = "va_stub_header.fragment"
+   sigs = [ "va.sigs" ]
+-  if (use_x11) {
++  if (use_vaapi_x11) {
+     sigs += [ "va_x11.sigs" ]
+   }
+   if (is_chromeos_ash) {
+@@ -131,14 +131,14 @@ source_set("vaapi") {
+     ]
+   }
+ 
+-  if (use_x11 || use_ozone || use_egl) {
++  if (use_ozone || use_egl) {
+     sources += [
+       "vaapi_picture_native_pixmap.cc",
+       "vaapi_picture_native_pixmap.h",
+     ]
+   }
+ 
+-  if (use_x11) {
++  if (use_vaapi_x11) {
+     deps += [ "//ui/gfx/x" ]
+     sources += [
+       "vaapi_picture_native_pixmap_angle.cc",
+@@ -197,7 +197,7 @@ source_set("common") {
+     deps += [ "//ui/ozone" ]
+   }
+ 
+-  if (use_x11) {
++  if (use_vaapi_x11) {
+     deps += [ "//ui/gfx/x" ]
+   }
+ 
+diff --git a/media/gpu/vaapi/va_stub_header.fragment b/media/gpu/vaapi/va_stub_header.fragment
+index bed198484d..e8c46c5e81 100644
+--- a/media/gpu/vaapi/va_stub_header.fragment
++++ b/media/gpu/vaapi/va_stub_header.fragment
+@@ -1,12 +1,14 @@
+ // The extra include header needed in the generated stub file for defining
+ // various libva types.
+ 
++#include "media/gpu/buildflags.h"
++
+ extern "C" {
+ 
+ #include <va/va_drm.h>
+ #include <va/va.h>
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+ #include <va/va_x11.h>
+-#endif
++#endif  // BUILDFLAG(USE_VAAPI_X11)
+ 
+ }
+diff --git a/media/gpu/vaapi/vaapi_picture_factory.cc b/media/gpu/vaapi/vaapi_picture_factory.cc
+index 719035b87c..9c7d7387d2 100644
+--- a/media/gpu/vaapi/vaapi_picture_factory.cc
++++ b/media/gpu/vaapi/vaapi_picture_factory.cc
+@@ -10,13 +10,13 @@
+ #include "ui/base/ui_base_features.h"
+ #include "ui/gl/gl_bindings.h"
+ 
+-#if defined(USE_X11)
+-#include "media/gpu/vaapi/vaapi_picture_native_pixmap_angle.h"
+-#include "media/gpu/vaapi/vaapi_picture_tfp.h"
+-#endif
+ #if defined(USE_OZONE)
+ #include "media/gpu/vaapi/vaapi_picture_native_pixmap_ozone.h"
+-#endif
++#endif  // defined(USE_OZONE)
++#if BUILDFLAG(USE_VAAPI_X11)
++#include "media/gpu/vaapi/vaapi_picture_native_pixmap_angle.h"
++#include "media/gpu/vaapi/vaapi_picture_tfp.h"
++#endif  // BUILDFLAG(USE_VAAPI_X11)
+ #if defined(USE_EGL)
+ #include "media/gpu/vaapi/vaapi_picture_native_pixmap_egl.h"
+ #endif
+@@ -46,15 +46,13 @@ VaapiPictureFactory::VaapiPictureFactory() {
+   vaapi_impl_pairs_.insert(
+       std::make_pair(gl::kGLImplementationEGLGLES2,
+                      VaapiPictureFactory::kVaapiImplementationDrm));
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+   vaapi_impl_pairs_.insert(
+       std::make_pair(gl::kGLImplementationEGLANGLE,
+                      VaapiPictureFactory::kVaapiImplementationAngle));
+-  if (!features::IsUsingOzonePlatform()) {
+-    vaapi_impl_pairs_.insert(
+-        std::make_pair(gl::kGLImplementationDesktopGL,
+-                       VaapiPictureFactory::kVaapiImplementationX11));
+-  }
++  vaapi_impl_pairs_.insert(
++      std::make_pair(gl::kGLImplementationDesktopGL,
++                     VaapiPictureFactory::kVaapiImplementationX11));
+ #endif
+ 
+   DeterminePictureCreationAndDownloadingMechanism();
+@@ -96,19 +94,19 @@ VaapiPictureFactory::GetVaapiImplementation(gl::GLImplementation gl_impl) {
+ }
+ 
+ uint32_t VaapiPictureFactory::GetGLTextureTarget() {
+-#if defined(USE_OZONE)
+-  if (features::IsUsingOzonePlatform())
+-    return GL_TEXTURE_EXTERNAL_OES;
+-#endif
++#if BUILDFLAG(USE_VAAPI_X11)
+   return GL_TEXTURE_2D;
++#else
++  return GL_TEXTURE_EXTERNAL_OES;
++#endif
+ }
+ 
+ gfx::BufferFormat VaapiPictureFactory::GetBufferFormat() {
+-#if defined(USE_OZONE)
+-  if (features::IsUsingOzonePlatform())
+-    return gfx::BufferFormat::YUV_420_BIPLANAR;
+-#endif
++#if BUILDFLAG(USE_VAAPI_X11)
+   return gfx::BufferFormat::RGBX_8888;
++#else
++  return gfx::BufferFormat::YUV_420_BIPLANAR;
++#endif
+ }
+ 
+ void VaapiPictureFactory::DeterminePictureCreationAndDownloadingMechanism() {
+@@ -116,51 +114,43 @@ void VaapiPictureFactory::DeterminePictureCreationAndDownloadingMechanism() {
+ #if defined(USE_OZONE)
+     // We can be called without GL initialized, which is valid if we use Ozone.
+     case kVaapiImplementationNone:
+-      if (features::IsUsingOzonePlatform()) {
+-        create_picture_cb_ = base::BindRepeating(
+-            &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapOzone>);
+-        needs_vpp_for_downloading_ = true;
+-      }
+-
+-      // This is reached by unit tests which don't require create_picture_cb_
+-      // to be initialized or called.
++      create_picture_cb_ = base::BindRepeating(
++          &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapOzone>);
++      needs_vpp_for_downloading_ = true;
+       break;
+ #endif  // defined(USE_OZONE)
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+     case kVaapiImplementationX11:
+-      DCHECK(!features::IsUsingOzonePlatform());
+       create_picture_cb_ =
+           base::BindRepeating(&CreateVaapiPictureNativeImpl<VaapiTFPPicture>);
+       // Neither VaapiTFPPicture or VaapiPictureNativePixmapAngle needs the VPP.
+       needs_vpp_for_downloading_ = false;
+       break;
+     case kVaapiImplementationAngle:
+-      DCHECK(!features::IsUsingOzonePlatform());
+       create_picture_cb_ = base::BindRepeating(
+           &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapAngle>);
+       // Neither VaapiTFPPicture or VaapiPictureNativePixmapAngle needs the VPP.
+       needs_vpp_for_downloading_ = false;
+       break;
+-#endif  // defined(USE_X11)
++#endif  // BUILDFLAG(USE_VAAPI_X11)
+     case kVaapiImplementationDrm:
+ #if defined(USE_OZONE)
+-      if (features::IsUsingOzonePlatform()) {
+-        create_picture_cb_ = base::BindRepeating(
+-            &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapOzone>);
+-        needs_vpp_for_downloading_ = true;
+-        break;
+-      }
+-#endif  // defined(USE_OZONE)
+-#if defined(USE_EGL)
++      create_picture_cb_ = base::BindRepeating(
++          &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapOzone>);
++      needs_vpp_for_downloading_ = true;
++      break;
++#elif defined(USE_EGL)
+       create_picture_cb_ = base::BindRepeating(
+           &CreateVaapiPictureNativeImpl<VaapiPictureNativePixmapEgl>);
+       needs_vpp_for_downloading_ = true;
+       break;
+-#endif  // defined(USE_EGL)
++#else
+       // ozone or egl must be used to use the DRM implementation.
+-      NOTREACHED();
++      FALLTHROUGH;
++#endif
+     default:
+       NOTREACHED();
++      break;
+   }
+ }
+ 
+diff --git a/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc b/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc
+index 9de0c93b44..e5b9908490 100644
+--- a/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc
++++ b/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc
+@@ -6,7 +6,6 @@
+ 
+ #include "media/gpu/vaapi/va_surface.h"
+ #include "media/gpu/vaapi/vaapi_wrapper.h"
+-#include "ui/base/ui_base_features.h"
+ #include "ui/gfx/x/connection.h"
+ #include "ui/gfx/x/future.h"
+ #include "ui/gfx/x/xproto.h"
+@@ -92,7 +91,6 @@ Status VaapiPictureNativePixmapAngle::Allocate(gfx::BufferFormat format) {
+   if (!make_context_current_cb_ || !make_context_current_cb_.Run())
+     return StatusCode::kVaapiBadContext;
+ 
+-  DCHECK(!features::IsUsingOzonePlatform());
+   auto image =
+       base::MakeRefCounted<gl::GLImageEGLPixmap>(visible_size_, format);
+   if (!image)
+diff --git a/media/gpu/vaapi/vaapi_picture_tfp.cc b/media/gpu/vaapi/vaapi_picture_tfp.cc
+index 3f7e221d8a..11914e3640 100644
+--- a/media/gpu/vaapi/vaapi_picture_tfp.cc
++++ b/media/gpu/vaapi/vaapi_picture_tfp.cc
+@@ -6,7 +6,6 @@
+ 
+ #include "media/gpu/vaapi/va_surface.h"
+ #include "media/gpu/vaapi/vaapi_wrapper.h"
+-#include "ui/base/ui_base_features.h"
+ #include "ui/gfx/x/connection.h"
+ #include "ui/gfx/x/future.h"
+ #include "ui/gl/gl_bindings.h"
+@@ -37,7 +36,6 @@ VaapiTFPPicture::VaapiTFPPicture(
+       connection_(x11::Connection::Get()),
+       x_pixmap_(x11::Pixmap::None) {
+   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+-  DCHECK(!features::IsUsingOzonePlatform());
+   DCHECK(texture_id);
+   DCHECK(client_texture_id);
+ }
+diff --git a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+index 7514fe4fdd..e4cd7c8d89 100644
+--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+@@ -184,12 +184,6 @@ bool VaapiVideoDecodeAccelerator::Initialize(const Config& config,
+                                              Client* client) {
+   DCHECK(task_runner_->BelongsToCurrentThread());
+ 
+-#if defined(USE_X11)
+-  // TODO(crbug/1116701): implement decode acceleration when running with Ozone.
+-  if (features::IsUsingOzonePlatform())
+-    return false;
+-#endif
+-
+   vaapi_picture_factory_ = std::make_unique<VaapiPictureFactory>();
+ 
+   if (config.is_encrypted()) {
+@@ -1213,12 +1207,11 @@ VaapiVideoDecodeAccelerator::GetSupportedProfiles() {
+ 
+ VaapiVideoDecodeAccelerator::BufferAllocationMode
+ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+   // The IMPORT mode is used for Android on Chrome OS, so this doesn't apply
+   // here.
+   DCHECK_NE(output_mode_, VideoDecodeAccelerator::Config::OutputMode::IMPORT);
+   // TODO(crbug/1116701): get video decode acceleration working with ozone.
+-  DCHECK(!features::IsUsingOzonePlatform());
+   // For H.264 on older devices, another +1 is experimentally needed for
+   // high-to-high resolution changes.
+   // TODO(mcasas): Figure out why and why only H264, see crbug.com/912295 and
+diff --git a/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc b/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc
+index 5b9a543386..826bb103b1 100644
+--- a/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc
++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator_unittest.cc
+@@ -17,7 +17,6 @@
+ #include "media/gpu/vaapi/vaapi_wrapper.h"
+ #include "testing/gmock/include/gmock/gmock.h"
+ #include "testing/gtest/include/gtest/gtest.h"
+-#include "ui/base/ui_base_features.h"
+ 
+ using base::test::RunClosure;
+ using ::testing::_;
+@@ -416,12 +415,10 @@ TEST_P(VaapiVideoDecodeAcceleratorTest, SupportedPlatforms) {
+             mock_vaapi_picture_factory_->GetVaapiImplementation(
+                 gl::kGLImplementationEGLGLES2));
+ 
+-#if defined(USE_X11)
+-  if (!features::IsUsingOzonePlatform()) {
+-    EXPECT_EQ(VaapiPictureFactory::kVaapiImplementationX11,
+-              mock_vaapi_picture_factory_->GetVaapiImplementation(
+-                  gl::kGLImplementationDesktopGL));
+-  }
++#if BUILDFLAG(USE_VAAPI_X11)
++  EXPECT_EQ(VaapiPictureFactory::kVaapiImplementationX11,
++            mock_vaapi_picture_factory_->GetVaapiImplementation(
++                gl::kGLImplementationDesktopGL));
+ #endif
+ }
+ 
+diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc
+index 754d258848..e528b0f84d 100644
+--- a/media/gpu/vaapi/vaapi_wrapper.cc
++++ b/media/gpu/vaapi/vaapi_wrapper.cc
+@@ -65,7 +65,7 @@
+ #include "ui/gl/gl_bindings.h"
+ #include "ui/gl/gl_implementation.h"
+ 
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+ typedef XID Drawable;
+ 
+ extern "C" {
+@@ -73,7 +73,7 @@ extern "C" {
+ }
+ 
+ #include "ui/gfx/x/connection.h"  // nogncheck
+-#endif
++#endif                            // BUILDFLAG(USE_VAAPI_X11)
+ 
+ #if defined(USE_OZONE)
+ #include "ui/ozone/public/ozone_platform.h"
+@@ -87,14 +87,14 @@ using media_gpu_vaapi::kModuleVa_prot;
+ 
+ using media_gpu_vaapi::kModuleVa;
+ using media_gpu_vaapi::kModuleVa_drm;
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+ using media_gpu_vaapi::kModuleVa_x11;
+-#endif
++#endif  // BUILDFLAG(USE_VAAPI_X11)
+ using media_gpu_vaapi::InitializeStubs;
+ using media_gpu_vaapi::IsVaInitialized;
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+ using media_gpu_vaapi::IsVa_x11Initialized;
+-#endif
++#endif  // BUILDFLAG(USE_VAAPI_X11)
+ using media_gpu_vaapi::IsVa_drmInitialized;
+ using media_gpu_vaapi::StubPathMap;
+ 
+@@ -559,10 +559,20 @@ VADisplayState::VADisplayState()
+ bool VADisplayState::Initialize() {
+   base::AutoLock auto_lock(va_lock_);
+ 
++#if defined(USE_OZONE) && defined(OS_LINUX)
++  // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on
++  // Linux. See comment in OzonePlatform::PlatformProperties::supports_vaapi
++  // for more details. This will also require revisiting everything that's
++  // guarded by USE_VAAPI_X11. For example, if USE_VAAPI_X11 is true, but the
++  // user chooses the Wayland backend for Ozone at runtime, then many things (if
++  // not all) that we do for X11 won't apply.
++  if (!ui::OzonePlatform::GetInstance()->GetPlatformProperties().supports_vaapi)
++    return false;
++#endif
++
+   bool libraries_initialized = IsVaInitialized() && IsVa_drmInitialized();
+-#if defined(USE_X11)
+-  if (!features::IsUsingOzonePlatform())
+-    libraries_initialized = libraries_initialized && IsVa_x11Initialized();
++#if BUILDFLAG(USE_VAAPI_X11)
++  libraries_initialized = libraries_initialized && IsVa_x11Initialized();
+ #endif
+   if (!libraries_initialized)
+     return false;
+@@ -577,34 +587,25 @@ bool VADisplayState::Initialize() {
+   return success;
+ }
+ 
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+ 
+ absl::optional<VADisplay> GetVADisplayStateX11(const base::ScopedFD& drm_fd) {
+-  bool use_drm_as_fallback = false;
+   switch (gl::GetGLImplementation()) {
+     case gl::kGLImplementationEGLGLES2:
+       return vaGetDisplayDRM(drm_fd.get());
+ 
+     case gl::kGLImplementationNone:
+-      use_drm_as_fallback = true;
+-      FALLTHROUGH;
+ 
+     case gl::kGLImplementationDesktopGL: {
+-      if (!features::IsUsingOzonePlatform()) {
+-        VADisplay display =
+-            vaGetDisplay(x11::Connection::Get()->GetXlibDisplay());
+-        if (vaDisplayIsValid(display))
+-          return display;
+-        return vaGetDisplayDRM(drm_fd.get());
+-      }
+-      break;
++      VADisplay display =
++          vaGetDisplay(x11::Connection::Get()->GetXlibDisplay());
++      if (vaDisplayIsValid(display))
++        return display;
++      return vaGetDisplayDRM(drm_fd.get());
+     }
+ 
+-    case gl::kGLImplementationEGLANGLE: {
+-      if (!features::IsUsingOzonePlatform())
+-        return vaGetDisplay(x11::Connection::Get()->GetXlibDisplay());
+-      break;
+-    }
++    case gl::kGLImplementationEGLANGLE:
++      return vaGetDisplay(x11::Connection::Get()->GetXlibDisplay());
+ 
+     default:
+       LOG(WARNING) << "VAAPI video acceleration not available for "
+@@ -612,10 +613,6 @@ absl::optional<VADisplay> GetVADisplayStateX11(const base::ScopedFD& drm_fd) {
+                           gl::GetGLImplementationParts());
+       return absl::nullopt;
+   }
+-
+-  if (use_drm_as_fallback)
+-    return vaGetDisplayDRM(drm_fd.get());
+-  return absl::nullopt;
+ }
+ 
+ #else
+@@ -633,11 +630,11 @@ absl::optional<VADisplay> GetVADisplayState(const base::ScopedFD& drm_fd) {
+   }
+ }
+ 
+-#endif  // defined(USE_X11)
++#endif  // BUILDFLAG(USE_VAAPI_X11)
+ 
+ bool VADisplayState::InitializeVaDisplay_Locked() {
+   absl::optional<VADisplay> display =
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+       GetVADisplayStateX11(drm_fd_);
+ #else
+       GetVADisplayState(drm_fd_);
+@@ -702,10 +699,9 @@ bool VADisplayState::InitializeOnce() {
+   if (!InitializeVaDisplay_Locked() || !InitializeVaDriver_Locked())
+     return false;
+ 
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+   if (gl::GetGLImplementation() == gl::kGLImplementationEGLANGLE &&
+       implementation_type_ == VAImplementation::kIntelIHD) {
+-    DCHECK(!features::IsUsingOzonePlatform());
+     constexpr char libva_driver_impl_env[] = "LIBVA_DRIVER_NAME";
+     // TODO(crbug/1116703) The libva intel-media driver has a known segfault in
+     // vaPutSurface, so until this is fixed, fall back to the i965 driver. There
+@@ -722,7 +718,7 @@ bool VADisplayState::InitializeOnce() {
+     if (!InitializeVaDisplay_Locked() || !InitializeVaDriver_Locked())
+       return false;
+   }
+-#endif  // USE_X11
++#endif  // BUILDFLAG(USE_VAAPI_X11)
+ 
+   return true;
+ }
+@@ -2452,11 +2448,10 @@ bool VaapiWrapper::MapAndCopyAndExecute(
+   return Execute_Locked(va_surface_id, va_buffer_ids);
+ }
+ 
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+ bool VaapiWrapper::PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
+                                         x11::Pixmap x_pixmap,
+                                         gfx::Size dest_size) {
+-  DCHECK(!features::IsUsingOzonePlatform());
+   base::AutoLock auto_lock(*va_lock_);
+ 
+   VAStatus va_res = vaSyncSurface(va_display_, va_surface_id);
+@@ -2470,7 +2465,7 @@ bool VaapiWrapper::PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
+   VA_SUCCESS_OR_RETURN(va_res, VaapiFunctions::kVAPutSurface, false);
+   return true;
+ }
+-#endif  // USE_X11
++#endif  // BUILDFLAG(USE_VAAPI_X11)
+ 
+ std::unique_ptr<ScopedVAImage> VaapiWrapper::CreateVaImage(
+     VASurfaceID va_surface_id,
+@@ -2844,9 +2839,8 @@ void VaapiWrapper::PreSandboxInitialization() {
+ 
+   paths[kModuleVa].push_back(std::string("libva.so.") + va_suffix);
+   paths[kModuleVa_drm].push_back(std::string("libva-drm.so.") + va_suffix);
+-#if defined(USE_X11)
+-  if (!features::IsUsingOzonePlatform())
+-    paths[kModuleVa_x11].push_back(std::string("libva-x11.so.") + va_suffix);
++#if BUILDFLAG(USE_VAAPI_X11)
++  paths[kModuleVa_x11].push_back(std::string("libva-x11.so.") + va_suffix);
+ #endif
+ #if BUILDFLAG(IS_CHROMEOS_ASH)
+   paths[kModuleVa_prot].push_back(std::string("libva.so.") + va_suffix);
+diff --git a/media/gpu/vaapi/vaapi_wrapper.h b/media/gpu/vaapi/vaapi_wrapper.h
+index 0e3da53624..88ffcd0799 100644
+--- a/media/gpu/vaapi/vaapi_wrapper.h
++++ b/media/gpu/vaapi/vaapi_wrapper.h
+@@ -36,9 +36,9 @@
+ #include "third_party/abseil-cpp/absl/types/optional.h"
+ #include "ui/gfx/geometry/size.h"
+ 
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+ #include "ui/gfx/x/xproto.h"  // nogncheck
+-#endif  // USE_X11
++#endif                        // BUILDFLAG(USE_VAAPI_X11)
+ 
+ namespace gfx {
+ enum class BufferFormat;
+@@ -426,13 +426,13 @@ class MEDIA_GPU_EXPORT VaapiWrapper
+       const std::vector<std::pair<VABufferID, VABufferDescriptor>>& va_buffers)
+       WARN_UNUSED_RESULT;
+ 
+-#if defined(USE_X11)
++#if BUILDFLAG(USE_VAAPI_X11)
+   // Put data from |va_surface_id| into |x_pixmap| of size
+   // |dest_size|, converting/scaling to it.
+   bool PutSurfaceIntoPixmap(VASurfaceID va_surface_id,
+                             x11::Pixmap x_pixmap,
+                             gfx::Size dest_size) WARN_UNUSED_RESULT;
+-#endif  // USE_X11
++#endif  // BUILDFLAG(USE_VAAPI_X11)
+ 
+   // Creates a ScopedVAImage from a VASurface |va_surface_id| and map it into
+   // memory with the given |format| and |size|. If |format| is not equal to the
+diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc
+index 8889828e0f..963dc7a0cd 100644
+--- a/ui/ozone/platform/x11/ozone_platform_x11.cc
++++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
+@@ -208,6 +208,9 @@ class OzonePlatformX11 : public OzonePlatform,
+       properties->supports_global_application_menus = true;
+       properties->app_modal_dialogs_use_event_blocker = true;
+       properties->fetch_buffer_formats_for_gmb_on_gpu = true;
++#if defined(OS_LINUX)
++      properties->supports_vaapi = true;
++#endif
+ 
+       initialised = true;
+     }
+diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h
+index df95f07486..2d7f44bbfa 100644
+--- a/ui/ozone/public/ozone_platform.h
++++ b/ui/ozone/public/ozone_platform.h
+@@ -15,6 +15,7 @@
+ #include "base/macros.h"
+ #include "base/message_loop/message_pump_type.h"
+ #include "base/single_thread_task_runner.h"
++#include "build/build_config.h"
+ #include "mojo/public/cpp/bindings/binder_map.h"
+ #include "ui/gfx/buffer_types.h"
+ #include "ui/gfx/native_widget_types.h"
+@@ -154,6 +155,15 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform {
+     // Determines whether buffer formats should be fetched on GPU and passed
+     // back via gpu extra info.
+     bool fetch_buffer_formats_for_gmb_on_gpu = false;
++
++#if defined(OS_LINUX)
++    // TODO(crbug.com/1116701): add vaapi support for other Ozone platforms on
++    // Linux. At the moment, VA-API Linux implementation supports only X11
++    // backend. This implementation must be refactored to support Ozone
++    // properly. As a temporary solution, VA-API on Linux checks if vaapi is
++    // supported (which implicitly means that it is Ozone/X11).
++    bool supports_vaapi = false;
++#endif
+   };
+ 
+   // Groups platform properties that can only be known at run time.

Deleted: pipewire-do-not-typecheck-the-portal-session_handle.patch
===================================================================
--- pipewire-do-not-typecheck-the-portal-session_handle.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ pipewire-do-not-typecheck-the-portal-session_handle.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,44 +0,0 @@
-From 408e4da26f1b782005ab10307c83892055d7ef45 Mon Sep 17 00:00:00 2001
-From: Robert Mader <robert.mader at posteo.de>
-Date: Mon, 20 Sep 2021 15:15:31 +0200
-Subject: [PATCH] Pipewire: Do not typecheck the portal session_handle
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Desktop sharing via Pipewire will break for clients updating to
-xdg-desktop-portal 1.10 due to a bug fix in the API implementation[1].
-
-This ports over a fix from OBS Studio[2] that also is used in the
-downstream Firefox WebRTC copy[3].
-
-1: https://github.com/flatpak/xdg-desktop-portal/pull/609
-2: https://github.com/obsproject/obs-studio/pull/5294
-3: https://phabricator.services.mozilla.com/D126053
-Bug: webrtc:13192
-Change-Id: I497dd1bb53cc39dee3732c2e0014e2e36a7afb6c
-Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232329
-Reviewed-by: Erik Språng <sprang at webrtc.org>
-Reviewed-by: Tommi <tommi at webrtc.org>
-Commit-Queue: Tommi <tommi at webrtc.org>
-Cr-Commit-Position: refs/heads/main@{#35153}
----
- modules/desktop_capture/linux/base_capturer_pipewire.cc | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/modules/desktop_capture/linux/base_capturer_pipewire.cc b/modules/desktop_capture/linux/base_capturer_pipewire.cc
-index 2d5e973..45229b2 100644
---- a/modules/desktop_capture/linux/base_capturer_pipewire.cc
-+++ b/modules/desktop_capture/linux/base_capturer_pipewire.cc
-@@ -801,8 +801,9 @@ void BaseCapturerPipeWire::OnSessionRequestResponseSignal(
-   Scoped<GVariant> response_data;
-   g_variant_get(parameters, "(u at a{sv})", &portal_response,
-                 response_data.receive());
--  g_variant_lookup(response_data.get(), "session_handle", "s",
--                   &that->session_handle_);
-+  Scoped<GVariant> session_handle(
-+      g_variant_lookup_value(response_data.get(), "session_handle", nullptr));
-+  that->session_handle_ = g_variant_dup_string(session_handle.get(), nullptr);
- 
-   if (!that->session_handle_ || portal_response) {
-     RTC_LOG(LS_ERROR)

Copied: chromium/repos/extra-x86_64/pipewire-do-not-typecheck-the-portal-session_handle.patch (from rev 426785, chromium/trunk/pipewire-do-not-typecheck-the-portal-session_handle.patch)
===================================================================
--- pipewire-do-not-typecheck-the-portal-session_handle.patch	                        (rev 0)
+++ pipewire-do-not-typecheck-the-portal-session_handle.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,44 @@
+From 408e4da26f1b782005ab10307c83892055d7ef45 Mon Sep 17 00:00:00 2001
+From: Robert Mader <robert.mader at posteo.de>
+Date: Mon, 20 Sep 2021 15:15:31 +0200
+Subject: [PATCH] Pipewire: Do not typecheck the portal session_handle
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Desktop sharing via Pipewire will break for clients updating to
+xdg-desktop-portal 1.10 due to a bug fix in the API implementation[1].
+
+This ports over a fix from OBS Studio[2] that also is used in the
+downstream Firefox WebRTC copy[3].
+
+1: https://github.com/flatpak/xdg-desktop-portal/pull/609
+2: https://github.com/obsproject/obs-studio/pull/5294
+3: https://phabricator.services.mozilla.com/D126053
+Bug: webrtc:13192
+Change-Id: I497dd1bb53cc39dee3732c2e0014e2e36a7afb6c
+Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232329
+Reviewed-by: Erik Språng <sprang at webrtc.org>
+Reviewed-by: Tommi <tommi at webrtc.org>
+Commit-Queue: Tommi <tommi at webrtc.org>
+Cr-Commit-Position: refs/heads/main@{#35153}
+---
+ modules/desktop_capture/linux/base_capturer_pipewire.cc | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/modules/desktop_capture/linux/base_capturer_pipewire.cc b/modules/desktop_capture/linux/base_capturer_pipewire.cc
+index 2d5e973..45229b2 100644
+--- a/modules/desktop_capture/linux/base_capturer_pipewire.cc
++++ b/modules/desktop_capture/linux/base_capturer_pipewire.cc
+@@ -801,8 +801,9 @@ void BaseCapturerPipeWire::OnSessionRequestResponseSignal(
+   Scoped<GVariant> response_data;
+   g_variant_get(parameters, "(u at a{sv})", &portal_response,
+                 response_data.receive());
+-  g_variant_lookup(response_data.get(), "session_handle", "s",
+-                   &that->session_handle_);
++  Scoped<GVariant> session_handle(
++      g_variant_lookup_value(response_data.get(), "session_handle", nullptr));
++  that->session_handle_ = g_variant_dup_string(session_handle.get(), nullptr);
+ 
+   if (!that->session_handle_ || portal_response) {
+     RTC_LOG(LS_ERROR)

Deleted: replace-blacklist-with-ignorelist.patch
===================================================================
--- replace-blacklist-with-ignorelist.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ replace-blacklist-with-ignorelist.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,196 +0,0 @@
-From 9d080c0934b848ee4a05013c78641e612fcc1e03 Mon Sep 17 00:00:00 2001
-From: Dylan Cutler <dylancutler at google.com>
-Date: Wed, 26 May 2021 16:39:52 +0000
-Subject: [PATCH] Reland "Replace 'blacklist' with 'ignorelist' in
- ./tools/msan/."
-
-This is a reland of 3b6263f2eece1264b052dfdcbc03b851d5abfb48
-
-Relanding now that https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2897974 is merged
-
-Original change's description:
-> Replace 'blacklist' with 'ignorelist' in ./tools/msan/.
->
-> Bug: 1097272, 1097268
-> Change-Id: Id5c8227a5bfb1ffaec82d3168b609085b10c8297
-> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2867730
-> Commit-Queue: Dylan Cutler <dylancutler at google.com>
-> Reviewed-by: Nico Weber <thakis at chromium.org>
-> Reviewed-by: Jonathan Metzman <metzman at chromium.org>
-> Cr-Commit-Position: refs/heads/master@{#883035}
-
-Bug: 1097272
-Bug: 1097268
-Change-Id: I11a5bc8972680c95fb1dab95ed3b707ed76f4667
-Cq-Include-Trybots: luci.chromium.try:chromeos-amd64-generic-cfi-thin-lto-rel
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2911096
-Commit-Queue: Dylan Cutler <dylancutler at google.com>
-Reviewed-by: Nico Weber <thakis at chromium.org>
-Cr-Commit-Position: refs/heads/master@{#886773}
----
- build/config/sanitizers/BUILD.gn             | 44 ++++++++++----------
- build_overrides/build.gni                    | 14 +++----
- tools/msan/{blacklist.txt => ignorelist.txt} |  0
- 3 files changed, 29 insertions(+), 29 deletions(-)
- rename tools/msan/{blacklist.txt => ignorelist.txt} (100%)
-
-diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn
-index aaaad023474d..55b388a43743 100644
---- a/build/config/sanitizers/BUILD.gn
-+++ b/build/config/sanitizers/BUILD.gn
-@@ -272,11 +272,11 @@ config("asan_flags") {
-   if (is_asan) {
-     cflags += [ "-fsanitize=address" ]
-     if (is_win) {
--      if (!defined(asan_win_blacklist_path)) {
--        asan_win_blacklist_path =
-+      if (!defined(asan_win_blocklist_path)) {
-+        asan_win_blocklist_path =
-             rebase_path("//tools/memory/asan/blocklist_win.txt", root_build_dir)
-       }
--      cflags += [ "-fsanitize-blacklist=$asan_win_blacklist_path" ]
-+      cflags += [ "-fsanitize-ignorelist=$asan_win_blocklist_path" ]
-     }
-   }
- }
-@@ -306,13 +306,13 @@ config("link_shared_library") {
- config("cfi_flags") {
-   cflags = []
-   if (is_cfi && current_toolchain == default_toolchain) {
--    if (!defined(cfi_blacklist_path)) {
--      cfi_blacklist_path =
-+    if (!defined(cfi_ignorelist_path)) {
-+      cfi_ignorelist_path =
-           rebase_path("//tools/cfi/ignores.txt", root_build_dir)
-     }
-     cflags += [
-       "-fsanitize=cfi-vcall",
--      "-fsanitize-blacklist=$cfi_blacklist_path",
-+      "-fsanitize-ignorelist=$cfi_ignorelist_path",
-     ]
- 
-     if (use_cfi_cast) {
-@@ -409,14 +409,14 @@ config("msan_flags") {
-   if (is_msan) {
-     assert(is_linux || is_chromeos,
-            "msan only supported on linux x86_64/ChromeOS")
--    if (!defined(msan_blacklist_path)) {
--      msan_blacklist_path =
--          rebase_path("//tools/msan/blacklist.txt", root_build_dir)
-+    if (!defined(msan_ignorelist_path)) {
-+      msan_ignorelist_path =
-+          rebase_path("//tools/msan/ignorelist.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=memory",
-       "-fsanitize-memory-track-origins=$msan_track_origins",
--      "-fsanitize-blacklist=$msan_blacklist_path",
-+      "-fsanitize-ignorelist=$msan_ignorelist_path",
-     ]
-   }
- }
-@@ -424,13 +424,13 @@ config("msan_flags") {
- config("tsan_flags") {
-   if (is_tsan) {
-     assert(is_linux || is_chromeos, "tsan only supported on linux x86_64")
--    if (!defined(tsan_blacklist_path)) {
--      tsan_blacklist_path =
-+    if (!defined(tsan_ignorelist_path)) {
-+      tsan_ignorelist_path =
-           rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=thread",
--      "-fsanitize-blacklist=$tsan_blacklist_path",
-+      "-fsanitize-ignorelist=$tsan_ignorelist_path",
-     ]
-   }
- }
-@@ -438,8 +438,8 @@ config("tsan_flags") {
- config("ubsan_flags") {
-   cflags = []
-   if (is_ubsan) {
--    if (!defined(ubsan_blacklist_path)) {
--      ubsan_blacklist_path =
-+    if (!defined(ubsan_ignorelist_path)) {
-+      ubsan_ignorelist_path =
-           rebase_path("//tools/ubsan/ignorelist.txt", root_build_dir)
-     }
-     cflags += [
-@@ -456,7 +456,7 @@ config("ubsan_flags") {
-       "-fsanitize=signed-integer-overflow",
-       "-fsanitize=unreachable",
-       "-fsanitize=vla-bound",
--      "-fsanitize-blacklist=$ubsan_blacklist_path",
-+      "-fsanitize-ignorelist=$ubsan_ignorelist_path",
-     ]
- 
-     # Chromecast ubsan builds fail to compile with these
-@@ -486,8 +486,8 @@ config("ubsan_no_recover") {
- 
- config("ubsan_security_flags") {
-   if (is_ubsan_security) {
--    if (!defined(ubsan_security_blacklist_path)) {
--      ubsan_security_blacklist_path =
-+    if (!defined(ubsan_security_ignorelist_path)) {
-+      ubsan_security_ignorelist_path =
-           rebase_path("//tools/ubsan/security_ignorelist.txt", root_build_dir)
-     }
-     cflags = [
-@@ -495,7 +495,7 @@ config("ubsan_security_flags") {
-       "-fsanitize=shift",
-       "-fsanitize=signed-integer-overflow",
-       "-fsanitize=vla-bound",
--      "-fsanitize-blacklist=$ubsan_security_blacklist_path",
-+      "-fsanitize-ignorelist=$ubsan_security_ignorelist_path",
-     ]
-   }
- }
-@@ -508,13 +508,13 @@ config("ubsan_null_flags") {
- 
- config("ubsan_vptr_flags") {
-   if (is_ubsan_vptr) {
--    if (!defined(ubsan_vptr_blacklist_path)) {
--      ubsan_vptr_blacklist_path =
-+    if (!defined(ubsan_vptr_ignorelist_path)) {
-+      ubsan_vptr_ignorelist_path =
-           rebase_path("//tools/ubsan/vptr_ignorelist.txt", root_build_dir)
-     }
-     cflags = [
-       "-fsanitize=vptr",
--      "-fsanitize-blacklist=$ubsan_vptr_blacklist_path",
-+      "-fsanitize-ignorelist=$ubsan_vptr_ignorelist_path",
-     ]
-   }
- }
-diff --git a/build_overrides/build.gni b/build_overrides/build.gni
-index 82627b03653f..f3e563ab701b 100644
---- a/build_overrides/build.gni
-+++ b/build_overrides/build.gni
-@@ -42,15 +42,15 @@ declare_args() {
- # Allows different projects to specify their own suppression/ignore lists for
- # sanitizer tools.
- # asan_suppressions_file = "path/to/asan_suppressions.cc"
--# asan_win_blacklist_path = "path/to/asan/blocklist_win.txt"
-+# asan_win_ignorelist_path = "path/to/asan/blocklist_win.txt"
- # lsan_suppressions_file = "path/to/lsan_suppressions.cc"
- # tsan_suppressions_file = "path/to/tsan_suppressions.cc"
--# tsan_blacklist_path = "path/to/tsan/ignores.txt"
--# msan_blacklist_path = "path/to/msan/blacklist.txt"
--# ubsan_blacklist_path = "path/to/ubsan/blacklist.txt"
--# ubsan_vptr_blacklist_path = "path/to/ubsan/vptr_blacklist.txt"
--# ubsan_security_blacklist_path = "path/to/ubsan/security_blacklist.txt"
--# cfi_blacklist_path = "path/to/cfi/ignores.txt"
-+# tsan_ignorelist_path = "path/to/tsan/ignores.txt"
-+# msan_ignorelist_path = "path/to/msan/ignorelist.txt"
-+# ubsan_ignorelist_path = "path/to/ubsan/ignorelist.txt"
-+# ubsan_vptr_ignorelist_path = "path/to/ubsan/vptr_ignorelist.txt"
-+# ubsan_security_ignorelist_path = "path/to/ubsan/security_ignorelist.txt"
-+# cfi_ignorelist_path = "path/to/cfi/ignores.txt"
- 
- declare_args() {
-   # Android 32-bit non-component, non-clang builds cannot have symbol_level=2
-diff --git a/tools/msan/blacklist.txt b/tools/msan/ignorelist.txt
-similarity index 100%
-rename from tools/msan/blacklist.txt
-rename to tools/msan/ignorelist.txt

Copied: chromium/repos/extra-x86_64/replace-blacklist-with-ignorelist.patch (from rev 426785, chromium/trunk/replace-blacklist-with-ignorelist.patch)
===================================================================
--- replace-blacklist-with-ignorelist.patch	                        (rev 0)
+++ replace-blacklist-with-ignorelist.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,196 @@
+From 9d080c0934b848ee4a05013c78641e612fcc1e03 Mon Sep 17 00:00:00 2001
+From: Dylan Cutler <dylancutler at google.com>
+Date: Wed, 26 May 2021 16:39:52 +0000
+Subject: [PATCH] Reland "Replace 'blacklist' with 'ignorelist' in
+ ./tools/msan/."
+
+This is a reland of 3b6263f2eece1264b052dfdcbc03b851d5abfb48
+
+Relanding now that https://chromium-review.googlesource.com/c/chromiumos/overlays/chromiumos-overlay/+/2897974 is merged
+
+Original change's description:
+> Replace 'blacklist' with 'ignorelist' in ./tools/msan/.
+>
+> Bug: 1097272, 1097268
+> Change-Id: Id5c8227a5bfb1ffaec82d3168b609085b10c8297
+> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2867730
+> Commit-Queue: Dylan Cutler <dylancutler at google.com>
+> Reviewed-by: Nico Weber <thakis at chromium.org>
+> Reviewed-by: Jonathan Metzman <metzman at chromium.org>
+> Cr-Commit-Position: refs/heads/master@{#883035}
+
+Bug: 1097272
+Bug: 1097268
+Change-Id: I11a5bc8972680c95fb1dab95ed3b707ed76f4667
+Cq-Include-Trybots: luci.chromium.try:chromeos-amd64-generic-cfi-thin-lto-rel
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2911096
+Commit-Queue: Dylan Cutler <dylancutler at google.com>
+Reviewed-by: Nico Weber <thakis at chromium.org>
+Cr-Commit-Position: refs/heads/master@{#886773}
+---
+ build/config/sanitizers/BUILD.gn             | 44 ++++++++++----------
+ build_overrides/build.gni                    | 14 +++----
+ tools/msan/{blacklist.txt => ignorelist.txt} |  0
+ 3 files changed, 29 insertions(+), 29 deletions(-)
+ rename tools/msan/{blacklist.txt => ignorelist.txt} (100%)
+
+diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn
+index aaaad023474d..55b388a43743 100644
+--- a/build/config/sanitizers/BUILD.gn
++++ b/build/config/sanitizers/BUILD.gn
+@@ -272,11 +272,11 @@ config("asan_flags") {
+   if (is_asan) {
+     cflags += [ "-fsanitize=address" ]
+     if (is_win) {
+-      if (!defined(asan_win_blacklist_path)) {
+-        asan_win_blacklist_path =
++      if (!defined(asan_win_blocklist_path)) {
++        asan_win_blocklist_path =
+             rebase_path("//tools/memory/asan/blocklist_win.txt", root_build_dir)
+       }
+-      cflags += [ "-fsanitize-blacklist=$asan_win_blacklist_path" ]
++      cflags += [ "-fsanitize-ignorelist=$asan_win_blocklist_path" ]
+     }
+   }
+ }
+@@ -306,13 +306,13 @@ config("link_shared_library") {
+ config("cfi_flags") {
+   cflags = []
+   if (is_cfi && current_toolchain == default_toolchain) {
+-    if (!defined(cfi_blacklist_path)) {
+-      cfi_blacklist_path =
++    if (!defined(cfi_ignorelist_path)) {
++      cfi_ignorelist_path =
+           rebase_path("//tools/cfi/ignores.txt", root_build_dir)
+     }
+     cflags += [
+       "-fsanitize=cfi-vcall",
+-      "-fsanitize-blacklist=$cfi_blacklist_path",
++      "-fsanitize-ignorelist=$cfi_ignorelist_path",
+     ]
+ 
+     if (use_cfi_cast) {
+@@ -409,14 +409,14 @@ config("msan_flags") {
+   if (is_msan) {
+     assert(is_linux || is_chromeos,
+            "msan only supported on linux x86_64/ChromeOS")
+-    if (!defined(msan_blacklist_path)) {
+-      msan_blacklist_path =
+-          rebase_path("//tools/msan/blacklist.txt", root_build_dir)
++    if (!defined(msan_ignorelist_path)) {
++      msan_ignorelist_path =
++          rebase_path("//tools/msan/ignorelist.txt", root_build_dir)
+     }
+     cflags = [
+       "-fsanitize=memory",
+       "-fsanitize-memory-track-origins=$msan_track_origins",
+-      "-fsanitize-blacklist=$msan_blacklist_path",
++      "-fsanitize-ignorelist=$msan_ignorelist_path",
+     ]
+   }
+ }
+@@ -424,13 +424,13 @@ config("msan_flags") {
+ config("tsan_flags") {
+   if (is_tsan) {
+     assert(is_linux || is_chromeos, "tsan only supported on linux x86_64")
+-    if (!defined(tsan_blacklist_path)) {
+-      tsan_blacklist_path =
++    if (!defined(tsan_ignorelist_path)) {
++      tsan_ignorelist_path =
+           rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
+     }
+     cflags = [
+       "-fsanitize=thread",
+-      "-fsanitize-blacklist=$tsan_blacklist_path",
++      "-fsanitize-ignorelist=$tsan_ignorelist_path",
+     ]
+   }
+ }
+@@ -438,8 +438,8 @@ config("tsan_flags") {
+ config("ubsan_flags") {
+   cflags = []
+   if (is_ubsan) {
+-    if (!defined(ubsan_blacklist_path)) {
+-      ubsan_blacklist_path =
++    if (!defined(ubsan_ignorelist_path)) {
++      ubsan_ignorelist_path =
+           rebase_path("//tools/ubsan/ignorelist.txt", root_build_dir)
+     }
+     cflags += [
+@@ -456,7 +456,7 @@ config("ubsan_flags") {
+       "-fsanitize=signed-integer-overflow",
+       "-fsanitize=unreachable",
+       "-fsanitize=vla-bound",
+-      "-fsanitize-blacklist=$ubsan_blacklist_path",
++      "-fsanitize-ignorelist=$ubsan_ignorelist_path",
+     ]
+ 
+     # Chromecast ubsan builds fail to compile with these
+@@ -486,8 +486,8 @@ config("ubsan_no_recover") {
+ 
+ config("ubsan_security_flags") {
+   if (is_ubsan_security) {
+-    if (!defined(ubsan_security_blacklist_path)) {
+-      ubsan_security_blacklist_path =
++    if (!defined(ubsan_security_ignorelist_path)) {
++      ubsan_security_ignorelist_path =
+           rebase_path("//tools/ubsan/security_ignorelist.txt", root_build_dir)
+     }
+     cflags = [
+@@ -495,7 +495,7 @@ config("ubsan_security_flags") {
+       "-fsanitize=shift",
+       "-fsanitize=signed-integer-overflow",
+       "-fsanitize=vla-bound",
+-      "-fsanitize-blacklist=$ubsan_security_blacklist_path",
++      "-fsanitize-ignorelist=$ubsan_security_ignorelist_path",
+     ]
+   }
+ }
+@@ -508,13 +508,13 @@ config("ubsan_null_flags") {
+ 
+ config("ubsan_vptr_flags") {
+   if (is_ubsan_vptr) {
+-    if (!defined(ubsan_vptr_blacklist_path)) {
+-      ubsan_vptr_blacklist_path =
++    if (!defined(ubsan_vptr_ignorelist_path)) {
++      ubsan_vptr_ignorelist_path =
+           rebase_path("//tools/ubsan/vptr_ignorelist.txt", root_build_dir)
+     }
+     cflags = [
+       "-fsanitize=vptr",
+-      "-fsanitize-blacklist=$ubsan_vptr_blacklist_path",
++      "-fsanitize-ignorelist=$ubsan_vptr_ignorelist_path",
+     ]
+   }
+ }
+diff --git a/build_overrides/build.gni b/build_overrides/build.gni
+index 82627b03653f..f3e563ab701b 100644
+--- a/build_overrides/build.gni
++++ b/build_overrides/build.gni
+@@ -42,15 +42,15 @@ declare_args() {
+ # Allows different projects to specify their own suppression/ignore lists for
+ # sanitizer tools.
+ # asan_suppressions_file = "path/to/asan_suppressions.cc"
+-# asan_win_blacklist_path = "path/to/asan/blocklist_win.txt"
++# asan_win_ignorelist_path = "path/to/asan/blocklist_win.txt"
+ # lsan_suppressions_file = "path/to/lsan_suppressions.cc"
+ # tsan_suppressions_file = "path/to/tsan_suppressions.cc"
+-# tsan_blacklist_path = "path/to/tsan/ignores.txt"
+-# msan_blacklist_path = "path/to/msan/blacklist.txt"
+-# ubsan_blacklist_path = "path/to/ubsan/blacklist.txt"
+-# ubsan_vptr_blacklist_path = "path/to/ubsan/vptr_blacklist.txt"
+-# ubsan_security_blacklist_path = "path/to/ubsan/security_blacklist.txt"
+-# cfi_blacklist_path = "path/to/cfi/ignores.txt"
++# tsan_ignorelist_path = "path/to/tsan/ignores.txt"
++# msan_ignorelist_path = "path/to/msan/ignorelist.txt"
++# ubsan_ignorelist_path = "path/to/ubsan/ignorelist.txt"
++# ubsan_vptr_ignorelist_path = "path/to/ubsan/vptr_ignorelist.txt"
++# ubsan_security_ignorelist_path = "path/to/ubsan/security_ignorelist.txt"
++# cfi_ignorelist_path = "path/to/cfi/ignores.txt"
+ 
+ declare_args() {
+   # Android 32-bit non-component, non-clang builds cannot have symbol_level=2
+diff --git a/tools/msan/blacklist.txt b/tools/msan/ignorelist.txt
+similarity index 100%
+rename from tools/msan/blacklist.txt
+rename to tools/msan/ignorelist.txt

Deleted: sql-make-VirtualCursor-standard-layout-type.patch
===================================================================
--- sql-make-VirtualCursor-standard-layout-type.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ sql-make-VirtualCursor-standard-layout-type.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,238 +0,0 @@
-From 80368f8ba7a8bab13440463a254888311efe3986 Mon Sep 17 00:00:00 2001
-From: Stephan Hartmann <stha09 at googlemail.com>
-Date: Tue, 4 May 2021 15:00:19 +0000
-Subject: [PATCH] sql: make VirtualCursor standard layout type
-
-sql::recover::VirtualCursor needs to be a standard layout type, but
-has members of type std::unique_ptr. However, std::unique_ptr is not
-guaranteed to be standard layout. Compiling with clang combined with
-gcc-11 libstdc++ fails because of this. Replace std::unique_ptr with
-raw pointers.
-
-Bug: 1189788
-Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
----
- sql/recover_module/btree.cc  | 21 +++++++++++++++------
- sql/recover_module/btree.h   | 17 +++++++++++++----
- sql/recover_module/cursor.cc | 24 ++++++++++++------------
- sql/recover_module/cursor.h  |  2 +-
- sql/recover_module/pager.cc  |  7 +++----
- sql/recover_module/pager.h   |  5 +++--
- 6 files changed, 47 insertions(+), 29 deletions(-)
-
-diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
-index 9ecaafe8a3..839318abf9 100644
---- a/sql/recover_module/btree.cc
-+++ b/sql/recover_module/btree.cc
-@@ -135,16 +135,25 @@ static_assert(std::is_trivially_destructible<LeafPageDecoder>::value,
-               "Move the destructor to the .cc file if it's non-trival");
- #endif  // !DCHECK_IS_ON()
- 
--LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept
--    : page_id_(db_reader->page_id()),
--      db_reader_(db_reader),
--      cell_count_(ComputeCellCount(db_reader)),
--      next_read_index_(0),
--      last_record_size_(0) {
-+void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
-+  DCHECK(db_reader);
-   DCHECK(IsOnValidPage(db_reader));
-+  page_id_ = db_reader->page_id();
-+  db_reader_ = db_reader;
-+  cell_count_ = ComputeCellCount(db_reader);
-+  next_read_index_ = 0;
-+  last_record_size_ = 0;
-   DCHECK(DatabasePageReader::IsValidPageId(page_id_));
- }
- 
-+void LeafPageDecoder::Reset() {
-+  db_reader_ = nullptr;
-+  page_id_ = 0;
-+  cell_count_ = 0;
-+  next_read_index_ = 0;
-+  last_record_size_ = 0;
-+}
-+
- bool LeafPageDecoder::TryAdvance() {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   DCHECK(CanAdvance());
-diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h
-index d76d076bf6..33114b01fa 100644
---- a/sql/recover_module/btree.h
-+++ b/sql/recover_module/btree.h
-@@ -102,7 +102,7 @@ class LeafPageDecoder {
-   //
-   // |db_reader| must have been used to read an inner page of a table B-tree.
-   // |db_reader| must outlive this instance.
--  explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept;
-+  explicit LeafPageDecoder() noexcept = default;
-   ~LeafPageDecoder() noexcept = default;
- 
-   LeafPageDecoder(const LeafPageDecoder&) = delete;
-@@ -150,6 +150,15 @@ class LeafPageDecoder {
-   // read as long as CanAdvance() returns true.
-   bool TryAdvance();
- 
-+  // Initialize with DatabasePageReader
-+  void Initialize(DatabasePageReader* db_reader);
-+
-+  // Reset internal DatabasePageReader
-+  void Reset();
-+
-+  // True if DatabasePageReader is valid
-+  bool IsValid() { return (db_reader_ != nullptr); }
-+
-   // True if the given reader may point to an inner page in a table B-tree.
-   //
-   // The last ReadPage() call on |db_reader| must have succeeded.
-@@ -163,14 +172,14 @@ class LeafPageDecoder {
-   static int ComputeCellCount(DatabasePageReader* db_reader);
- 
-   // The number of the B-tree page this reader is reading.
--  const int64_t page_id_;
-+  int64_t page_id_;
-   // Used to read the tree page.
-   //
-   // Raw pointer usage is acceptable because this instance's owner is expected
-   // to ensure that the DatabasePageReader outlives this.
--  DatabasePageReader* const db_reader_;
-+  DatabasePageReader* db_reader_;
-   // Caches the ComputeCellCount() value for this reader's page.
--  const int cell_count_ = ComputeCellCount(db_reader_);
-+  int cell_count_;
- 
-   // The reader's cursor state.
-   //
-diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc
-index 0029ff9295..42548bc4b5 100644
---- a/sql/recover_module/cursor.cc
-+++ b/sql/recover_module/cursor.cc
-@@ -26,7 +26,7 @@ VirtualCursor::~VirtualCursor() {
- int VirtualCursor::First() {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   inner_decoders_.clear();
--  leaf_decoder_ = nullptr;
-+  leaf_decoder_.Reset();
- 
-   AppendPageDecoder(table_->root_page_id());
-   return Next();
-@@ -36,18 +36,18 @@ int VirtualCursor::Next() {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   record_reader_.Reset();
- 
--  while (!inner_decoders_.empty() || leaf_decoder_.get()) {
--    if (leaf_decoder_.get()) {
--      if (!leaf_decoder_->CanAdvance()) {
-+  while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) {
-+    if (leaf_decoder_.IsValid()) {
-+      if (!leaf_decoder_.CanAdvance()) {
-         // The leaf has been exhausted. Remove it from the DFS stack.
--        leaf_decoder_ = nullptr;
-+        leaf_decoder_.Reset();
-         continue;
-       }
--      if (!leaf_decoder_->TryAdvance())
-+      if (!leaf_decoder_.TryAdvance())
-         continue;
- 
--      if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(),
--                                      leaf_decoder_->last_record_offset())) {
-+      if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(),
-+                                      leaf_decoder_.last_record_offset())) {
-         continue;
-       }
-       if (!record_reader_.Initialize())
-@@ -99,13 +99,13 @@ int VirtualCursor::ReadColumn(int column_index,
- int64_t VirtualCursor::RowId() {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-   DCHECK(record_reader_.IsInitialized());
--  DCHECK(leaf_decoder_.get());
--  return leaf_decoder_->last_record_rowid();
-+  DCHECK(leaf_decoder_.IsValid());
-+  return leaf_decoder_.last_record_rowid();
- }
- 
- void VirtualCursor::AppendPageDecoder(int page_id) {
-   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
--  DCHECK(leaf_decoder_.get() == nullptr)
-+  DCHECK(!leaf_decoder_.IsValid())
-       << __func__
-       << " must only be called when the current path has no leaf decoder";
- 
-@@ -113,7 +113,7 @@ void VirtualCursor::AppendPageDecoder(int page_id) {
-     return;
- 
-   if (LeafPageDecoder::IsOnValidPage(&db_reader_)) {
--    leaf_decoder_ = std::make_unique<LeafPageDecoder>(&db_reader_);
-+    leaf_decoder_.Initialize(&db_reader_);
-     return;
-   }
- 
-diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
-index afcd6900e1..b15c31d425 100644
---- a/sql/recover_module/cursor.h
-+++ b/sql/recover_module/cursor.h
-@@ -129,7 +129,7 @@ class VirtualCursor {
-   std::vector<std::unique_ptr<InnerPageDecoder>> inner_decoders_;
- 
-   // Decodes the leaf page containing records.
--  std::unique_ptr<LeafPageDecoder> leaf_decoder_;
-+  LeafPageDecoder leaf_decoder_;
- 
-   SEQUENCE_CHECKER(sequence_checker_);
- };
-diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc
-index 58e75de270..5fe96204e5 100644
---- a/sql/recover_module/pager.cc
-+++ b/sql/recover_module/pager.cc
-@@ -23,8 +23,7 @@ static_assert(DatabasePageReader::kMaxPageId <= std::numeric_limits<int>::max(),
-               "ints are not appropriate for representing page IDs");
- 
- DatabasePageReader::DatabasePageReader(VirtualTable* table)
--    : page_data_(std::make_unique<uint8_t[]>(table->page_size())),
--      table_(table) {
-+    : page_data_(), table_(table) {
-   DCHECK(table != nullptr);
-   DCHECK(IsValidPageSize(table->page_size()));
- }
-@@ -57,8 +56,8 @@ int DatabasePageReader::ReadPage(int page_id) {
-                     std::numeric_limits<int64_t>::max(),
-                 "The |read_offset| computation above may overflow");
- 
--  int sqlite_status =
--      RawRead(sqlite_file, read_size, read_offset, page_data_.get());
-+  int sqlite_status = RawRead(sqlite_file, read_size, read_offset,
-+                              const_cast<uint8_t*>(page_data_.data()));
- 
-   // |page_id_| needs to be set to kInvalidPageId if the read failed.
-   // Otherwise, future ReadPage() calls with the previous |page_id_| value
-diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h
-index 0e388ddc3b..99314e30ff 100644
---- a/sql/recover_module/pager.h
-+++ b/sql/recover_module/pager.h
-@@ -5,6 +5,7 @@
- #ifndef SQL_RECOVER_MODULE_PAGER_H_
- #define SQL_RECOVER_MODULE_PAGER_H_
- 
-+#include <array>
- #include <cstdint>
- #include <memory>
- 
-@@ -70,7 +71,7 @@ class DatabasePageReader {
-     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-     DCHECK_NE(page_id_, kInvalidPageId)
-         << "Successful ReadPage() required before accessing pager state";
--    return page_data_.get();
-+    return page_data_.data();
-   }
- 
-   // The number of bytes in the page read by the last ReadPage() call.
-@@ -137,7 +138,7 @@ class DatabasePageReader {
-   int page_id_ = kInvalidPageId;
-   // Stores the bytes of the last page successfully read by ReadPage().
-   // The content is undefined if the last call to ReadPage() did not succeed.
--  const std::unique_ptr<uint8_t[]> page_data_;
-+  const std::array<uint8_t, kMaxPageSize> page_data_;
-   // Raw pointer usage is acceptable because this instance's owner is expected
-   // to ensure that the VirtualTable outlives this.
-   VirtualTable* const table_;

Copied: chromium/repos/extra-x86_64/sql-make-VirtualCursor-standard-layout-type.patch (from rev 426785, chromium/trunk/sql-make-VirtualCursor-standard-layout-type.patch)
===================================================================
--- sql-make-VirtualCursor-standard-layout-type.patch	                        (rev 0)
+++ sql-make-VirtualCursor-standard-layout-type.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,238 @@
+From 80368f8ba7a8bab13440463a254888311efe3986 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09 at googlemail.com>
+Date: Tue, 4 May 2021 15:00:19 +0000
+Subject: [PATCH] sql: make VirtualCursor standard layout type
+
+sql::recover::VirtualCursor needs to be a standard layout type, but
+has members of type std::unique_ptr. However, std::unique_ptr is not
+guaranteed to be standard layout. Compiling with clang combined with
+gcc-11 libstdc++ fails because of this. Replace std::unique_ptr with
+raw pointers.
+
+Bug: 1189788
+Change-Id: Ia6dc388cc5ef1c0f2afc75f8ca45b9f12687ca9c
+---
+ sql/recover_module/btree.cc  | 21 +++++++++++++++------
+ sql/recover_module/btree.h   | 17 +++++++++++++----
+ sql/recover_module/cursor.cc | 24 ++++++++++++------------
+ sql/recover_module/cursor.h  |  2 +-
+ sql/recover_module/pager.cc  |  7 +++----
+ sql/recover_module/pager.h   |  5 +++--
+ 6 files changed, 47 insertions(+), 29 deletions(-)
+
+diff --git a/sql/recover_module/btree.cc b/sql/recover_module/btree.cc
+index 9ecaafe8a3..839318abf9 100644
+--- a/sql/recover_module/btree.cc
++++ b/sql/recover_module/btree.cc
+@@ -135,16 +135,25 @@ static_assert(std::is_trivially_destructible<LeafPageDecoder>::value,
+               "Move the destructor to the .cc file if it's non-trival");
+ #endif  // !DCHECK_IS_ON()
+ 
+-LeafPageDecoder::LeafPageDecoder(DatabasePageReader* db_reader) noexcept
+-    : page_id_(db_reader->page_id()),
+-      db_reader_(db_reader),
+-      cell_count_(ComputeCellCount(db_reader)),
+-      next_read_index_(0),
+-      last_record_size_(0) {
++void LeafPageDecoder::Initialize(DatabasePageReader* db_reader) {
++  DCHECK(db_reader);
+   DCHECK(IsOnValidPage(db_reader));
++  page_id_ = db_reader->page_id();
++  db_reader_ = db_reader;
++  cell_count_ = ComputeCellCount(db_reader);
++  next_read_index_ = 0;
++  last_record_size_ = 0;
+   DCHECK(DatabasePageReader::IsValidPageId(page_id_));
+ }
+ 
++void LeafPageDecoder::Reset() {
++  db_reader_ = nullptr;
++  page_id_ = 0;
++  cell_count_ = 0;
++  next_read_index_ = 0;
++  last_record_size_ = 0;
++}
++
+ bool LeafPageDecoder::TryAdvance() {
+   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+   DCHECK(CanAdvance());
+diff --git a/sql/recover_module/btree.h b/sql/recover_module/btree.h
+index d76d076bf6..33114b01fa 100644
+--- a/sql/recover_module/btree.h
++++ b/sql/recover_module/btree.h
+@@ -102,7 +102,7 @@ class LeafPageDecoder {
+   //
+   // |db_reader| must have been used to read an inner page of a table B-tree.
+   // |db_reader| must outlive this instance.
+-  explicit LeafPageDecoder(DatabasePageReader* db_reader) noexcept;
++  explicit LeafPageDecoder() noexcept = default;
+   ~LeafPageDecoder() noexcept = default;
+ 
+   LeafPageDecoder(const LeafPageDecoder&) = delete;
+@@ -150,6 +150,15 @@ class LeafPageDecoder {
+   // read as long as CanAdvance() returns true.
+   bool TryAdvance();
+ 
++  // Initialize with DatabasePageReader
++  void Initialize(DatabasePageReader* db_reader);
++
++  // Reset internal DatabasePageReader
++  void Reset();
++
++  // True if DatabasePageReader is valid
++  bool IsValid() { return (db_reader_ != nullptr); }
++
+   // True if the given reader may point to an inner page in a table B-tree.
+   //
+   // The last ReadPage() call on |db_reader| must have succeeded.
+@@ -163,14 +172,14 @@ class LeafPageDecoder {
+   static int ComputeCellCount(DatabasePageReader* db_reader);
+ 
+   // The number of the B-tree page this reader is reading.
+-  const int64_t page_id_;
++  int64_t page_id_;
+   // Used to read the tree page.
+   //
+   // Raw pointer usage is acceptable because this instance's owner is expected
+   // to ensure that the DatabasePageReader outlives this.
+-  DatabasePageReader* const db_reader_;
++  DatabasePageReader* db_reader_;
+   // Caches the ComputeCellCount() value for this reader's page.
+-  const int cell_count_ = ComputeCellCount(db_reader_);
++  int cell_count_;
+ 
+   // The reader's cursor state.
+   //
+diff --git a/sql/recover_module/cursor.cc b/sql/recover_module/cursor.cc
+index 0029ff9295..42548bc4b5 100644
+--- a/sql/recover_module/cursor.cc
++++ b/sql/recover_module/cursor.cc
+@@ -26,7 +26,7 @@ VirtualCursor::~VirtualCursor() {
+ int VirtualCursor::First() {
+   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+   inner_decoders_.clear();
+-  leaf_decoder_ = nullptr;
++  leaf_decoder_.Reset();
+ 
+   AppendPageDecoder(table_->root_page_id());
+   return Next();
+@@ -36,18 +36,18 @@ int VirtualCursor::Next() {
+   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+   record_reader_.Reset();
+ 
+-  while (!inner_decoders_.empty() || leaf_decoder_.get()) {
+-    if (leaf_decoder_.get()) {
+-      if (!leaf_decoder_->CanAdvance()) {
++  while (!inner_decoders_.empty() || leaf_decoder_.IsValid()) {
++    if (leaf_decoder_.IsValid()) {
++      if (!leaf_decoder_.CanAdvance()) {
+         // The leaf has been exhausted. Remove it from the DFS stack.
+-        leaf_decoder_ = nullptr;
++        leaf_decoder_.Reset();
+         continue;
+       }
+-      if (!leaf_decoder_->TryAdvance())
++      if (!leaf_decoder_.TryAdvance())
+         continue;
+ 
+-      if (!payload_reader_.Initialize(leaf_decoder_->last_record_size(),
+-                                      leaf_decoder_->last_record_offset())) {
++      if (!payload_reader_.Initialize(leaf_decoder_.last_record_size(),
++                                      leaf_decoder_.last_record_offset())) {
+         continue;
+       }
+       if (!record_reader_.Initialize())
+@@ -99,13 +99,13 @@ int VirtualCursor::ReadColumn(int column_index,
+ int64_t VirtualCursor::RowId() {
+   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+   DCHECK(record_reader_.IsInitialized());
+-  DCHECK(leaf_decoder_.get());
+-  return leaf_decoder_->last_record_rowid();
++  DCHECK(leaf_decoder_.IsValid());
++  return leaf_decoder_.last_record_rowid();
+ }
+ 
+ void VirtualCursor::AppendPageDecoder(int page_id) {
+   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+-  DCHECK(leaf_decoder_.get() == nullptr)
++  DCHECK(!leaf_decoder_.IsValid())
+       << __func__
+       << " must only be called when the current path has no leaf decoder";
+ 
+@@ -113,7 +113,7 @@ void VirtualCursor::AppendPageDecoder(int page_id) {
+     return;
+ 
+   if (LeafPageDecoder::IsOnValidPage(&db_reader_)) {
+-    leaf_decoder_ = std::make_unique<LeafPageDecoder>(&db_reader_);
++    leaf_decoder_.Initialize(&db_reader_);
+     return;
+   }
+ 
+diff --git a/sql/recover_module/cursor.h b/sql/recover_module/cursor.h
+index afcd6900e1..b15c31d425 100644
+--- a/sql/recover_module/cursor.h
++++ b/sql/recover_module/cursor.h
+@@ -129,7 +129,7 @@ class VirtualCursor {
+   std::vector<std::unique_ptr<InnerPageDecoder>> inner_decoders_;
+ 
+   // Decodes the leaf page containing records.
+-  std::unique_ptr<LeafPageDecoder> leaf_decoder_;
++  LeafPageDecoder leaf_decoder_;
+ 
+   SEQUENCE_CHECKER(sequence_checker_);
+ };
+diff --git a/sql/recover_module/pager.cc b/sql/recover_module/pager.cc
+index 58e75de270..5fe96204e5 100644
+--- a/sql/recover_module/pager.cc
++++ b/sql/recover_module/pager.cc
+@@ -23,8 +23,7 @@ static_assert(DatabasePageReader::kMaxPageId <= std::numeric_limits<int>::max(),
+               "ints are not appropriate for representing page IDs");
+ 
+ DatabasePageReader::DatabasePageReader(VirtualTable* table)
+-    : page_data_(std::make_unique<uint8_t[]>(table->page_size())),
+-      table_(table) {
++    : page_data_(), table_(table) {
+   DCHECK(table != nullptr);
+   DCHECK(IsValidPageSize(table->page_size()));
+ }
+@@ -57,8 +56,8 @@ int DatabasePageReader::ReadPage(int page_id) {
+                     std::numeric_limits<int64_t>::max(),
+                 "The |read_offset| computation above may overflow");
+ 
+-  int sqlite_status =
+-      RawRead(sqlite_file, read_size, read_offset, page_data_.get());
++  int sqlite_status = RawRead(sqlite_file, read_size, read_offset,
++                              const_cast<uint8_t*>(page_data_.data()));
+ 
+   // |page_id_| needs to be set to kInvalidPageId if the read failed.
+   // Otherwise, future ReadPage() calls with the previous |page_id_| value
+diff --git a/sql/recover_module/pager.h b/sql/recover_module/pager.h
+index 0e388ddc3b..99314e30ff 100644
+--- a/sql/recover_module/pager.h
++++ b/sql/recover_module/pager.h
+@@ -5,6 +5,7 @@
+ #ifndef SQL_RECOVER_MODULE_PAGER_H_
+ #define SQL_RECOVER_MODULE_PAGER_H_
+ 
++#include <array>
+ #include <cstdint>
+ #include <memory>
+ 
+@@ -70,7 +71,7 @@ class DatabasePageReader {
+     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+     DCHECK_NE(page_id_, kInvalidPageId)
+         << "Successful ReadPage() required before accessing pager state";
+-    return page_data_.get();
++    return page_data_.data();
+   }
+ 
+   // The number of bytes in the page read by the last ReadPage() call.
+@@ -137,7 +138,7 @@ class DatabasePageReader {
+   int page_id_ = kInvalidPageId;
+   // Stores the bytes of the last page successfully read by ReadPage().
+   // The content is undefined if the last call to ReadPage() did not succeed.
+-  const std::unique_ptr<uint8_t[]> page_data_;
++  const std::array<uint8_t, kMaxPageSize> page_data_;
+   // Raw pointer usage is acceptable because this instance's owner is expected
+   // to ensure that the VirtualTable outlives this.
+   VirtualTable* const table_;

Deleted: unexpire-accelerated-video-decode-flag.patch
===================================================================
--- unexpire-accelerated-video-decode-flag.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ unexpire-accelerated-video-decode-flag.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,11 +0,0 @@
---- chrome/browser/flag-metadata.json.orig	2021-09-21 18:34:38.740426608 +0000
-+++ chrome/browser/flag-metadata.json	2021-09-21 18:35:09.392000797 +0000
-@@ -1285,7 +1285,7 @@
-   {
-     "name": "enable-accelerated-video-decode",
-     "owners": [ "media-dev at chromium.org" ],
--    "expiry_milestone": 93
-+    "expiry_milestone": 99
-   },
-   {
-     "name": "enable-accessibility-live-caption",

Copied: chromium/repos/extra-x86_64/unexpire-accelerated-video-decode-flag.patch (from rev 426785, chromium/trunk/unexpire-accelerated-video-decode-flag.patch)
===================================================================
--- unexpire-accelerated-video-decode-flag.patch	                        (rev 0)
+++ unexpire-accelerated-video-decode-flag.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,11 @@
+--- chrome/browser/flag-metadata.json.orig	2021-09-21 18:34:38.740426608 +0000
++++ chrome/browser/flag-metadata.json	2021-09-21 18:35:09.392000797 +0000
+@@ -1285,7 +1285,7 @@
+   {
+     "name": "enable-accelerated-video-decode",
+     "owners": [ "media-dev at chromium.org" ],
+-    "expiry_milestone": 93
++    "expiry_milestone": 99
+   },
+   {
+     "name": "enable-accessibility-live-caption",

Deleted: use-ffile-compilation-dir.patch
===================================================================
--- use-ffile-compilation-dir.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ use-ffile-compilation-dir.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,65 +0,0 @@
-From 34a955823630096f5b01c2b01d51c1ea59d22763 Mon Sep 17 00:00:00 2001
-From: Zequan Wu <zequanwu at google.com>
-Date: Tue, 20 Jul 2021 14:13:50 +0000
-Subject: [PATCH] Use -ffile-compilation-dir= instead of
- -fdebug-compilation-dir=
-
-Bug: 1010267
-Change-Id: If2b4ead8535a76490eb466a38e3d8fed6ea91079
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2770738
-Auto-Submit: Zequan Wu <zequanwu at google.com>
-Commit-Queue: Nico Weber <thakis at chromium.org>
-Reviewed-by: Nico Weber <thakis at chromium.org>
-Cr-Commit-Position: refs/heads/master@{#903456}
----
- build/config/compiler/BUILD.gn     | 18 ++++++++++++------
- build/config/compiler/compiler.gni |  7 ++-----
- 2 files changed, 14 insertions(+), 11 deletions(-)
-
-diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
-index ede07d111c..6db16c1cdd 100644
---- a/build/config/compiler/BUILD.gn
-+++ b/build/config/compiler/BUILD.gn
-@@ -1216,12 +1216,18 @@ config("compiler_deterministic") {
-     # different build directory like "out/feature_a" and "out/feature_b" if
-     # we build same files with same compile flag.
-     # Other paths are already given in relative, no need to normalize them.
--    cflags += [
--      "-Xclang",
--      "-fdebug-compilation-dir",
--      "-Xclang",
--      ".",
--    ]
-+    if (is_nacl) {
-+      cflags += [
-+        "-Xclang",
-+        "-fdebug-compilation-dir",
-+        "-Xclang",
-+        ".",
-+      ]
-+    } else {
-+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
-+      # and -fcoverage-compilation-dir=.
-+      cflags += [ "-ffile-compilation-dir=." ]
-+    }
-     if (!is_win) {
-       # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
-       asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
-diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
-index 8c259c360a..642319b4f4 100644
---- a/build/config/compiler/compiler.gni
-+++ b/build/config/compiler/compiler.gni
-@@ -225,11 +225,8 @@ declare_args() {
- # deterministic builds to reduce compile times, so this is less relevant for
- # official builders.
- strip_absolute_paths_from_debug_symbols_default =
--    # TODO(crbug.com/1010267): remove '!use_clang_coverage', coverage build has
--    # dependency to absolute path of source files.
--    !use_clang_coverage &&
--    (is_android || is_fuchsia || is_nacl || (is_win && use_lld) || is_linux ||
--     is_chromeos || (is_apple && !enable_dsyms))
-+    is_android || is_fuchsia || is_nacl || (is_win && use_lld) || is_linux ||
-+    is_chromeos || (is_apple && !enable_dsyms)
- 
- # If the platform uses stripped absolute paths by default, then we don't expose
- # it as a configuration option. If this is causing problems, please file a bug.

Copied: chromium/repos/extra-x86_64/use-ffile-compilation-dir.patch (from rev 426785, chromium/trunk/use-ffile-compilation-dir.patch)
===================================================================
--- use-ffile-compilation-dir.patch	                        (rev 0)
+++ use-ffile-compilation-dir.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,65 @@
+From 34a955823630096f5b01c2b01d51c1ea59d22763 Mon Sep 17 00:00:00 2001
+From: Zequan Wu <zequanwu at google.com>
+Date: Tue, 20 Jul 2021 14:13:50 +0000
+Subject: [PATCH] Use -ffile-compilation-dir= instead of
+ -fdebug-compilation-dir=
+
+Bug: 1010267
+Change-Id: If2b4ead8535a76490eb466a38e3d8fed6ea91079
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2770738
+Auto-Submit: Zequan Wu <zequanwu at google.com>
+Commit-Queue: Nico Weber <thakis at chromium.org>
+Reviewed-by: Nico Weber <thakis at chromium.org>
+Cr-Commit-Position: refs/heads/master@{#903456}
+---
+ build/config/compiler/BUILD.gn     | 18 ++++++++++++------
+ build/config/compiler/compiler.gni |  7 ++-----
+ 2 files changed, 14 insertions(+), 11 deletions(-)
+
+diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
+index ede07d111c..6db16c1cdd 100644
+--- a/build/config/compiler/BUILD.gn
++++ b/build/config/compiler/BUILD.gn
+@@ -1216,12 +1216,18 @@ config("compiler_deterministic") {
+     # different build directory like "out/feature_a" and "out/feature_b" if
+     # we build same files with same compile flag.
+     # Other paths are already given in relative, no need to normalize them.
+-    cflags += [
+-      "-Xclang",
+-      "-fdebug-compilation-dir",
+-      "-Xclang",
+-      ".",
+-    ]
++    if (is_nacl) {
++      cflags += [
++        "-Xclang",
++        "-fdebug-compilation-dir",
++        "-Xclang",
++        ".",
++      ]
++    } else {
++      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
++      # and -fcoverage-compilation-dir=.
++      cflags += [ "-ffile-compilation-dir=." ]
++    }
+     if (!is_win) {
+       # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+       asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
+index 8c259c360a..642319b4f4 100644
+--- a/build/config/compiler/compiler.gni
++++ b/build/config/compiler/compiler.gni
+@@ -225,11 +225,8 @@ declare_args() {
+ # deterministic builds to reduce compile times, so this is less relevant for
+ # official builders.
+ strip_absolute_paths_from_debug_symbols_default =
+-    # TODO(crbug.com/1010267): remove '!use_clang_coverage', coverage build has
+-    # dependency to absolute path of source files.
+-    !use_clang_coverage &&
+-    (is_android || is_fuchsia || is_nacl || (is_win && use_lld) || is_linux ||
+-     is_chromeos || (is_apple && !enable_dsyms))
++    is_android || is_fuchsia || is_nacl || (is_win && use_lld) || is_linux ||
++    is_chromeos || (is_apple && !enable_dsyms)
+ 
+ # If the platform uses stripped absolute paths by default, then we don't expose
+ # it as a configuration option. If this is causing problems, please file a bug.

Deleted: use-oauth2-client-switches-as-default.patch
===================================================================
--- use-oauth2-client-switches-as-default.patch	2021-10-29 05:26:24 UTC (rev 426785)
+++ use-oauth2-client-switches-as-default.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -1,17 +0,0 @@
-diff -upr chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc chromium-89.0.4389.58/google_apis/google_api_keys.cc
---- chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc	2021-02-24 22:37:18.494007649 +0000
-+++ chromium-89.0.4389.58/google_apis/google_api_keys.cc	2021-02-24 22:35:00.865777600 +0000
-@@ -154,11 +154,11 @@ class APIKeyCache {
- 
-     std::string default_client_id = CalculateKeyValue(
-         GOOGLE_DEFAULT_CLIENT_ID,
--        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr,
-+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID,
-         std::string(), environment.get(), command_line, gaia_config);
-     std::string default_client_secret = CalculateKeyValue(
-         GOOGLE_DEFAULT_CLIENT_SECRET,
--        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr,
-+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret,
-         std::string(), environment.get(), command_line, gaia_config);
- 
-     // We currently only allow overriding the baked-in values for the

Copied: chromium/repos/extra-x86_64/use-oauth2-client-switches-as-default.patch (from rev 426785, chromium/trunk/use-oauth2-client-switches-as-default.patch)
===================================================================
--- use-oauth2-client-switches-as-default.patch	                        (rev 0)
+++ use-oauth2-client-switches-as-default.patch	2021-10-29 05:26:39 UTC (rev 426786)
@@ -0,0 +1,17 @@
+diff -upr chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc chromium-89.0.4389.58/google_apis/google_api_keys.cc
+--- chromium-89.0.4389.58.orig/google_apis/google_api_keys.cc	2021-02-24 22:37:18.494007649 +0000
++++ chromium-89.0.4389.58/google_apis/google_api_keys.cc	2021-02-24 22:35:00.865777600 +0000
+@@ -154,11 +154,11 @@ class APIKeyCache {
+ 
+     std::string default_client_id = CalculateKeyValue(
+         GOOGLE_DEFAULT_CLIENT_ID,
+-        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr,
++        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID,
+         std::string(), environment.get(), command_line, gaia_config);
+     std::string default_client_secret = CalculateKeyValue(
+         GOOGLE_DEFAULT_CLIENT_SECRET,
+-        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr,
++        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret,
+         std::string(), environment.get(), command_line, gaia_config);
+ 
+     // We currently only allow overriding the baked-in values for the



More information about the arch-commits mailing list