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

Evangelos Foutras foutrelis at archlinux.org
Wed Jun 6 23:09:36 UTC 2018


    Date: Wednesday, June 6, 2018 @ 23:09:36
  Author: foutrelis
Revision: 326098

archrelease: copy trunk to extra-x86_64

Added:
  chromium/repos/extra-x86_64/PKGBUILD
    (from rev 326097, chromium/trunk/PKGBUILD)
  chromium/repos/extra-x86_64/chromium-ffmpeg-r1.patch
    (from rev 326097, chromium/trunk/chromium-ffmpeg-r1.patch)
  chromium/repos/extra-x86_64/chromium-skia-harmony.patch
    (from rev 326097, chromium/trunk/chromium-skia-harmony.patch)
  chromium/repos/extra-x86_64/chromium-widevine-r2.patch
    (from rev 326097, chromium/trunk/chromium-widevine-r2.patch)
  chromium/repos/extra-x86_64/chromium.install
    (from rev 326097, chromium/trunk/chromium.install)
  chromium/repos/extra-x86_64/remove-dependency-on-ffmpeg-internals-for-start-time.patch
    (from rev 326097, chromium/trunk/remove-dependency-on-ffmpeg-internals-for-start-time.patch)
  chromium/repos/extra-x86_64/x11-fix-mixup-between-DIP-pixel-coordinates.patch
    (from rev 326097, chromium/trunk/x11-fix-mixup-between-DIP-pixel-coordinates.patch)
Deleted:
  chromium/repos/extra-x86_64/PKGBUILD
  chromium/repos/extra-x86_64/chromium-ffmpeg-r1.patch
  chromium/repos/extra-x86_64/chromium-skia-harmony.patch
  chromium/repos/extra-x86_64/chromium-widevine-r2.patch
  chromium/repos/extra-x86_64/chromium.install
  chromium/repos/extra-x86_64/remove-dependency-on-ffmpeg-internals-for-start-time.patch

------------------------------------------------------------+
 PKGBUILD                                                   |  455 ++++-----
 chromium-ffmpeg-r1.patch                                   |   44 
 chromium-skia-harmony.patch                                |  154 +--
 chromium-widevine-r2.patch                                 |   78 -
 chromium.install                                           |   32 
 remove-dependency-on-ffmpeg-internals-for-start-time.patch |  520 +++++------
 x11-fix-mixup-between-DIP-pixel-coordinates.patch          |   40 
 7 files changed, 684 insertions(+), 639 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2018-06-06 23:09:25 UTC (rev 326097)
+++ PKGBUILD	2018-06-06 23:09:36 UTC (rev 326098)
@@ -1,225 +0,0 @@
-# $Id$
-# 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=67.0.3396.62
-pkgrel=1
-_launcher_ver=6
-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-font' 'systemd' 'dbus' 'libpulse' 'pciutils' 'json-glib'
-         'desktop-file-utils' 'hicolor-icon-theme')
-makedepends=('python' 'python2' 'gperf' 'yasm' 'mesa' 'ninja' 'nodejs' 'git'
-             'clang' 'lld')
-optdepends=('pepper-flash: support for Flash content'
-            'kdialog: needed for file dialogs in KDE'
-            'gnome-keyring: for storing passwords in GNOME keyring'
-            'kwallet: for storing passwords in KWallet')
-install=chromium.install
-source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
-        chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz
-        remove-dependency-on-ffmpeg-internals-for-start-time.patch
-        chromium-ffmpeg-r1.patch
-        chromium-widevine-r2.patch
-        chromium-skia-harmony.patch)
-sha256sums=('d5ee63932ff1c8c4a5f69c834f6577e7127b416681eddd23bc54886caffd770d'
-            '04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1'
-            '2cc80f5ed8a9b42495a0f3ab3c1bae026b9081972269a1b6d407331d33f7d257'
-            'aa885330bc4180b78d915f9dfdfc3210038a0acab7b16735ea9828ab6a633bde'
-            '02c69bb3954087db599def7f5b6d65cf8f7cf2ed81dfbdaa4bb7b51863b4df15'
-            'feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3')
-
-# 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            # https://crbug.com/752403#c10
-  #[libvpx]=libvpx            # needs unreleased libvpx
-  [libwebp]=libwebp
-  #[libxml]=libxml2           # https://crbug.com/736026
-  [libxslt]=libxslt
-  [opus]=opus
-  [re2]=re2
-  [snappy]=snappy
-  [yasm]=
-  [zlib]=minizip
-)
-_unwanted_bundled_libs=(
-  ${!_system_libs[@]}
-  ${_system_libs[libjpeg]+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.
-_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
-_google_default_client_id=413772536636.apps.googleusercontent.com
-_google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4
-
-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/731766
-  patch -Np1 -i ../remove-dependency-on-ffmpeg-internals-for-start-time.patch
-
-  # https://crbug.com/skia/6663#c10
-  patch -Np4 -i ../chromium-skia-harmony.patch
-
-  # Fixes from Gentoo
-  patch -Np1 -i ../chromium-ffmpeg-r1.patch
-  patch -Np1 -i ../chromium-widevine-r2.patch
-
-  # Remove compiler flags not supported by our system clang
-  sed -i \
-    -e '/"-Wno-ignored-pragma-optimize"/d' \
-    build/config/compiler/BUILD.gn
-
-  # Force script incompatible with Python 3 to use /usr/bin/python2
-  sed -i '1s|python$|&2|' third_party/dom_distiller_js/protoc_plugins/*.py
-
-  mkdir -p third_party/node/linux/node-linux-x64/bin
-  ln -s /usr/bin/node third_party/node/linux/node-linux-x64/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/yasm/run_yasm.py' \
-      \! -regex '.*\.\(gn\|gni\|isolate\)' \
-      -delete
-  done
-
-  python2 build/linux/unbundle/replace_gn_files.py \
-    --system-libraries "${!_system_libs[@]}"
-}
-
-build() {
-  make -C chromium-launcher-$_launcher_ver
-
-  cd "$srcdir/$pkgname-$pkgver"
-
-  if check_buildoption ccache y; then
-    # Avoid falling back to preprocessor mode when sources contain time macros
-    export CCACHE_SLOPPINESS=time_macros
-  fi
-
-  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
-    'is_debug=false'
-    'treat_warnings_as_errors=false'
-    'fieldtrial_testing_like_official_build=true'
-    'remove_webcore_debug_symbols=true'
-    'ffmpeg_branding="Chrome"'
-    'proprietary_codecs=true'
-    'link_pulseaudio=true'
-    'use_gnome_keyring=false'
-    'use_sysroot=false'
-    'linux_use_bundled_binutils=false'
-    'use_custom_libcxx=false'
-    'enable_hangout_services_extension=true'
-    'enable_widevine=true'
-    'enable_nacl=false'
-    'enable_swiftshader=false'
-    "google_api_key=\"${_google_api_key}\""
-    "google_default_client_id=\"${_google_default_client_id}\""
-    "google_default_client_secret=\"${_google_default_client_secret}\""
-  )
-
-  # 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__='
-
-  if check_option strip y; then
-    _flags+=('symbol_level=0')
-
-    # Mimic exclude_unwind_tables=true
-    CFLAGS+='   -fno-unwind-tables -fno-asynchronous-unwind-tables'
-    CXXFLAGS+=' -fno-unwind-tables -fno-asynchronous-unwind-tables'
-    CPPFLAGS+=' -DNO_UNWIND_TABLES'
-  fi
-
-  python2 tools/gn/bootstrap/bootstrap.py -s --no-clean
-  out/Release/gn gen out/Release --args="${_flags[*]}" \
-    --script-executable=/usr/bin/python2
-
-  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"
-
-  cp \
-    out/Release/{chrome_{100,200}_percent,resources}.pak \
-    out/Release/{*.bin,chromedriver} \
-    "$pkgdir/usr/lib/chromium/"
-  install -Dm644 -t "$pkgdir/usr/lib/chromium/locales" out/Release/locales/*.pak
-
-  if [[ -z ${_system_libs[icu]+set} ]]; then
-    cp out/Release/icudtl.dat "$pkgdir/usr/lib/chromium/"
-  fi
-
-  for size in 22 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 326097, chromium/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2018-06-06 23:09:36 UTC (rev 326098)
@@ -0,0 +1,230 @@
+# $Id$
+# 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=67.0.3396.79
+pkgrel=1
+_launcher_ver=6
+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-font' 'systemd' 'dbus' 'libpulse' 'pciutils' 'json-glib'
+         'desktop-file-utils' 'hicolor-icon-theme')
+makedepends=('python' 'python2' 'gperf' 'yasm' 'mesa' 'ninja' 'nodejs' 'git'
+             'clang' 'lld')
+optdepends=('pepper-flash: support for Flash content'
+            'kdialog: needed for file dialogs in KDE'
+            'gnome-keyring: for storing passwords in GNOME keyring'
+            'kwallet: for storing passwords in KWallet')
+install=chromium.install
+source=(https://commondatastorage.googleapis.com/chromium-browser-official/$pkgname-$pkgver.tar.xz
+        chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz
+        remove-dependency-on-ffmpeg-internals-for-start-time.patch
+        x11-fix-mixup-between-DIP-pixel-coordinates.patch
+        chromium-ffmpeg-r1.patch
+        chromium-widevine-r2.patch
+        chromium-skia-harmony.patch)
+sha256sums=('f8b1e5319163e378027826b12cf256b97423bb90e10e2013469d96e03bc9db8a'
+            '04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1'
+            '2cc80f5ed8a9b42495a0f3ab3c1bae026b9081972269a1b6d407331d33f7d257'
+            'e2c2754536243a60fa70541bbd4121715eccd83caa8f1fb1873bd994cd81f871'
+            'aa885330bc4180b78d915f9dfdfc3210038a0acab7b16735ea9828ab6a633bde'
+            '02c69bb3954087db599def7f5b6d65cf8f7cf2ed81dfbdaa4bb7b51863b4df15'
+            'feca54ab09ac0fc9d0626770a6b899a6ac5a12173c7d0c1005bc3964ec83e7b3')
+
+# 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            # https://crbug.com/752403#c10
+  #[libvpx]=libvpx            # needs unreleased libvpx
+  [libwebp]=libwebp
+  #[libxml]=libxml2           # https://crbug.com/736026
+  [libxslt]=libxslt
+  [opus]=opus
+  [re2]=re2
+  [snappy]=snappy
+  [yasm]=
+  [zlib]=minizip
+)
+_unwanted_bundled_libs=(
+  ${!_system_libs[@]}
+  ${_system_libs[libjpeg]+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.
+_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
+_google_default_client_id=413772536636.apps.googleusercontent.com
+_google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4
+
+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/731766
+  patch -Np1 -i ../remove-dependency-on-ffmpeg-internals-for-start-time.patch
+
+  # https://crbug.com/707721
+  patch -Np1 -i ../x11-fix-mixup-between-DIP-pixel-coordinates.patch
+
+  # https://crbug.com/skia/6663#c10
+  patch -Np4 -i ../chromium-skia-harmony.patch
+
+  # Fixes from Gentoo
+  patch -Np1 -i ../chromium-ffmpeg-r1.patch
+  patch -Np1 -i ../chromium-widevine-r2.patch
+
+  # Remove compiler flags not supported by our system clang
+  sed -i \
+    -e '/"-Wno-ignored-pragma-optimize"/d' \
+    build/config/compiler/BUILD.gn
+
+  # Force script incompatible with Python 3 to use /usr/bin/python2
+  sed -i '1s|python$|&2|' third_party/dom_distiller_js/protoc_plugins/*.py
+
+  mkdir -p third_party/node/linux/node-linux-x64/bin
+  ln -s /usr/bin/node third_party/node/linux/node-linux-x64/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/yasm/run_yasm.py' \
+      \! -regex '.*\.\(gn\|gni\|isolate\)' \
+      -delete
+  done
+
+  python2 build/linux/unbundle/replace_gn_files.py \
+    --system-libraries "${!_system_libs[@]}"
+}
+
+build() {
+  make -C chromium-launcher-$_launcher_ver
+
+  cd "$srcdir/$pkgname-$pkgver"
+
+  if check_buildoption ccache y; then
+    # Avoid falling back to preprocessor mode when sources contain time macros
+    export CCACHE_SLOPPINESS=time_macros
+  fi
+
+  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
+    'is_debug=false'
+    'treat_warnings_as_errors=false'
+    'fieldtrial_testing_like_official_build=true'
+    'remove_webcore_debug_symbols=true'
+    'ffmpeg_branding="Chrome"'
+    'proprietary_codecs=true'
+    'link_pulseaudio=true'
+    'use_gnome_keyring=false'
+    'use_sysroot=false'
+    'linux_use_bundled_binutils=false'
+    'use_custom_libcxx=false'
+    'enable_hangout_services_extension=true'
+    'enable_widevine=true'
+    'enable_nacl=false'
+    'enable_swiftshader=false'
+    "google_api_key=\"${_google_api_key}\""
+    "google_default_client_id=\"${_google_default_client_id}\""
+    "google_default_client_secret=\"${_google_default_client_secret}\""
+  )
+
+  # 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__='
+
+  if check_option strip y; then
+    _flags+=('symbol_level=0')
+
+    # Mimic exclude_unwind_tables=true
+    CFLAGS+='   -fno-unwind-tables -fno-asynchronous-unwind-tables'
+    CXXFLAGS+=' -fno-unwind-tables -fno-asynchronous-unwind-tables'
+    CPPFLAGS+=' -DNO_UNWIND_TABLES'
+  fi
+
+  python2 tools/gn/bootstrap/bootstrap.py -s --no-clean
+  out/Release/gn gen out/Release --args="${_flags[*]}" \
+    --script-executable=/usr/bin/python2
+
+  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"
+
+  cp \
+    out/Release/{chrome_{100,200}_percent,resources}.pak \
+    out/Release/{*.bin,chromedriver} \
+    "$pkgdir/usr/lib/chromium/"
+  install -Dm644 -t "$pkgdir/usr/lib/chromium/locales" out/Release/locales/*.pak
+
+  if [[ -z ${_system_libs[icu]+set} ]]; then
+    cp out/Release/icudtl.dat "$pkgdir/usr/lib/chromium/"
+  fi
+
+  for size in 22 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: chromium-ffmpeg-r1.patch
===================================================================
--- chromium-ffmpeg-r1.patch	2018-06-06 23:09:25 UTC (rev 326097)
+++ chromium-ffmpeg-r1.patch	2018-06-06 23:09:36 UTC (rev 326098)
@@ -1,22 +0,0 @@
---- a/build/linux/unbundle/ffmpeg.gn
-+++ b/build/linux/unbundle/ffmpeg.gn
-@@ -14,8 +14,8 @@ pkg_config("system_ffmpeg") {
-   ]
- }
- 
--buildflag_header("ffmpeg_buildflags") {
--  header = "ffmpeg_buildflags.h"
-+buildflag_header("ffmpeg_features") {
-+  header = "ffmpeg_features.h"
-   flags = [ "USE_SYSTEM_FFMPEG=true" ]
- }
- 
-@@ -30,7 +30,7 @@ shim_headers("ffmpeg_shim") {
- 
- source_set("ffmpeg") {
-   deps = [
--    ":ffmpeg_buildflags",
-+    ":ffmpeg_features",
-     ":ffmpeg_shim",
-   ]
-   public_configs = [ ":system_ffmpeg" ]

Copied: chromium/repos/extra-x86_64/chromium-ffmpeg-r1.patch (from rev 326097, chromium/trunk/chromium-ffmpeg-r1.patch)
===================================================================
--- chromium-ffmpeg-r1.patch	                        (rev 0)
+++ chromium-ffmpeg-r1.patch	2018-06-06 23:09:36 UTC (rev 326098)
@@ -0,0 +1,22 @@
+--- a/build/linux/unbundle/ffmpeg.gn
++++ b/build/linux/unbundle/ffmpeg.gn
+@@ -14,8 +14,8 @@ pkg_config("system_ffmpeg") {
+   ]
+ }
+ 
+-buildflag_header("ffmpeg_buildflags") {
+-  header = "ffmpeg_buildflags.h"
++buildflag_header("ffmpeg_features") {
++  header = "ffmpeg_features.h"
+   flags = [ "USE_SYSTEM_FFMPEG=true" ]
+ }
+ 
+@@ -30,7 +30,7 @@ shim_headers("ffmpeg_shim") {
+ 
+ source_set("ffmpeg") {
+   deps = [
+-    ":ffmpeg_buildflags",
++    ":ffmpeg_features",
+     ":ffmpeg_shim",
+   ]
+   public_configs = [ ":system_ffmpeg" ]

Deleted: chromium-skia-harmony.patch
===================================================================
--- chromium-skia-harmony.patch	2018-06-06 23:09:25 UTC (rev 326097)
+++ chromium-skia-harmony.patch	2018-06-06 23:09:36 UTC (rev 326098)
@@ -1,77 +0,0 @@
---- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp.orig	2017-10-10 17:42:06.956950985 +0200
-+++ qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp	2017-10-10 17:46:05.824187787 +0200
-@@ -99,8 +99,6 @@
-     FreeTypeLibrary()
-         : fGetVarDesignCoordinates(nullptr)
-         , fLibrary(nullptr)
--        , fIsLCDSupported(false)
--        , fLCDExtra(0)
-     {
-         if (FT_New_Library(&gFTMemory, &fLibrary)) {
-             return;
-@@ -147,12 +145,7 @@
-         }
- #endif
- 
--        // Setup LCD filtering. This reduces color fringes for LCD smoothed glyphs.
--        // The default has changed over time, so this doesn't mean the same thing to all users.
--        if (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) {
--            fIsLCDSupported = true;
--            fLCDExtra = 2; //Using a filter adds one full pixel to each side.
--        }
-+        FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT);
-     }
-     ~FreeTypeLibrary() {
-         if (fLibrary) {
-@@ -161,8 +153,6 @@
-     }
- 
-     FT_Library library() { return fLibrary; }
--    bool isLCDSupported() { return fIsLCDSupported; }
--    int lcdExtra() { return fLCDExtra; }
- 
-     // FT_Get_{MM,Var}_{Blend,Design}_Coordinates were added in FreeType 2.7.1.
-     // Prior to this there was no way to get the coordinates out of the FT_Face.
-@@ -173,8 +163,6 @@
- 
- private:
-     FT_Library fLibrary;
--    bool fIsLCDSupported;
--    int fLCDExtra;
- 
-     // FT_Library_SetLcdFilterWeights was introduced in FreeType 2.4.0.
-     // The following platforms provide FreeType of at least 2.4.0.
-@@ -704,17 +692,6 @@
-         rec->fTextSize = SkIntToScalar(1 << 14);
-     }
- 
--    if (isLCD(*rec)) {
--        // TODO: re-work so that FreeType is set-up and selected by the SkFontMgr.
--        SkAutoMutexAcquire ama(gFTMutex);
--        ref_ft_library();
--        if (!gFTLibrary->isLCDSupported()) {
--            // If the runtime Freetype library doesn't support LCD, disable it here.
--            rec->fMaskFormat = SkMask::kA8_Format;
--        }
--        unref_ft_library();
--    }
--
-     SkPaint::Hinting h = rec->getHinting();
-     if (SkPaint::kFull_Hinting == h && !isLCD(*rec)) {
-         // collapse full->normal hinting if we're not doing LCD
-@@ -1115,11 +1092,11 @@
- void SkScalerContext_FreeType::updateGlyphIfLCD(SkGlyph* glyph) {
-     if (isLCD(fRec)) {
-         if (fLCDIsVert) {
--            glyph->fHeight += gFTLibrary->lcdExtra();
--            glyph->fTop -= gFTLibrary->lcdExtra() >> 1;
-+            glyph->fHeight += 2;
-+            glyph->fTop -= 1;
-         } else {
--            glyph->fWidth += gFTLibrary->lcdExtra();
--            glyph->fLeft -= gFTLibrary->lcdExtra() >> 1;
-+            glyph->fWidth += 2;
-+            glyph->fLeft -= 1;
-         }
-     }
- }

Copied: chromium/repos/extra-x86_64/chromium-skia-harmony.patch (from rev 326097, chromium/trunk/chromium-skia-harmony.patch)
===================================================================
--- chromium-skia-harmony.patch	                        (rev 0)
+++ chromium-skia-harmony.patch	2018-06-06 23:09:36 UTC (rev 326098)
@@ -0,0 +1,77 @@
+--- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp.orig	2017-10-10 17:42:06.956950985 +0200
++++ qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp	2017-10-10 17:46:05.824187787 +0200
+@@ -99,8 +99,6 @@
+     FreeTypeLibrary()
+         : fGetVarDesignCoordinates(nullptr)
+         , fLibrary(nullptr)
+-        , fIsLCDSupported(false)
+-        , fLCDExtra(0)
+     {
+         if (FT_New_Library(&gFTMemory, &fLibrary)) {
+             return;
+@@ -147,12 +145,7 @@
+         }
+ #endif
+ 
+-        // Setup LCD filtering. This reduces color fringes for LCD smoothed glyphs.
+-        // The default has changed over time, so this doesn't mean the same thing to all users.
+-        if (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) {
+-            fIsLCDSupported = true;
+-            fLCDExtra = 2; //Using a filter adds one full pixel to each side.
+-        }
++        FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT);
+     }
+     ~FreeTypeLibrary() {
+         if (fLibrary) {
+@@ -161,8 +153,6 @@
+     }
+ 
+     FT_Library library() { return fLibrary; }
+-    bool isLCDSupported() { return fIsLCDSupported; }
+-    int lcdExtra() { return fLCDExtra; }
+ 
+     // FT_Get_{MM,Var}_{Blend,Design}_Coordinates were added in FreeType 2.7.1.
+     // Prior to this there was no way to get the coordinates out of the FT_Face.
+@@ -173,8 +163,6 @@
+ 
+ private:
+     FT_Library fLibrary;
+-    bool fIsLCDSupported;
+-    int fLCDExtra;
+ 
+     // FT_Library_SetLcdFilterWeights was introduced in FreeType 2.4.0.
+     // The following platforms provide FreeType of at least 2.4.0.
+@@ -704,17 +692,6 @@
+         rec->fTextSize = SkIntToScalar(1 << 14);
+     }
+ 
+-    if (isLCD(*rec)) {
+-        // TODO: re-work so that FreeType is set-up and selected by the SkFontMgr.
+-        SkAutoMutexAcquire ama(gFTMutex);
+-        ref_ft_library();
+-        if (!gFTLibrary->isLCDSupported()) {
+-            // If the runtime Freetype library doesn't support LCD, disable it here.
+-            rec->fMaskFormat = SkMask::kA8_Format;
+-        }
+-        unref_ft_library();
+-    }
+-
+     SkPaint::Hinting h = rec->getHinting();
+     if (SkPaint::kFull_Hinting == h && !isLCD(*rec)) {
+         // collapse full->normal hinting if we're not doing LCD
+@@ -1115,11 +1092,11 @@
+ void SkScalerContext_FreeType::updateGlyphIfLCD(SkGlyph* glyph) {
+     if (isLCD(fRec)) {
+         if (fLCDIsVert) {
+-            glyph->fHeight += gFTLibrary->lcdExtra();
+-            glyph->fTop -= gFTLibrary->lcdExtra() >> 1;
++            glyph->fHeight += 2;
++            glyph->fTop -= 1;
+         } else {
+-            glyph->fWidth += gFTLibrary->lcdExtra();
+-            glyph->fLeft -= gFTLibrary->lcdExtra() >> 1;
++            glyph->fWidth += 2;
++            glyph->fLeft -= 1;
+         }
+     }
+ }

Deleted: chromium-widevine-r2.patch
===================================================================
--- chromium-widevine-r2.patch	2018-06-06 23:09:25 UTC (rev 326097)
+++ chromium-widevine-r2.patch	2018-06-06 23:09:36 UTC (rev 326098)
@@ -1,39 +0,0 @@
-Minimal patch to get chromium to compile with widevine support.
-
-Exactly the same as -r1, but we now need to patch
-ninja to pretty please not terminate our build.
-
-caveat emptor: it's in no way clear that building chromium this
-way is safer, from a security perspective, than whatever Google
-Chrome does.
-
-Upstream appears to be cooking up a code-signing trust-chain
-which may protect users against malicious cdm blobs; I doubt
-we benefit from these using this kludge.  Ideally, someone
-would look into this more carefully than I have ... tbh as
-soon as I got my "stories" back, I pretty much lost interest :)
-
--gmt
-
---
---- a/third_party/widevine/cdm/stub/widevine_cdm_version.h
-+++ b/third_party/widevine/cdm/stub/widevine_cdm_version.h
-@@ -10,6 +10,7 @@
-
- #include "third_party/widevine/cdm/widevine_cdm_common.h"
-
-+#define WIDEVINE_CDM_VERSION_STRING "unknown"
- #define WIDEVINE_CDM_AVAILABLE
-
- #endif  // WIDEVINE_CDM_VERSION_H_
---- a/third_party/widevine/cdm/BUILD.gn
-+++ b/third_party/widevine/cdm/BUILD.gn
-@@ -11,7 +11,7 @@ import("//third_party/widevine/cdm/widev
- # Internal Cast builds set enable_widevine=true to bring in Widevine support.
- # TODO(xhwang): Support component updated CDM on other platforms and remove this
- # assert.
--assert(!enable_widevine || is_win || is_mac || is_chromecast,
-+assert(!enable_widevine || is_win || is_mac || is_chromecast || is_linux,
-        "Component updated CDM only supported on Windows and Mac for now.")
-
- widevine_arch = current_cpu

Copied: chromium/repos/extra-x86_64/chromium-widevine-r2.patch (from rev 326097, chromium/trunk/chromium-widevine-r2.patch)
===================================================================
--- chromium-widevine-r2.patch	                        (rev 0)
+++ chromium-widevine-r2.patch	2018-06-06 23:09:36 UTC (rev 326098)
@@ -0,0 +1,39 @@
+Minimal patch to get chromium to compile with widevine support.
+
+Exactly the same as -r1, but we now need to patch
+ninja to pretty please not terminate our build.
+
+caveat emptor: it's in no way clear that building chromium this
+way is safer, from a security perspective, than whatever Google
+Chrome does.
+
+Upstream appears to be cooking up a code-signing trust-chain
+which may protect users against malicious cdm blobs; I doubt
+we benefit from these using this kludge.  Ideally, someone
+would look into this more carefully than I have ... tbh as
+soon as I got my "stories" back, I pretty much lost interest :)
+
+-gmt
+
+--
+--- a/third_party/widevine/cdm/stub/widevine_cdm_version.h
++++ b/third_party/widevine/cdm/stub/widevine_cdm_version.h
+@@ -10,6 +10,7 @@
+
+ #include "third_party/widevine/cdm/widevine_cdm_common.h"
+
++#define WIDEVINE_CDM_VERSION_STRING "unknown"
+ #define WIDEVINE_CDM_AVAILABLE
+
+ #endif  // WIDEVINE_CDM_VERSION_H_
+--- a/third_party/widevine/cdm/BUILD.gn
++++ b/third_party/widevine/cdm/BUILD.gn
+@@ -11,7 +11,7 @@ import("//third_party/widevine/cdm/widev
+ # Internal Cast builds set enable_widevine=true to bring in Widevine support.
+ # TODO(xhwang): Support component updated CDM on other platforms and remove this
+ # assert.
+-assert(!enable_widevine || is_win || is_mac || is_chromecast,
++assert(!enable_widevine || is_win || is_mac || is_chromecast || is_linux,
+        "Component updated CDM only supported on Windows and Mac for now.")
+
+ widevine_arch = current_cpu

Deleted: chromium.install
===================================================================
--- chromium.install	2018-06-06 23:09:25 UTC (rev 326097)
+++ chromium.install	2018-06-06 23:09:36 UTC (rev 326098)
@@ -1,16 +0,0 @@
-post_upgrade() {
-  if (($(vercmp $2 42.0.2311.90-1) < 0)); then
-    echo ':: This Chromium package no longer supports custom flags passed via the'
-    echo '   /etc/chromium/default file (or any other files under /etc/chromium/).'
-    echo
-    echo '   The new /usr/bin/chromium launcher script will automatically detect'
-    echo '   Pepper Flash (if installed) and pass the correct flags to Chromium.'
-    echo
-    echo '   If you need to pass extra command-line arguments to Chromium, you'
-    echo '   can put them in a "chromium-flags.conf" file under $HOME/.config/'
-    echo '   (or $XDG_CONFIG_HOME). Arguments are split on whitespace and shell'
-    echo '   quoting rules apply but no further parsing is performed.'
-  fi
-}
-
-# vim:set ts=2 sw=2 et:

Copied: chromium/repos/extra-x86_64/chromium.install (from rev 326097, chromium/trunk/chromium.install)
===================================================================
--- chromium.install	                        (rev 0)
+++ chromium.install	2018-06-06 23:09:36 UTC (rev 326098)
@@ -0,0 +1,16 @@
+post_upgrade() {
+  if (($(vercmp $2 42.0.2311.90-1) < 0)); then
+    echo ':: This Chromium package no longer supports custom flags passed via the'
+    echo '   /etc/chromium/default file (or any other files under /etc/chromium/).'
+    echo
+    echo '   The new /usr/bin/chromium launcher script will automatically detect'
+    echo '   Pepper Flash (if installed) and pass the correct flags to Chromium.'
+    echo
+    echo '   If you need to pass extra command-line arguments to Chromium, you'
+    echo '   can put them in a "chromium-flags.conf" file under $HOME/.config/'
+    echo '   (or $XDG_CONFIG_HOME). Arguments are split on whitespace and shell'
+    echo '   quoting rules apply but no further parsing is performed.'
+  fi
+}
+
+# vim:set ts=2 sw=2 et:

Deleted: remove-dependency-on-ffmpeg-internals-for-start-time.patch
===================================================================
--- remove-dependency-on-ffmpeg-internals-for-start-time.patch	2018-06-06 23:09:25 UTC (rev 326097)
+++ remove-dependency-on-ffmpeg-internals-for-start-time.patch	2018-06-06 23:09:36 UTC (rev 326098)
@@ -1,260 +0,0 @@
-From f9535bd6d61d7e0b2cb452e6976a914d4ee62a2b Mon Sep 17 00:00:00 2001
-From: Dale Curtis <dalecurtis at chromium.org>
-Date: Thu, 17 May 2018 23:44:41 +0000
-Subject: [PATCH] Remove dependency on ffmpeg internals for start time
- calculations.
-
-Some theora clips still have issues, but using first_dts where
-we know it's the same as the first pts resolves the lingering
-issues. It also looks like we don't need to use pts_buffer now.
-
-This does the following small fixes:
-- MEDIA_LOG(DEBUG) -> MEDIA_LOG(ERROR) for negative ts error.
-- Enables previous disabled test in more limited state.
-- Adds kNoFFmpegTimestamp so static_cast<int64_t>(AV_NOPTS_VALUE)
-is no longer necessary everywhere. A followup patch set will use
-this is more places.
-- Removes pts_buffer and packet_buffer inspection.
-
-BUG=731766
-TEST=all tests pass.
-
-Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
-Change-Id: I5aadf67a3b5ea2d2a8dd19bbddd7b107208094c5
-Reviewed-on: https://chromium-review.googlesource.com/1064538
-Commit-Queue: Dale Curtis <dalecurtis at chromium.org>
-Reviewed-by: Frank Liberato <liberato at chromium.org>
-Cr-Commit-Position: refs/heads/master@{#559737}
----
- media/ffmpeg/ffmpeg_common.h             |  5 +-
- media/filters/ffmpeg_demuxer.cc          | 88 +++++++-----------------
- media/filters/ffmpeg_demuxer_unittest.cc | 24 +++----
- 3 files changed, 37 insertions(+), 80 deletions(-)
-
-diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
-index ec33068fb84f..f641d6bcf92e 100644
---- a/media/ffmpeg/ffmpeg_common.h
-+++ b/media/ffmpeg/ffmpeg_common.h
-@@ -28,9 +28,6 @@ extern "C" {
- MSVC_PUSH_DISABLE_WARNING(4244);
- #include <libavcodec/avcodec.h>
- #include <libavformat/avformat.h>
--#if !BUILDFLAG(USE_SYSTEM_FFMPEG)
--#include <libavformat/internal.h>
--#endif  // !BUILDFLAG(USE_SYSTEM_FFMPEG)
- #include <libavformat/avio.h>
- #include <libavutil/avutil.h>
- #include <libavutil/imgutils.h>
-@@ -42,6 +39,8 @@ MSVC_POP_WARNING();
- 
- namespace media {
- 
-+constexpr int64_t kNoFFmpegTimestamp = static_cast<int64_t>(AV_NOPTS_VALUE);
-+
- class AudioDecoderConfig;
- class EncryptionScheme;
- class VideoDecoderConfig;
-diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
-index 49ca01c4dc0b..7402ce16ab5e 100644
---- a/media/filters/ffmpeg_demuxer.cc
-+++ b/media/filters/ffmpeg_demuxer.cc
-@@ -85,29 +85,26 @@ static base::TimeDelta FramesToTimeDelta(int frames, double sample_rate) {
-       frames * base::Time::kMicrosecondsPerSecond / sample_rate);
- }
- 
--static base::TimeDelta ExtractStartTime(AVStream* stream,
--                                        base::TimeDelta start_time_estimate) {
--  DCHECK(start_time_estimate != kNoTimestamp);
--  if (stream->start_time == static_cast<int64_t>(AV_NOPTS_VALUE)) {
--    return start_time_estimate == kInfiniteDuration ? base::TimeDelta()
--                                                    : start_time_estimate;
-+static base::TimeDelta ExtractStartTime(AVStream* stream) {
-+  // The default start time is zero.
-+  base::TimeDelta start_time;
-+
-+  // First try to use  the |start_time| value as is.
-+  if (stream->start_time != kNoFFmpegTimestamp)
-+    start_time = ConvertFromTimeBase(stream->time_base, stream->start_time);
-+
-+  // 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 &&
-+      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);
-+    if (first_pts < start_time)
-+      start_time = first_pts;
-   }
- 
--  // First try the lower of the estimate and the |start_time| value.
--  base::TimeDelta start_time =
--      std::min(ConvertFromTimeBase(stream->time_base, stream->start_time),
--               start_time_estimate);
--
--  // Next see if the first buffered pts value is usable.
--  if (stream->pts_buffer[0] != static_cast<int64_t>(AV_NOPTS_VALUE)) {
--    const base::TimeDelta buffered_pts =
--        ConvertFromTimeBase(stream->time_base, stream->pts_buffer[0]);
--    if (buffered_pts < start_time)
--      start_time = buffered_pts;
--  }
--
--  // NOTE: Do not use AVStream->first_dts since |start_time| should be a
--  // presentation timestamp.
-   return start_time;
- }
- 
-@@ -513,7 +510,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
-     buffer->set_duration(kNoTimestamp);
-   }
- 
--  // Note: If pts is AV_NOPTS_VALUE, stream_timestamp will be kNoTimestamp.
-+  // Note: If pts is kNoFFmpegTimestamp, stream_timestamp will be kNoTimestamp.
-   const base::TimeDelta stream_timestamp =
-       ConvertStreamTimestamp(stream_->time_base, packet->pts);
- 
-@@ -556,8 +553,8 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
-   // code paths below; otherwise they should be treated as a parse error.
-   if ((!fixup_chained_ogg_ || last_packet_timestamp_ == kNoTimestamp) &&
-       buffer->timestamp() < base::TimeDelta()) {
--    MEDIA_LOG(DEBUG, media_log_)
--        << "FFmpegDemuxer: unfixable negative timestamp";
-+    MEDIA_LOG(ERROR, media_log_)
-+        << "FFmpegDemuxer: unfixable negative timestamp.";
-     demuxer_->NotifyDemuxerError(DEMUXER_ERROR_COULD_NOT_PARSE);
-     return;
-   }
-@@ -863,7 +860,7 @@ std::string FFmpegDemuxerStream::GetMetadata(const char* key) const {
- base::TimeDelta FFmpegDemuxerStream::ConvertStreamTimestamp(
-     const AVRational& time_base,
-     int64_t timestamp) {
--  if (timestamp == static_cast<int64_t>(AV_NOPTS_VALUE))
-+  if (timestamp == kNoFFmpegTimestamp)
-     return kNoTimestamp;
- 
-   return ConvertFromTimeBase(time_base, timestamp);
-@@ -1256,42 +1253,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
-   AVFormatContext* format_context = glue_->format_context();
-   streams_.resize(format_context->nb_streams);
- 
--  // Estimate the start time for each stream by looking through the packets
--  // buffered during avformat_find_stream_info().  These values will be
--  // considered later when determining the actual stream start time.
--  //
--  // These packets haven't been completely processed yet, so only look through
--  // these values if the AVFormatContext has a valid start time.
--  //
--  // If no estimate is found, the stream entry will be kInfiniteDuration.
--  std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
--                                                    kInfiniteDuration);
--#if !BUILDFLAG(USE_SYSTEM_FFMPEG)
--  const AVFormatInternal* internal = format_context->internal;
--  if (internal && internal->packet_buffer &&
--      format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
--    struct AVPacketList* packet_buffer = internal->packet_buffer;
--    while (packet_buffer != internal->packet_buffer_end) {
--      DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index),
--                start_time_estimates.size());
--      const AVStream* stream =
--          format_context->streams[packet_buffer->pkt.stream_index];
--      if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
--        const base::TimeDelta packet_pts =
--            ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
--        // We ignore kNoTimestamp here since -int64_t::min() is possible; see
--        // https://crbug.com/700501. Technically this is a valid value, but in
--        // practice shouldn't occur, so just ignore it when estimating.
--        if (packet_pts != kNoTimestamp && packet_pts != kInfiniteDuration &&
--            packet_pts < start_time_estimates[stream->index]) {
--          start_time_estimates[stream->index] = packet_pts;
--        }
--      }
--      packet_buffer = packet_buffer->next;
--    }
--  }
--#endif  // !BUILDFLAG(USE_SYSTEM_FFMPEG)
--
-   std::unique_ptr<MediaTracks> media_tracks(new MediaTracks());
- 
-   DCHECK(track_id_to_demux_stream_map_.empty());
-@@ -1440,8 +1401,7 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
- 
-     max_duration = std::max(max_duration, streams_[i]->duration());
- 
--    base::TimeDelta start_time =
--        ExtractStartTime(stream, start_time_estimates[i]);
-+    base::TimeDelta start_time = ExtractStartTime(stream);
- 
-     // Note: This value is used for seeking, so we must take the true value and
-     // not the one possibly clamped to zero below.
-@@ -1479,7 +1439,7 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
-   if (text_enabled_)
-     AddTextStreams();
- 
--  if (format_context->duration != static_cast<int64_t>(AV_NOPTS_VALUE)) {
-+  if (format_context->duration != kNoFFmpegTimestamp) {
-     // If there is a duration value in the container use that to find the
-     // maximum between it and the duration from A/V streams.
-     const AVRational av_time_base = {1, AV_TIME_BASE};
-diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
-index 71dbed07b376..b09816a3ba3a 100644
---- a/media/filters/ffmpeg_demuxer_unittest.cc
-+++ b/media/filters/ffmpeg_demuxer_unittest.cc
-@@ -696,12 +696,9 @@ TEST_F(FFmpegDemuxerTest, Read_InvalidNegativeTimestamp) {
-   ReadUntilEndOfStream(GetStream(DemuxerStream::AUDIO));
- }
- 
--// TODO(dalecurtis): Test is disabled since FFmpeg does not currently guarantee
--// the order of demuxed packets in OGG containers.  Re-enable and fix key frame
--// expectations once we decide to either workaround it or attempt a fix
--// upstream.  See http://crbug.com/387996.
--TEST_F(FFmpegDemuxerTest,
--       DISABLED_Read_AudioNegativeStartTimeAndOggDiscard_Bear) {
-+// Android has no Theora support, so these tests doesn't work.
-+#if !defined(OS_ANDROID)
-+TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Bear) {
-   // Many ogg files have negative starting timestamps, so ensure demuxing and
-   // seeking work correctly with a negative start time.
-   CreateDemuxer("bear.ogv");
-@@ -711,8 +708,12 @@ TEST_F(FFmpegDemuxerTest,
-   DemuxerStream* video = GetStream(DemuxerStream::VIDEO);
-   DemuxerStream* audio = GetStream(DemuxerStream::AUDIO);
- 
--  // Run the test twice with a seek in between.
--  for (int i = 0; i < 2; ++i) {
-+  // Run the test once (should be twice..., see note) with a seek in between.
-+  //
-+  // TODO(dalecurtis): We only run the test once since FFmpeg does not currently
-+  // guarantee the order of demuxed packets in OGG containers. See
-+  // http://crbug.com/387996.
-+  for (int i = 0; i < 1; ++i) {
-     audio->Read(
-         NewReadCBWithCheckedDiscard(FROM_HERE, 40, 0, kInfiniteDuration, true));
-     base::RunLoop().Run();
-@@ -731,10 +732,10 @@ TEST_F(FFmpegDemuxerTest,
-     video->Read(NewReadCB(FROM_HERE, 5751, 0, true));
-     base::RunLoop().Run();
- 
--    video->Read(NewReadCB(FROM_HERE, 846, 33367, true));
-+    video->Read(NewReadCB(FROM_HERE, 846, 33367, false));
-     base::RunLoop().Run();
- 
--    video->Read(NewReadCB(FROM_HERE, 1255, 66733, true));
-+    video->Read(NewReadCB(FROM_HERE, 1255, 66733, false));
-     base::RunLoop().Run();
- 
-     // Seek back to the beginning and repeat the test.
-@@ -747,9 +748,6 @@ TEST_F(FFmpegDemuxerTest,
- // Same test above, but using sync2.ogv which has video stream muxed before the
- // audio stream, so seeking based only on start time will fail since ffmpeg is
- // essentially just seeking based on file position.
--//
--// Android has no Theora support, so this test doesn't work.
--#if !defined(OS_ANDROID)
- TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Sync) {
-   // Many ogg files have negative starting timestamps, so ensure demuxing and
-   // seeking work correctly with a negative start time.
--- 
-2.17.0
-

Copied: chromium/repos/extra-x86_64/remove-dependency-on-ffmpeg-internals-for-start-time.patch (from rev 326097, chromium/trunk/remove-dependency-on-ffmpeg-internals-for-start-time.patch)
===================================================================
--- remove-dependency-on-ffmpeg-internals-for-start-time.patch	                        (rev 0)
+++ remove-dependency-on-ffmpeg-internals-for-start-time.patch	2018-06-06 23:09:36 UTC (rev 326098)
@@ -0,0 +1,260 @@
+From f9535bd6d61d7e0b2cb452e6976a914d4ee62a2b Mon Sep 17 00:00:00 2001
+From: Dale Curtis <dalecurtis at chromium.org>
+Date: Thu, 17 May 2018 23:44:41 +0000
+Subject: [PATCH] Remove dependency on ffmpeg internals for start time
+ calculations.
+
+Some theora clips still have issues, but using first_dts where
+we know it's the same as the first pts resolves the lingering
+issues. It also looks like we don't need to use pts_buffer now.
+
+This does the following small fixes:
+- MEDIA_LOG(DEBUG) -> MEDIA_LOG(ERROR) for negative ts error.
+- Enables previous disabled test in more limited state.
+- Adds kNoFFmpegTimestamp so static_cast<int64_t>(AV_NOPTS_VALUE)
+is no longer necessary everywhere. A followup patch set will use
+this is more places.
+- Removes pts_buffer and packet_buffer inspection.
+
+BUG=731766
+TEST=all tests pass.
+
+Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
+Change-Id: I5aadf67a3b5ea2d2a8dd19bbddd7b107208094c5
+Reviewed-on: https://chromium-review.googlesource.com/1064538
+Commit-Queue: Dale Curtis <dalecurtis at chromium.org>
+Reviewed-by: Frank Liberato <liberato at chromium.org>
+Cr-Commit-Position: refs/heads/master@{#559737}
+---
+ media/ffmpeg/ffmpeg_common.h             |  5 +-
+ media/filters/ffmpeg_demuxer.cc          | 88 +++++++-----------------
+ media/filters/ffmpeg_demuxer_unittest.cc | 24 +++----
+ 3 files changed, 37 insertions(+), 80 deletions(-)
+
+diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
+index ec33068fb84f..f641d6bcf92e 100644
+--- a/media/ffmpeg/ffmpeg_common.h
++++ b/media/ffmpeg/ffmpeg_common.h
+@@ -28,9 +28,6 @@ extern "C" {
+ MSVC_PUSH_DISABLE_WARNING(4244);
+ #include <libavcodec/avcodec.h>
+ #include <libavformat/avformat.h>
+-#if !BUILDFLAG(USE_SYSTEM_FFMPEG)
+-#include <libavformat/internal.h>
+-#endif  // !BUILDFLAG(USE_SYSTEM_FFMPEG)
+ #include <libavformat/avio.h>
+ #include <libavutil/avutil.h>
+ #include <libavutil/imgutils.h>
+@@ -42,6 +39,8 @@ MSVC_POP_WARNING();
+ 
+ namespace media {
+ 
++constexpr int64_t kNoFFmpegTimestamp = static_cast<int64_t>(AV_NOPTS_VALUE);
++
+ class AudioDecoderConfig;
+ class EncryptionScheme;
+ class VideoDecoderConfig;
+diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
+index 49ca01c4dc0b..7402ce16ab5e 100644
+--- a/media/filters/ffmpeg_demuxer.cc
++++ b/media/filters/ffmpeg_demuxer.cc
+@@ -85,29 +85,26 @@ static base::TimeDelta FramesToTimeDelta(int frames, double sample_rate) {
+       frames * base::Time::kMicrosecondsPerSecond / sample_rate);
+ }
+ 
+-static base::TimeDelta ExtractStartTime(AVStream* stream,
+-                                        base::TimeDelta start_time_estimate) {
+-  DCHECK(start_time_estimate != kNoTimestamp);
+-  if (stream->start_time == static_cast<int64_t>(AV_NOPTS_VALUE)) {
+-    return start_time_estimate == kInfiniteDuration ? base::TimeDelta()
+-                                                    : start_time_estimate;
++static base::TimeDelta ExtractStartTime(AVStream* stream) {
++  // The default start time is zero.
++  base::TimeDelta start_time;
++
++  // First try to use  the |start_time| value as is.
++  if (stream->start_time != kNoFFmpegTimestamp)
++    start_time = ConvertFromTimeBase(stream->time_base, stream->start_time);
++
++  // 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 &&
++      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);
++    if (first_pts < start_time)
++      start_time = first_pts;
+   }
+ 
+-  // First try the lower of the estimate and the |start_time| value.
+-  base::TimeDelta start_time =
+-      std::min(ConvertFromTimeBase(stream->time_base, stream->start_time),
+-               start_time_estimate);
+-
+-  // Next see if the first buffered pts value is usable.
+-  if (stream->pts_buffer[0] != static_cast<int64_t>(AV_NOPTS_VALUE)) {
+-    const base::TimeDelta buffered_pts =
+-        ConvertFromTimeBase(stream->time_base, stream->pts_buffer[0]);
+-    if (buffered_pts < start_time)
+-      start_time = buffered_pts;
+-  }
+-
+-  // NOTE: Do not use AVStream->first_dts since |start_time| should be a
+-  // presentation timestamp.
+   return start_time;
+ }
+ 
+@@ -513,7 +510,7 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+     buffer->set_duration(kNoTimestamp);
+   }
+ 
+-  // Note: If pts is AV_NOPTS_VALUE, stream_timestamp will be kNoTimestamp.
++  // Note: If pts is kNoFFmpegTimestamp, stream_timestamp will be kNoTimestamp.
+   const base::TimeDelta stream_timestamp =
+       ConvertStreamTimestamp(stream_->time_base, packet->pts);
+ 
+@@ -556,8 +553,8 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
+   // code paths below; otherwise they should be treated as a parse error.
+   if ((!fixup_chained_ogg_ || last_packet_timestamp_ == kNoTimestamp) &&
+       buffer->timestamp() < base::TimeDelta()) {
+-    MEDIA_LOG(DEBUG, media_log_)
+-        << "FFmpegDemuxer: unfixable negative timestamp";
++    MEDIA_LOG(ERROR, media_log_)
++        << "FFmpegDemuxer: unfixable negative timestamp.";
+     demuxer_->NotifyDemuxerError(DEMUXER_ERROR_COULD_NOT_PARSE);
+     return;
+   }
+@@ -863,7 +860,7 @@ std::string FFmpegDemuxerStream::GetMetadata(const char* key) const {
+ base::TimeDelta FFmpegDemuxerStream::ConvertStreamTimestamp(
+     const AVRational& time_base,
+     int64_t timestamp) {
+-  if (timestamp == static_cast<int64_t>(AV_NOPTS_VALUE))
++  if (timestamp == kNoFFmpegTimestamp)
+     return kNoTimestamp;
+ 
+   return ConvertFromTimeBase(time_base, timestamp);
+@@ -1256,42 +1253,6 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
+   AVFormatContext* format_context = glue_->format_context();
+   streams_.resize(format_context->nb_streams);
+ 
+-  // Estimate the start time for each stream by looking through the packets
+-  // buffered during avformat_find_stream_info().  These values will be
+-  // considered later when determining the actual stream start time.
+-  //
+-  // These packets haven't been completely processed yet, so only look through
+-  // these values if the AVFormatContext has a valid start time.
+-  //
+-  // If no estimate is found, the stream entry will be kInfiniteDuration.
+-  std::vector<base::TimeDelta> start_time_estimates(format_context->nb_streams,
+-                                                    kInfiniteDuration);
+-#if !BUILDFLAG(USE_SYSTEM_FFMPEG)
+-  const AVFormatInternal* internal = format_context->internal;
+-  if (internal && internal->packet_buffer &&
+-      format_context->start_time != static_cast<int64_t>(AV_NOPTS_VALUE)) {
+-    struct AVPacketList* packet_buffer = internal->packet_buffer;
+-    while (packet_buffer != internal->packet_buffer_end) {
+-      DCHECK_LT(static_cast<size_t>(packet_buffer->pkt.stream_index),
+-                start_time_estimates.size());
+-      const AVStream* stream =
+-          format_context->streams[packet_buffer->pkt.stream_index];
+-      if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
+-        const base::TimeDelta packet_pts =
+-            ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
+-        // We ignore kNoTimestamp here since -int64_t::min() is possible; see
+-        // https://crbug.com/700501. Technically this is a valid value, but in
+-        // practice shouldn't occur, so just ignore it when estimating.
+-        if (packet_pts != kNoTimestamp && packet_pts != kInfiniteDuration &&
+-            packet_pts < start_time_estimates[stream->index]) {
+-          start_time_estimates[stream->index] = packet_pts;
+-        }
+-      }
+-      packet_buffer = packet_buffer->next;
+-    }
+-  }
+-#endif  // !BUILDFLAG(USE_SYSTEM_FFMPEG)
+-
+   std::unique_ptr<MediaTracks> media_tracks(new MediaTracks());
+ 
+   DCHECK(track_id_to_demux_stream_map_.empty());
+@@ -1440,8 +1401,7 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
+ 
+     max_duration = std::max(max_duration, streams_[i]->duration());
+ 
+-    base::TimeDelta start_time =
+-        ExtractStartTime(stream, start_time_estimates[i]);
++    base::TimeDelta start_time = ExtractStartTime(stream);
+ 
+     // Note: This value is used for seeking, so we must take the true value and
+     // not the one possibly clamped to zero below.
+@@ -1479,7 +1439,7 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
+   if (text_enabled_)
+     AddTextStreams();
+ 
+-  if (format_context->duration != static_cast<int64_t>(AV_NOPTS_VALUE)) {
++  if (format_context->duration != kNoFFmpegTimestamp) {
+     // If there is a duration value in the container use that to find the
+     // maximum between it and the duration from A/V streams.
+     const AVRational av_time_base = {1, AV_TIME_BASE};
+diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
+index 71dbed07b376..b09816a3ba3a 100644
+--- a/media/filters/ffmpeg_demuxer_unittest.cc
++++ b/media/filters/ffmpeg_demuxer_unittest.cc
+@@ -696,12 +696,9 @@ TEST_F(FFmpegDemuxerTest, Read_InvalidNegativeTimestamp) {
+   ReadUntilEndOfStream(GetStream(DemuxerStream::AUDIO));
+ }
+ 
+-// TODO(dalecurtis): Test is disabled since FFmpeg does not currently guarantee
+-// the order of demuxed packets in OGG containers.  Re-enable and fix key frame
+-// expectations once we decide to either workaround it or attempt a fix
+-// upstream.  See http://crbug.com/387996.
+-TEST_F(FFmpegDemuxerTest,
+-       DISABLED_Read_AudioNegativeStartTimeAndOggDiscard_Bear) {
++// Android has no Theora support, so these tests doesn't work.
++#if !defined(OS_ANDROID)
++TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Bear) {
+   // Many ogg files have negative starting timestamps, so ensure demuxing and
+   // seeking work correctly with a negative start time.
+   CreateDemuxer("bear.ogv");
+@@ -711,8 +708,12 @@ TEST_F(FFmpegDemuxerTest,
+   DemuxerStream* video = GetStream(DemuxerStream::VIDEO);
+   DemuxerStream* audio = GetStream(DemuxerStream::AUDIO);
+ 
+-  // Run the test twice with a seek in between.
+-  for (int i = 0; i < 2; ++i) {
++  // Run the test once (should be twice..., see note) with a seek in between.
++  //
++  // TODO(dalecurtis): We only run the test once since FFmpeg does not currently
++  // guarantee the order of demuxed packets in OGG containers. See
++  // http://crbug.com/387996.
++  for (int i = 0; i < 1; ++i) {
+     audio->Read(
+         NewReadCBWithCheckedDiscard(FROM_HERE, 40, 0, kInfiniteDuration, true));
+     base::RunLoop().Run();
+@@ -731,10 +732,10 @@ TEST_F(FFmpegDemuxerTest,
+     video->Read(NewReadCB(FROM_HERE, 5751, 0, true));
+     base::RunLoop().Run();
+ 
+-    video->Read(NewReadCB(FROM_HERE, 846, 33367, true));
++    video->Read(NewReadCB(FROM_HERE, 846, 33367, false));
+     base::RunLoop().Run();
+ 
+-    video->Read(NewReadCB(FROM_HERE, 1255, 66733, true));
++    video->Read(NewReadCB(FROM_HERE, 1255, 66733, false));
+     base::RunLoop().Run();
+ 
+     // Seek back to the beginning and repeat the test.
+@@ -747,9 +748,6 @@ TEST_F(FFmpegDemuxerTest,
+ // Same test above, but using sync2.ogv which has video stream muxed before the
+ // audio stream, so seeking based only on start time will fail since ffmpeg is
+ // essentially just seeking based on file position.
+-//
+-// Android has no Theora support, so this test doesn't work.
+-#if !defined(OS_ANDROID)
+ TEST_F(FFmpegDemuxerTest, Read_AudioNegativeStartTimeAndOggDiscard_Sync) {
+   // Many ogg files have negative starting timestamps, so ensure demuxing and
+   // seeking work correctly with a negative start time.
+-- 
+2.17.0
+

Copied: chromium/repos/extra-x86_64/x11-fix-mixup-between-DIP-pixel-coordinates.patch (from rev 326097, chromium/trunk/x11-fix-mixup-between-DIP-pixel-coordinates.patch)
===================================================================
--- x11-fix-mixup-between-DIP-pixel-coordinates.patch	                        (rev 0)
+++ x11-fix-mixup-between-DIP-pixel-coordinates.patch	2018-06-06 23:09:36 UTC (rev 326098)
@@ -0,0 +1,40 @@
+From 2752a03ba6435130848aa620b7ab4246eec2f77a Mon Sep 17 00:00:00 2001
+From: Tom Anderson <thomasanderson at chromium.org>
+Date: Mon, 4 Jun 2018 22:09:08 +0000
+Subject: [PATCH] X11: Fix mixup between DIP/pixel coordinates
+
+BUG=707721
+R=sky
+
+Change-Id: Ibbbff9c2c815700324f553a3b66e878f76938534
+Reviewed-on: https://chromium-review.googlesource.com/1083692
+Reviewed-by: Scott Violet <sky at chromium.org>
+Commit-Queue: Thomas Anderson <thomasanderson at chromium.org>
+Cr-Commit-Position: refs/heads/master@{#564261}
+---
+ ui/views/widget/desktop_aura/desktop_screen_x11.cc | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/ui/views/widget/desktop_aura/desktop_screen_x11.cc b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
+index 8fd5d379d344..e90710c2c39c 100644
+--- a/ui/views/widget/desktop_aura/desktop_screen_x11.cc
++++ b/ui/views/widget/desktop_aura/desktop_screen_x11.cc
+@@ -216,8 +216,13 @@ display::Display DesktopScreenX11::GetDisplayNearestWindow(
+   if (host) {
+     DesktopWindowTreeHostX11* rwh = DesktopWindowTreeHostX11::GetHostForXID(
+         host->GetAcceleratedWidget());
+-    if (rwh)
+-      return GetDisplayMatching(rwh->GetX11RootWindowBounds());
++    if (rwh) {
++      const float scale = 1.0f / GetDeviceScaleFactor();
++      const gfx::Rect pixel_rect = rwh->GetX11RootWindowBounds();
++      return GetDisplayMatching(
++          gfx::Rect(gfx::ScaleToFlooredPoint(pixel_rect.origin(), scale),
++                    gfx::ScaleToCeiledSize(pixel_rect.size(), scale)));
++    }
+   }
+ 
+   return GetPrimaryDisplay();
+-- 
+2.17.1
+



More information about the arch-commits mailing list