diff options
author | Samantha McVey | 2016-07-09 02:53:14 -0700 |
---|---|---|
committer | Samantha McVey | 2016-07-09 02:53:14 -0700 |
commit | 10d7312a4150b3e339c831fd35e3baae46fa1dea (patch) | |
tree | 2b459a7b472fc4055565b6c8d0e3f8c18e87f3be | |
download | aur-10d7312a4150b3e339c831fd35e3baae46fa1dea.tar.gz |
first commit
-rw-r--r-- | .SRCINFO | 59 | ||||
-rw-r--r-- | PKGBUILD | 225 | ||||
-rw-r--r-- | PNGImageDecoder.patch | 11 | ||||
-rw-r--r-- | chromium-launcher-3.tar.gz | bin | 0 -> 2884 bytes | |||
-rw-r--r-- | chromium-widevine.patch | 53 | ||||
-rw-r--r-- | chromium.desktop | 112 | ||||
-rw-r--r-- | chromium.install | 16 | ||||
-rw-r--r-- | chromium_vaapi.patch | 522 |
8 files changed, 998 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..7a280b5d860e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,59 @@ +pkgbase = chromium + pkgdesc = The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser + pkgver = 51.0.2704.106 + pkgrel = 1 + url = http://www.chromium.org/ + install = chromium.install + arch = i686 + arch = x86_64 + license = BSD + makedepends = python2 + makedepends = gperf + makedepends = yasm + makedepends = mesa + makedepends = ninja + makedepends = lib32-gcc-libs + makedepends = lib32-zlib + depends = gtk2 + depends = nss + depends = alsa-lib + depends = xdg-utils + depends = bzip2 + depends = libevent + depends = libxss + depends = libexif + depends = libgcrypt + depends = ttf-font + depends = systemd + depends = dbus + depends = flac + depends = snappy + depends = speech-dispatcher + depends = pciutils + depends = libpulse + depends = harfbuzz + depends = libsecret + depends = libvpx + depends = perl + depends = perl-file-basedir + depends = desktop-file-utils + depends = hicolor-icon-theme + optdepends = kdebase-kdialog: needed for file dialogs in KDE + optdepends = gnome-keyring: for storing passwords in GNOME keyring + optdepends = kwallet: for storing passwords in KWallet + options = !strip + source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-51.0.2704.106.tar.xz + source = chromium-launcher-3.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v3.tar.gz + source = chromium.desktop + source = chromium-widevine.patch + source = PNGImageDecoder.patch + source = chromium_vaapi.patch + sha256sums = fb97a6a3119ec2c8cc4ad9a0bd6c4d306516769039a2633633f7d0c770012cfd + sha256sums = 8b01fb4efe58146279858a754d90b49e5a38c9a0b36a1f84cbb7d12f92b84c28 + sha256sums = 028a748a5c275de9b8f776f97909f999a8583a4b77fd1cd600b4fc5c0c3e91e9 + sha256sums = 4660344789c45c9b9e52cb6d86f7cb6edb297b39320d04f6947e5216d6e5f64c + sha256sums = d9fd982ba6d50edb7743db6122b975ad1d3da5a9ad907c8ab7cf574395b186cd + sha256sums = 2258e5ab6ea5e06cee9d3740cf5c62ee04c41e300f6d27561c2788f78b1c70ab + +pkgname = chromium + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..54f417b4a876 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,225 @@ +# $Id: PKGBUILD 270821 2016-06-30 18:36:16Z bpiotrowski $ +# Maintainer: Evangelos Foutras <evangelos@foutrelis.com> +# Contributor: Pierre Schmitz <pierre@archlinux.de> +# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> +# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> + +pkgname=chromium +pkgver=51.0.2704.106 +pkgrel=1 +_launcher_ver=3 +pkgdesc="The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser" +arch=('i686' 'x86_64') +url="http://www.chromium.org/" +license=('BSD') +depends=('gtk2' 'nss' 'alsa-lib' 'xdg-utils' 'bzip2' 'libevent' 'libxss' + 'libexif' 'libgcrypt' 'ttf-font' 'systemd' 'dbus' 'flac' 'snappy' + 'speech-dispatcher' 'pciutils' 'libpulse' 'harfbuzz' 'libsecret' + 'libvpx' 'perl' 'perl-file-basedir' 'desktop-file-utils' + 'hicolor-icon-theme') +makedepends=('python2' 'gperf' 'yasm' 'mesa' 'ninja') +makedepends_x86_64=('lib32-gcc-libs' 'lib32-zlib') +optdepends=('kdebase-kdialog: needed for file dialogs in KDE' + 'gnome-keyring: for storing passwords in GNOME keyring' + 'kwallet: for storing passwords in KWallet') +options=('!strip') +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 + chromium.desktop + chromium-widevine.patch + PNGImageDecoder.patch + chromium_vaapi.patch) +sha256sums=('fb97a6a3119ec2c8cc4ad9a0bd6c4d306516769039a2633633f7d0c770012cfd' + '8b01fb4efe58146279858a754d90b49e5a38c9a0b36a1f84cbb7d12f92b84c28' + '028a748a5c275de9b8f776f97909f999a8583a4b77fd1cd600b4fc5c0c3e91e9' + '4660344789c45c9b9e52cb6d86f7cb6edb297b39320d04f6947e5216d6e5f64c' + 'd9fd982ba6d50edb7743db6122b975ad1d3da5a9ad907c8ab7cf574395b186cd' + '2258e5ab6ea5e06cee9d3740cf5c62ee04c41e300f6d27561c2788f78b1c70ab') + +# Google API keys (see http://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. Feel free to contact foutrelis@archlinux.org for +# more information. +_google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM +_google_default_client_id=413772536636.apps.googleusercontent.com +_google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4 + +# We can't build (P)NaCL on i686 because the toolchain is x86_64 only and the +# instructions on how to build the toolchain from source don't work that well +# (at least not from within the Chromium 39 source tree). +# https://sites.google.com/a/chromium.org/dev/nativeclient/pnacl/building-pnacl-components-for-distribution-packagers +_build_nacl=1 +if [[ $CARCH == i686 ]]; then + _build_nacl=0 +fi + +prepare() { + cd "$srcdir/$pkgname-$pkgver" + + # https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/9JX1N2nf4PU/discussion + touch chrome/test/data/webui/i18n_process_css_test.html + + # Enable support for the Widevine CDM plugin + # libwidevinecdm.so is not included, but can be copied over from Chrome + # (Version string doesn't seem to matter so let's go with "Pinkie Pie") + sed "s/@WIDEVINE_VERSION@/Pinkie Pie/" ../chromium-widevine.patch | + patch -Np1 + + # Chromium 51 won't build without this patch. Not reported upstream yet AFAIK. + patch -p1 -i "$srcdir"/PNGImageDecoder.patch + patch -p1 -i "$srcdir"/chromium_vaapi.patch + # Commentception – use bundled ICU due to build failures (50.0.2661.75) + # See https://crbug.com/584920 and https://crbug.com/592268 + # --- + ## Remove bundled ICU; its header files appear to get picked up instead of + ## the system ones, leading to errors during the final link stage. + ## https://groups.google.com/a/chromium.org/d/topic/chromium-packagers/BNGvJc08B6Q + #find third_party/icu -type f \! -regex '.*\.\(gyp\|gypi\|isolate\)' -delete + + # Use Python 2 + find . -name '*.py' -exec sed -i -r 's|/usr/bin/python$|&2|g' {} + + # There are still a lot of relative calls which need a workaround + mkdir -p "$srcdir/python2-path" + ln -sf /usr/bin/python2 "$srcdir/python2-path/python" + + # Download the PNaCL toolchain on x86_64; i686 toolchain is no longer provided + if (( $_build_nacl )); then + python2 build/download_nacl_toolchains.py \ + --packages nacl_x86_newlib,pnacl_newlib,pnacl_translator \ + sync --extract + fi +} + +build() { + cd "$srcdir/chromium-launcher-$_launcher_ver" + + make PREFIX=/usr + + cd "$srcdir/$pkgname-$pkgver" + + export PATH="$srcdir/python2-path:$PATH" + + # CFLAGS are passed through release_extra_cflags below + export -n CFLAGS CXXFLAGS + + # Work around bug in v8 in which GCC 6 optimizes away null pointer checks + # https://bugs.chromium.org/p/v8/issues/detail?id=3782 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69234 + CFLAGS+=' -fno-delete-null-pointer-checks' + + local _chromium_conf=( + -Dgoogle_api_key=$_google_api_key + -Dgoogle_default_client_id=$_google_default_client_id + -Dgoogle_default_client_secret=$_google_default_client_secret + -Dwerror= + -Dclang=0 + -Dpython_ver=2.7 + -Dlinux_link_gsettings=1 + -Dlinux_link_libpci=1 + -Dlinux_link_libspeechd=1 + -Dlinux_link_pulseaudio=1 + -Dlinux_strip_binary=1 + -Dlinux_use_bundled_binutils=0 + -Dlinux_use_bundled_gold=0 + -Dlinux_use_gold_flags=0 + -Dicu_use_data_file_flag=1 + -Dlogging_like_official_build=1 + -Dtracing_like_official_build=1 + -Dfieldtrial_testing_like_official_build=1 + -Drelease_extra_cflags="$CFLAGS" + -Dlibspeechd_h_prefix=speech-dispatcher/ + -Dffmpeg_branding=Chrome + -Dproprietary_codecs=1 + -Duse_gnome_keyring=0 + -Duse_system_bzip2=1 + -Duse_system_flac=1 + -Duse_system_ffmpeg=0 + -Duse_system_harfbuzz=1 + -Duse_system_icu=0 + -Duse_system_libevent=1 + -Duse_system_libjpeg=1 + -Duse_system_libpng=1 + -Duse_system_libvpx=1 + -Duse_system_libxml=0 + -Duse_system_snappy=1 + -Duse_system_xdg_utils=1 + -Duse_system_yasm=1 + -Duse_system_zlib=0 + -Dusb_ids_path=/usr/share/hwdata/usb.ids + -Duse_mojo=0 + -Duse_gconf=0 + -Duse_sysroot=0 + -Denable_hangout_services_extension=1 + -Denable_widevine=1 + -Ddisable_fatal_linker_warnings=1 + -Ddisable_glibc=1) + + if (( ! $_build_nacl )); then + _chromium_conf+=( + -Ddisable_nacl=1 + -Ddisable_pnacl=1 + ) + fi + + build/linux/unbundle/replace_gyp_files.py "${_chromium_conf[@]}" + build/gyp_chromium --depth=. "${_chromium_conf[@]}" + + ninja -C out/Release chrome chrome_sandbox chromedriver +} + +package() { + cd "$srcdir/chromium-launcher-$_launcher_ver" + + make PREFIX=/usr DESTDIR="$pkgdir" install-strip + 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" + + install -D out/Release/chromedriver "$pkgdir/usr/lib/chromium/chromedriver" + + cp out/Release/{*.pak,*.bin,libwidevinecdmadapter.so} \ + "$pkgdir/usr/lib/chromium/" + + # Manually strip binaries so that 'nacl_irt_*.nexe' is left intact + strip $STRIP_BINARIES "$pkgdir/usr/lib/chromium/"{chromium,chrome-sandbox} \ + "$pkgdir/usr/lib/chromium/chromedriver" + strip $STRIP_SHARED "$pkgdir/usr/lib/chromium/libwidevinecdmadapter.so" + + if (( $_build_nacl )); then + cp out/Release/nacl_helper{,_bootstrap} out/Release/nacl_irt_*.nexe \ + "$pkgdir/usr/lib/chromium/" + strip $STRIP_BINARIES "$pkgdir/usr/lib/chromium/"nacl_helper{,_bootstrap} + fi + + cp -a out/Release/locales "$pkgdir/usr/lib/chromium/" + + install -Dm644 out/Release/chrome.1 "$pkgdir/usr/share/man/man1/chromium.1" + + install -Dm644 "$srcdir/chromium.desktop" \ + "$pkgdir/usr/share/applications/chromium.desktop" + + 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 + + ln -s /usr/lib/chromium/chromedriver "$pkgdir/usr/bin/chromedriver" + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/chromium/LICENSE" + + install -Dm644 out/Release/icudtl.dat "${pkgdir}/usr/lib/chromium/icudtl.dat" +} + +# vim:set ts=2 sw=2 et: diff --git a/PNGImageDecoder.patch b/PNGImageDecoder.patch new file mode 100644 index 000000000000..986e66223792 --- /dev/null +++ b/PNGImageDecoder.patch @@ -0,0 +1,11 @@ +--- a/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cppg 2016-05-01 15:22:46.103607522 +0800 ++++ b/third_party/WebKit/Source/platform/image-decoders/png/PNGImageDecoder.cpp 2016-05-01 15:25:14.459753876 +0800 +@@ -234,7 +234,7 @@ + #endif + png_uint_32 profileLength = 0; + if (png_get_iCCP(png, info, &profileName, &compressionType, &profile, &profileLength)) { +- setColorProfileAndTransform(profile, profileLength, imageHasAlpha, false /* useSRGB */); ++ setColorProfileAndTransform((const char*)profile, profileLength, imageHasAlpha, false /* useSRGB */); + } + } + #endif // PNG_iCCP_SUPPORTED diff --git a/chromium-launcher-3.tar.gz b/chromium-launcher-3.tar.gz Binary files differnew file mode 100644 index 000000000000..4e78ef996592 --- /dev/null +++ b/chromium-launcher-3.tar.gz diff --git a/chromium-widevine.patch b/chromium-widevine.patch new file mode 100644 index 000000000000..569ad4c88bfe --- /dev/null +++ b/chromium-widevine.patch @@ -0,0 +1,53 @@ +diff -upr chromium-48.0.2564.82.orig/chrome/common/chrome_content_client.cc chromium-48.0.2564.82/chrome/common/chrome_content_client.cc +--- chromium-48.0.2564.82.orig/chrome/common/chrome_content_client.cc 2016-01-20 22:01:20.000000000 +0200 ++++ chromium-48.0.2564.82/chrome/common/chrome_content_client.cc 2016-01-21 20:02:02.788936626 +0200 +@@ -158,7 +158,12 @@ void ComputeBuiltInPlugins(std::vector<c + #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \ + !defined(WIDEVINE_CDM_IS_COMPONENT) + static bool skip_widevine_cdm_file_check = false; +- if (PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &path)) { ++ bool widevine_cdm_present = ++ skip_widevine_cdm_file_check || ++ (PathService::Get(chrome::FILE_WIDEVINE_CDM, &path) && ++ base::PathExists(path)); ++ if (widevine_cdm_present && ++ PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &path)) { + if (skip_widevine_cdm_file_check || base::PathExists(path)) { + content::PepperPluginInfo widevine_cdm; + widevine_cdm.is_out_of_process = true; +diff -upr chromium-48.0.2564.82.orig/chrome/common/chrome_paths.cc chromium-48.0.2564.82/chrome/common/chrome_paths.cc +--- chromium-48.0.2564.82.orig/chrome/common/chrome_paths.cc 2016-01-20 22:01:20.000000000 +0200 ++++ chromium-48.0.2564.82/chrome/common/chrome_paths.cc 2016-01-21 19:18:51.287978456 +0200 +@@ -375,6 +375,11 @@ bool PathProvider(int key, base::FilePat + return false; + cur = cur.AppendASCII(kWidevineCdmAdapterFileName); + break; ++ case chrome::FILE_WIDEVINE_CDM: ++ if (!GetInternalPluginsDirectory(&cur)) ++ return false; ++ cur = cur.AppendASCII(kWidevineCdmFileName); ++ break; + #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) + case chrome::FILE_RESOURCES_PACK: + #if defined(OS_MACOSX) && !defined(OS_IOS) +diff -upr chromium-48.0.2564.82.orig/chrome/common/chrome_paths.h chromium-48.0.2564.82/chrome/common/chrome_paths.h +--- chromium-48.0.2564.82.orig/chrome/common/chrome_paths.h 2016-01-14 03:49:22.000000000 +0200 ++++ chromium-48.0.2564.82/chrome/common/chrome_paths.h 2016-01-21 19:18:51.287978456 +0200 +@@ -99,6 +99,7 @@ enum { + DIR_COMPONENT_WIDEVINE_CDM, // Directory that contains component-updated + // Widevine CDM files. + FILE_WIDEVINE_CDM_ADAPTER, // Full path to the Widevine CDM adapter file. ++ FILE_WIDEVINE_CDM, // Full path to the Widevine CDM file. + FILE_RESOURCES_PACK, // Full path to the .pak file containing + // binary data (e.g., html files and images + // used by internal pages). +diff -upr chromium-48.0.2564.82.orig/third_party/widevine/cdm/stub/widevine_cdm_version.h chromium-48.0.2564.82/third_party/widevine/cdm/stub/widevine_cdm_version.h +--- chromium-48.0.2564.82.orig/third_party/widevine/cdm/stub/widevine_cdm_version.h 2016-01-14 01:05:17.000000000 +0200 ++++ chromium-48.0.2564.82/third_party/widevine/cdm/stub/widevine_cdm_version.h 2016-01-21 19:18:51.287978456 +0200 +@@ -12,4 +12,6 @@ + + #define WIDEVINE_CDM_AVAILABLE + ++#define WIDEVINE_CDM_VERSION_STRING "@WIDEVINE_VERSION@" ++ + #endif // WIDEVINE_CDM_VERSION_H_ diff --git a/chromium.desktop b/chromium.desktop new file mode 100644 index 000000000000..05788f7135da --- /dev/null +++ b/chromium.desktop @@ -0,0 +1,112 @@ +[Desktop Entry] +Name=Chromium +# Only KDE 4 seems to use GenericName, so we reuse the KDE strings. +# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413. +GenericName=Web Browser +GenericName[ar]=متصفح الشبكة +GenericName[bg]=Уеб браузър +GenericName[ca]=Navegador web +GenericName[cs]=WWW prohlížeč +GenericName[da]=Browser +GenericName[de]=Web-Browser +GenericName[el]=Περιηγητής ιστού +GenericName[en_GB]=Web Browser +GenericName[es]=Navegador web +GenericName[et]=Veebibrauser +GenericName[fi]=WWW-selain +GenericName[fr]=Navigateur Web +GenericName[gu]=વેબ બ્રાઉઝર +GenericName[he]=דפדפן אינטרנט +GenericName[hi]=वेब ब्राउज़र +GenericName[hu]=Webböngésző +GenericName[it]=Browser Web +GenericName[ja]=ウェブブラウザ +GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ +GenericName[ko]=웹 브라우저 +GenericName[lt]=Žiniatinklio naršyklė +GenericName[lv]=Tīmekļa pārlūks +GenericName[ml]=വെബ് ബ്രൌസര് +GenericName[mr]=वेब ब्राऊजर +GenericName[nb]=Nettleser +GenericName[nl]=Webbrowser +GenericName[pl]=Przeglądarka WWW +GenericName[pt]=Navegador Web +GenericName[pt_BR]=Navegador da Internet +GenericName[ro]=Navigator de Internet +GenericName[ru]=Веб-браузер +GenericName[sl]=Spletni brskalnik +GenericName[sv]=Webbläsare +GenericName[ta]=இணைய உலாவி +GenericName[th]=เว็บเบราว์เซอร์ +GenericName[tr]=Web Tarayıcı +GenericName[uk]=Навігатор Тенет +GenericName[zh_CN]=网页浏览器 +GenericName[zh_HK]=網頁瀏覽器 +GenericName[zh_TW]=網頁瀏覽器 +# Not translated in KDE, from Epiphany 2.26.1-0ubuntu1. +GenericName[bn]=ওয়েব ব্রাউজার +GenericName[fil]=Web Browser +GenericName[hr]=Web preglednik +GenericName[id]=Browser Web +GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର +GenericName[sk]=WWW prehliadač +GenericName[sr]=Интернет прегледник +GenericName[te]=మహాతల అన్వేషి +GenericName[vi]=Bộ duyệt Web +# Gnome and KDE 3 uses Comment. +Comment=Access the Internet +Comment[ar]=الدخول إلى الإنترنت +Comment[bg]=Достъп до интернет +Comment[bn]=ইন্টারনেটটি অ্যাক্সেস করুন +Comment[ca]=Accedeix a Internet +Comment[cs]=Přístup k internetu +Comment[da]=Få adgang til internettet +Comment[de]=Internetzugriff +Comment[el]=Πρόσβαση στο Διαδίκτυο +Comment[en_GB]=Access the Internet +Comment[es]=Accede a Internet. +Comment[et]=Pääs Internetti +Comment[fi]=Käytä internetiä +Comment[fil]=I-access ang Internet +Comment[fr]=Accéder à Internet +Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો +Comment[he]=גישה אל האינטרנט +Comment[hi]=इंटरनेट तक पहुंच स्थापित करें +Comment[hr]=Pristup Internetu +Comment[hu]=Internetelérés +Comment[id]=Akses Internet +Comment[it]=Accesso a Internet +Comment[ja]=インターネットにアクセス +Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ +Comment[ko]=인터넷 연결 +Comment[lt]=Interneto prieiga +Comment[lv]=Piekļūt internetam +Comment[ml]=ഇന്റര്നെറ്റ് ആക്സസ് ചെയ്യുക +Comment[mr]=इंटरनेटमध्ये प्रवेश करा +Comment[nb]=Gå til Internett +Comment[nl]=Verbinding maken met internet +Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ +Comment[pl]=Skorzystaj z internetu +Comment[pt]=Aceder à Internet +Comment[pt_BR]=Acessar a internet +Comment[ro]=Accesaţi Internetul +Comment[ru]=Доступ в Интернет +Comment[sk]=Prístup do siete Internet +Comment[sl]=Dostop do interneta +Comment[sr]=Приступите Интернету +Comment[sv]=Gå ut på Internet +Comment[ta]=இணையத்தை அணுகுதல் +Comment[te]=ఇంటర్నెట్ను ఆక్సెస్ చెయ్యండి +Comment[th]=เข้าถึงอินเทอร์เน็ต +Comment[tr]=İnternet'e erişin +Comment[uk]=Доступ до Інтернету +Comment[vi]=Truy cập Internet +Comment[zh_CN]=访问互联网 +Comment[zh_HK]=連線到網際網路 +Comment[zh_TW]=連線到網際網路 +Exec=chromium %U +Terminal=false +Icon=chromium +Type=Application +Categories=GTK;Network;WebBrowser; +MimeType=text/html;text/xml;application/xhtml+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https; diff --git a/chromium.install b/chromium.install new file mode 100644 index 000000000000..c2b5000d2d7b --- /dev/null +++ b/chromium.install @@ -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: diff --git a/chromium_vaapi.patch b/chromium_vaapi.patch new file mode 100644 index 000000000000..f44316e10ef7 --- /dev/null +++ b/chromium_vaapi.patch @@ -0,0 +1,522 @@ +Description: +Enables using VA-API hardware acceleration in Linux. The patch for bpf_gpu_policy_linux.cc initially came from https://codereview.chromium.org/15955009/diff/92001/content/common/sandbox_linux/bpf_gpu_policy_linux.cc + +Taken from: +https://code.launchpad.net/~saiarcot895/chromium-browser/chromium-browser.wily.dev +And rebased against chromium-dev 51.0.2704.63 sources. + +-------- + +diff -uar chromium-51.0.2704.63.orig/chrome/browser/about_flags.cc chromium-51.0.2704.63/chrome/browser/about_flags.cc +--- chromium-51.0.2704.63.orig/chrome/browser/about_flags.cc 2016-05-25 21:00:57.000000000 +0200 ++++ chromium-51.0.2704.63/chrome/browser/about_flags.cc 2016-05-26 09:45:41.205615406 +0200 +@@ -843,7 +843,7 @@ + "disable-accelerated-video-decode", + IDS_FLAGS_ACCELERATED_VIDEO_DECODE_NAME, + IDS_FLAGS_ACCELERATED_VIDEO_DECODE_DESCRIPTION, +- kOsMac | kOsWin | kOsCrOS, ++ kOsAll, + SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode), + }, + #if defined(USE_ASH) +diff -uar chromium-51.0.2704.63.orig/content/common/BUILD.gn chromium-51.0.2704.63/content/common/BUILD.gn +--- chromium-51.0.2704.63.orig/content/common/BUILD.gn 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/common/BUILD.gn 2016-05-26 09:45:41.207615638 +0200 +@@ -11,7 +11,7 @@ + import("//build/config/mac/mac_sdk.gni") + } + +-if (is_chromeos && current_cpu != "arm") { ++if (is_linux && !(is_chromeos && current_cpu == "arm")) { + action("libva_generate_stubs") { + extra_header = "gpu/media/va_stub_header.fragment" + +@@ -347,7 +347,7 @@ + } + } + +- if (is_chromeos) { ++ if (is_linux) { + sources += [ + "gpu/media/accelerated_video_decoder.h", + "gpu/media/h264_decoder.cc", +@@ -392,13 +392,13 @@ + "GLESv2", + ] + } +- if (current_cpu == "arm") { ++ if (current_cpu == "arm" && is_chromeos) { + sources += [ + "gpu/media/tegra_v4l2_device.cc", + "gpu/media/tegra_v4l2_device.h", + ] + } +- if (current_cpu != "arm") { ++ if (current_cpu != "arm" || !is_chromeos) { + sources += [ + "gpu/media/va_surface.h", + "gpu/media/vaapi_jpeg_decode_accelerator.cc", +diff -uar chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator.cc chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator.cc +--- chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator.cc 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator.cc 2016-05-26 09:45:41.208615755 +0200 +@@ -57,7 +57,7 @@ + return true; + } + +-#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX) ++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX) || defined(OS_LINUX) + static bool BindImage(const base::WeakPtr<gpu::GpuCommandBufferStub>& stub, + uint32_t client_texture_id, + uint32_t texture_target, +@@ -169,7 +169,7 @@ + get_gl_context_cb_ = base::Bind(&GetGLContext, stub_->AsWeakPtr()); + make_context_current_cb_ = + base::Bind(&MakeDecoderContextCurrent, stub_->AsWeakPtr()); +-#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX) ++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX) || defined(OS_LINUX) + bind_image_cb_ = base::Bind(&BindImage, stub_->AsWeakPtr()); + #endif + get_gles2_decoder_cb_ = base::Bind(&GetGLES2Decoder, stub_->AsWeakPtr()); +diff -uar chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc +--- chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.cc 2016-05-26 09:45:41.208615755 +0200 +@@ -13,14 +13,14 @@ + #include "content/common/gpu/media/dxva_video_decode_accelerator_win.h" + #elif defined(OS_MACOSX) + #include "content/common/gpu/media/vt_video_decode_accelerator_mac.h" +-#elif defined(OS_CHROMEOS) ++#elif defined(OS_CHROMEOS) || defined(OS_LINUX) + #if defined(USE_V4L2_CODEC) + #include "content/common/gpu/media/v4l2_device.h" + #include "content/common/gpu/media/v4l2_slice_video_decode_accelerator.h" + #include "content/common/gpu/media/v4l2_video_decode_accelerator.h" + #include "ui/gl/gl_surface_egl.h" + #endif +-#if defined(ARCH_CPU_X86_FAMILY) ++#if defined(ARCH_CPU_X86_FAMILY) || defined(OS_LINUX) + #include "content/common/gpu/media/vaapi_video_decode_accelerator.h" + #include "ui/gl/gl_implementation.h" + #endif +@@ -78,7 +78,7 @@ + #if defined(OS_WIN) + capabilities.supported_profiles = + DXVAVideoDecodeAccelerator::GetSupportedProfiles(); +-#elif defined(OS_CHROMEOS) ++#elif defined(OS_CHROMEOS) || defined(OS_LINUX) + media::VideoDecodeAccelerator::SupportedProfiles vda_profiles; + #if defined(USE_V4L2_CODEC) + vda_profiles = V4L2VideoDecodeAccelerator::GetSupportedProfiles(); +@@ -88,7 +88,7 @@ + media::GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles( + vda_profiles, &capabilities.supported_profiles); + #endif +-#if defined(ARCH_CPU_X86_FAMILY) ++#if defined(ARCH_CPU_X86_FAMILY) || defined(OS_LINUX) + vda_profiles = VaapiVideoDecodeAccelerator::GetSupportedProfiles(); + media::GpuVideoAcceleratorUtil::InsertUniqueDecodeProfiles( + vda_profiles, &capabilities.supported_profiles); +@@ -129,7 +129,7 @@ + &GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2VDA, + &GpuVideoDecodeAcceleratorFactoryImpl::CreateV4L2SVDA, + #endif +-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) ++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_LINUX) + &GpuVideoDecodeAcceleratorFactoryImpl::CreateVaapiVDA, + #endif + #if defined(OS_MACOSX) +@@ -194,10 +194,11 @@ + } + #endif + +-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) ++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_LINUX) + scoped_ptr<media::VideoDecodeAccelerator> + GpuVideoDecodeAcceleratorFactoryImpl::CreateVaapiVDA( + const gpu::GpuPreferences& gpu_preferences) const { ++ VLOG(1) << "Creating new VAAPI video decode accelerator."; + scoped_ptr<media::VideoDecodeAccelerator> decoder; + decoder.reset(new VaapiVideoDecodeAccelerator(make_context_current_cb_, + bind_image_cb_)); +diff -uar chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h +--- chromium-51.0.2704.63.orig/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/common/gpu/media/gpu_video_decode_accelerator_factory_impl.h 2016-05-26 09:45:41.208615755 +0200 +@@ -95,7 +95,7 @@ + scoped_ptr<media::VideoDecodeAccelerator> CreateV4L2SVDA( + const gpu::GpuPreferences& gpu_preferences) const; + #endif +-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) ++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_LINUX) + scoped_ptr<media::VideoDecodeAccelerator> CreateVaapiVDA( + const gpu::GpuPreferences& gpu_preferences) const; + #endif +diff -uar chromium-51.0.2704.63.orig/content/common/gpu/media/vaapi_video_decode_accelerator.cc chromium-51.0.2704.63/content/common/gpu/media/vaapi_video_decode_accelerator.cc +--- chromium-51.0.2704.63.orig/content/common/gpu/media/vaapi_video_decode_accelerator.cc 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/common/gpu/media/vaapi_video_decode_accelerator.cc 2016-05-26 09:45:41.209615872 +0200 +@@ -337,17 +337,17 @@ + + base::AutoLock auto_lock(lock_); + DCHECK_EQ(state_, kUninitialized); +- DVLOG(2) << "Initializing VAVDA, profile: " << profile; ++ VLOG(1) << "Initializing VAVDA, profile: " << profile; + + #if defined(USE_X11) + if (gfx::GetGLImplementation() != gfx::kGLImplementationDesktopGL) { +- DVLOG(1) << "HW video decode acceleration not available without " ++ VLOG(1) << "HW video decode acceleration not available without " + "DesktopGL (GLX)."; + return false; + } + #elif defined(USE_OZONE) + if (gfx::GetGLImplementation() != gfx::kGLImplementationEGLGLES2) { +- DVLOG(1) << "HW video decode acceleration not available without " ++ VLOG(1) << "HW video decode acceleration not available without " + << "EGLGLES2."; + return false; + } +@@ -357,7 +357,7 @@ + VaapiWrapper::kDecode, profile, base::Bind(&ReportToUMA, VAAPI_ERROR)); + + if (!vaapi_wrapper_.get()) { +- DVLOG(1) << "Failed initializing VAAPI for profile " << profile; ++ VLOG(1) << "Failed initializing VAAPI for profile " << profile; + return false; + } + +@@ -374,7 +374,7 @@ + vp9_accelerator_.reset(new VaapiVP9Accelerator(this, vaapi_wrapper_.get())); + decoder_.reset(new VP9Decoder(vp9_accelerator_.get())); + } else { +- DLOG(ERROR) << "Unsupported profile " << profile; ++ VLOG(1) << "Unsupported profile " << profile; + return false; + } + +diff -uar chromium-51.0.2704.63.orig/content/common/gpu/media/vaapi_wrapper.cc chromium-51.0.2704.63/content/common/gpu/media/vaapi_wrapper.cc +--- chromium-51.0.2704.63.orig/content/common/gpu/media/vaapi_wrapper.cc 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/common/gpu/media/vaapi_wrapper.cc 2016-05-26 09:45:41.209615872 +0200 +@@ -186,7 +186,7 @@ + VAProfile va_profile, + const base::Closure& report_error_to_uma_cb) { + if (!profile_infos_.Get().IsProfileSupported(mode, va_profile)) { +- DVLOG(1) << "Unsupported va_profile: " << va_profile; ++ VLOG(1) << "Unsupported va_profile: " << va_profile; + return nullptr; + } + +@@ -341,15 +341,17 @@ + bool VaapiWrapper::VaInitialize(const base::Closure& report_error_to_uma_cb) { + static bool vaapi_functions_initialized = PostSandboxInitialization(); + if (!vaapi_functions_initialized) { +- bool running_on_chromeos = false; +-#if defined(OS_CHROMEOS) ++ bool error_level_logging = false; ++#if defined(OS_LINUX) ++ error_level_logging = true; ++#elif defined(OS_CHROMEOS) + // When chrome runs on linux with chromeos=1, do not log error message + // without VAAPI libraries. +- running_on_chromeos = base::SysInfo::IsRunningOnChromeOS(); ++ error_level_logging = base::SysInfo::IsRunningOnChromeOS(); + #endif + static const char kErrorMsg[] = "Failed to initialize VAAPI libs"; +- if (running_on_chromeos) +- LOG(ERROR) << kErrorMsg; ++ if (error_level_logging) ++ VLOG(1) << kErrorMsg; + else + DVLOG(1) << kErrorMsg; + return false; +@@ -417,7 +419,7 @@ + if (std::find(supported_entrypoints.begin(), + supported_entrypoints.end(), + entrypoint) == supported_entrypoints.end()) { +- DVLOG(1) << "Unsupported entrypoint"; ++ VLOG(1) << "Unsupported entrypoint"; + return false; + } + return true; +@@ -441,8 +443,8 @@ + if (attribs[i].type != required_attribs[i].type || + (attribs[i].value & required_attribs[i].value) != + required_attribs[i].value) { +- DVLOG(1) << "Unsupported value " << required_attribs[i].value +- << " for attribute type " << required_attribs[i].type; ++ VLOG(1) << "Unsupported value " << required_attribs[i].value ++ << " for attribute type " << required_attribs[i].type; + return false; + } + } +diff -uar chromium-51.0.2704.63.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc chromium-51.0.2704.63/content/common/sandbox_linux/bpf_gpu_policy_linux.cc +--- chromium-51.0.2704.63.orig/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/common/sandbox_linux/bpf_gpu_policy_linux.cc 2016-05-26 09:45:41.210615989 +0200 +@@ -22,6 +22,8 @@ + #include "base/macros.h" + #include "base/memory/scoped_ptr.h" + #include "build/build_config.h" ++// Auto-generated for dlopen libva libraries ++#include "content/common/gpu/media/va_stubs.h" + #include "content/common/sandbox_linux/sandbox_bpf_base_policy_linux.h" + #include "content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h" + #include "content/common/set_process_title.h" +@@ -32,6 +34,8 @@ + #include "sandbox/linux/syscall_broker/broker_file_permission.h" + #include "sandbox/linux/syscall_broker/broker_process.h" + #include "sandbox/linux/system_headers/linux_syscalls.h" ++#include "third_party/libva/va/va.h" ++#include "third_party/libva/va/va_x11.h" + + using sandbox::arch_seccomp_data; + using sandbox::bpf_dsl::Allow; +@@ -41,6 +45,11 @@ + using sandbox::syscall_broker::BrokerProcess; + using sandbox::SyscallSets; + ++using content_common_gpu_media::kModuleVa; ++using content_common_gpu_media::kModuleVa_x11; ++using content_common_gpu_media::InitializeStubs; ++using content_common_gpu_media::StubPathMap; ++ + namespace content { + + namespace { +@@ -95,7 +104,7 @@ + + bool IsAcceleratedVaapiVideoEncodeEnabled() { + bool accelerated_encode_enabled = false; +-#if defined(OS_CHROMEOS) ++#if defined(OS_CHROMEOS) || defined(OS_LINUX) + const base::CommandLine& command_line = + *base::CommandLine::ForCurrentProcess(); + accelerated_encode_enabled = +@@ -295,32 +304,46 @@ + GpuBrokerProcessPolicy::Create, + std::vector<BrokerFilePermission>()); // No extra files in whitelist. + +- if (IsArchitectureX86_64() || IsArchitectureI386()) { ++ if (true) { + // Accelerated video dlopen()'s some shared objects + // inside the sandbox, so preload them now. + if (IsAcceleratedVaapiVideoEncodeEnabled() || + IsAcceleratedVideoDecodeEnabled()) { +- const char* I965DrvVideoPath = NULL; +- const char* I965HybridDrvVideoPath = NULL; ++ VLOG(1) << "Attempting to enable hardware video acceleration."; ++ StubPathMap paths; ++ paths[kModuleVa].push_back("libva.so.1"); ++ paths[kModuleVa_x11].push_back("libva-x11.so.1"); ++ if (!InitializeStubs(paths)) { ++ VLOG(1) << "Failed to initialize stubs"; ++ return false; ++ } + +- if (IsArchitectureX86_64()) { +- I965DrvVideoPath = "/usr/lib64/va/drivers/i965_drv_video.so"; +- I965HybridDrvVideoPath = "/usr/lib64/va/drivers/hybrid_drv_video.so"; +- } else if (IsArchitectureI386()) { +- I965DrvVideoPath = "/usr/lib/va/drivers/i965_drv_video.so"; ++ // libva drivers won't get loaded even above two libraries get dlopened. ++ // Thus, libva calls will fail after post sandbox stage. ++ // ++ // To get the va driver loaded before sandboxing, upstream simply dlopen ++ // the hard-coded va driver path because ChromeOS is the only platform ++ // that Google want to support libva. ++ // ++ // While generic linux distros ship va driver as anywhere they want. ++ // Fortunately, the va driver will be loadded when vaInitialize() get ++ // called. ++ // So the following code is to call vaInitialize() before sandboxing. ++ Display* x_display = XOpenDisplay(NULL); ++ VADisplay va_display = vaGetDisplay(x_display); ++ if (!vaDisplayIsValid(va_display)) { ++ VLOG(1) << "Failed to call vaGetDisplay()"; ++ return false; + } + +- dlopen(I965DrvVideoPath, RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); +- if (I965HybridDrvVideoPath) +- dlopen(I965HybridDrvVideoPath, RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); +- dlopen("libva.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); +-#if defined(USE_OZONE) +- dlopen("libva-drm.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); +-#elif defined(USE_X11) +- dlopen("libva-x11.so.1", RTLD_NOW|RTLD_GLOBAL|RTLD_NODELETE); +-#endif +- } +- } ++ int major_version, minor_version; ++ if (vaInitialize(va_display, &major_version, &minor_version) ++ != VA_STATUS_SUCCESS) { ++ VLOG(1) << "Failed to call vaInitialize()"; ++ return false; ++ } ++ } // end of IsAcceleratedVaapiVideoEncodeEnabled() || IsAcceleratedVideoDecodeEnabled() ++ } // end of true + + return true; + } +diff -uar chromium-51.0.2704.63.orig/content/content_common.gypi chromium-51.0.2704.63/content/content_common.gypi +--- chromium-51.0.2704.63.orig/content/content_common.gypi 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/content_common.gypi 2016-05-26 09:45:41.210615989 +0200 +@@ -790,7 +790,7 @@ + }, + ], + }], +- ['chromeos==1', { ++ ['chromeos==1 or desktop_linux==1', { + 'sources': [ + 'common/gpu/media/accelerated_video_decoder.h', + 'common/gpu/media/h264_decoder.cc', +@@ -846,7 +846,7 @@ + 'common/gpu/media/tegra_v4l2_device.h', + ], + }], +- ['target_arch != "arm" and chromeos == 1', { ++ ['(target_arch != "arm" and chromeos == 1) or desktop_linux == 1', { + 'dependencies': [ + '../media/media.gyp:media', + '../third_party/libyuv/libyuv.gyp:libyuv', +diff -uar chromium-51.0.2704.63.orig/content/content_gpu.gypi chromium-51.0.2704.63/content/content_gpu.gypi +--- chromium-51.0.2704.63.orig/content/content_gpu.gypi 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/content_gpu.gypi 2016-05-26 09:45:41.210615989 +0200 +@@ -45,7 +45,7 @@ + ], + }, + }], +- ['target_arch!="arm" and chromeos == 1', { ++ ['(target_arch!="arm" and chromeos == 1) or desktop_linux == 1', { + 'include_dirs': [ + '<(DEPTH)/third_party/libva', + ], +diff -uar chromium-51.0.2704.63.orig/content/content_tests.gypi chromium-51.0.2704.63/content/content_tests.gypi +--- chromium-51.0.2704.63.orig/content/content_tests.gypi 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/content_tests.gypi 2016-05-26 09:45:41.211616106 +0200 +@@ -1729,7 +1729,7 @@ + }, + ] + }], +- ['chromeos==1 and target_arch != "arm"', { ++ ['desktop_linux==1 or (chromeos==1 and target_arch != "arm")', { + 'targets': [ + { + 'target_name': 'vaapi_jpeg_decoder_unittest', +diff -uar chromium-51.0.2704.63.orig/content/gpu/BUILD.gn chromium-51.0.2704.63/content/gpu/BUILD.gn +--- chromium-51.0.2704.63.orig/content/gpu/BUILD.gn 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/gpu/BUILD.gn 2016-05-26 09:45:41.229618219 +0200 +@@ -81,7 +81,7 @@ + ] + } + +- if (is_chromeos && current_cpu != "arm") { ++ if ((is_chromeos && current_cpu != "arm") || is_linux) { + configs += [ "//third_party/libva:libva_config" ] + } + +diff -uar chromium-51.0.2704.63.orig/content/gpu/gpu_main.cc chromium-51.0.2704.63/content/gpu/gpu_main.cc +--- chromium-51.0.2704.63.orig/content/gpu/gpu_main.cc 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/gpu/gpu_main.cc 2016-05-26 09:45:41.240619514 +0200 +@@ -74,7 +74,7 @@ + #include "content/common/sandbox_mac.h" + #endif + +-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) ++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_LINUX) + #include "content/common/gpu/media/vaapi_wrapper.h" + #endif + +@@ -245,7 +245,7 @@ + GetGpuInfoFromCommandLine(gpu_info, command_line); + gpu_info.in_process_gpu = false; + +-#if defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY) ++#if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_LINUX) + VaapiWrapper::PreSandboxInitialization(); + #endif + +diff -uar chromium-51.0.2704.63.orig/content/public/common/content_switches.cc chromium-51.0.2704.63/content/public/common/content_switches.cc +--- chromium-51.0.2704.63.orig/content/public/common/content_switches.cc 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/public/common/content_switches.cc 2016-05-26 09:45:41.240619514 +0200 +@@ -957,7 +957,9 @@ + #if defined(OS_CHROMEOS) + // Disables panel fitting (used for mirror mode). + const char kDisablePanelFitting[] = "disable-panel-fitting"; ++#endif + ++#if defined(OS_CHROMEOS) || defined(OS_LINUX) + // Disables VA-API accelerated video encode. + const char kDisableVaapiAcceleratedVideoEncode[] = + "disable-vaapi-accelerated-video-encode"; +diff -uar chromium-51.0.2704.63.orig/content/public/common/content_switches.h chromium-51.0.2704.63/content/public/common/content_switches.h +--- chromium-51.0.2704.63.orig/content/public/common/content_switches.h 2016-05-25 21:01:01.000000000 +0200 ++++ chromium-51.0.2704.63/content/public/common/content_switches.h 2016-05-26 09:45:41.241619632 +0200 +@@ -274,6 +274,8 @@ + + #if defined(OS_CHROMEOS) + CONTENT_EXPORT extern const char kDisablePanelFitting[]; ++#endif ++#if defined(OS_CHROMEOS) || defined(OS_LINUX) + CONTENT_EXPORT extern const char kDisableVaapiAcceleratedVideoEncode[]; + #endif + +diff -uar chromium-51.0.2704.63.orig/gpu/config/software_rendering_list_json.cc chromium-51.0.2704.63/gpu/config/software_rendering_list_json.cc +--- chromium-51.0.2704.63.orig/gpu/config/software_rendering_list_json.cc 2016-05-25 21:01:02.000000000 +0200 ++++ chromium-51.0.2704.63/gpu/config/software_rendering_list_json.cc 2016-05-26 09:45:41.256621394 +0200 +@@ -484,17 +484,6 @@ + ] + }, + { +- "id": 48, +- "description": "Accelerated video decode is unavailable on Linux", +- "cr_bugs": [137247], +- "os": { +- "type": "linux" +- }, +- "features": [ +- "accelerated_video_decode" +- ] +- }, +- { + "id": 49, + "description": "NVidia GeForce GT 650M can cause the system to hang with flash 3D", + "cr_bugs": [140175], +diff -uar chromium-51.0.2704.63.orig/media/BUILD.gn chromium-51.0.2704.63/media/BUILD.gn +--- chromium-51.0.2704.63.orig/media/BUILD.gn 2016-05-25 21:01:03.000000000 +0200 ++++ chromium-51.0.2704.63/media/BUILD.gn 2016-05-26 09:45:41.256621394 +0200 +@@ -326,7 +326,7 @@ + allow_circular_includes_from = [ "//media/base/android" ] + } + +- if (current_cpu != "arm" && is_chromeos) { ++ if ((current_cpu != "arm" && is_chromeos) || is_linux) { + sources += [ + "filters/h264_bitstream_buffer.cc", + "filters/h264_bitstream_buffer.h", +@@ -615,7 +615,7 @@ + } + } + +- if (current_cpu != "arm" && is_chromeos) { ++ if ((current_cpu != "arm" && is_chromeos) || is_linux) { + sources += [ "filters/h264_bitstream_buffer_unittest.cc" ] + } + +diff -uar chromium-51.0.2704.63.orig/media/media.gyp chromium-51.0.2704.63/media/media.gyp +--- chromium-51.0.2704.63.orig/media/media.gyp 2016-05-25 21:01:03.000000000 +0200 ++++ chromium-51.0.2704.63/media/media.gyp 2016-05-26 09:45:41.274623511 +0200 +@@ -739,7 +739,7 @@ + ], + }], + # For VaapiVideoEncodeAccelerator. +- ['target_arch != "arm" and chromeos == 1', { ++ ['(target_arch != "arm" and chromeos == 1) or desktop_linux == 1', { + 'sources': [ + 'filters/h264_bitstream_buffer.cc', + 'filters/h264_bitstream_buffer.h', +@@ -1313,7 +1313,7 @@ + 'cdm/cdm_adapter_unittest.cc', + ], + }], +- ['target_arch != "arm" and chromeos == 1 and use_x11 == 1', { ++ ['(target_arch != "arm" and chromeos == 1) or desktop_linux == 1 and use_x11 == 1', { + 'sources': [ + 'filters/h264_bitstream_buffer_unittest.cc', + ], |