mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
chromium: remove package
This commit is contained in:
parent
1566dc4b40
commit
3c24cd2e78
@ -1,26 +0,0 @@
|
||||
108
|
||||
- Security Update to 63.0.3239.108
|
||||
|
||||
107
|
||||
- Update to 63.0.3239.84
|
||||
|
||||
106
|
||||
- Update to 55.0.2883.75
|
||||
|
||||
105
|
||||
- Update to 55.0.2883.44
|
||||
|
||||
104
|
||||
- Update to 53.0.2785.92
|
||||
|
||||
103
|
||||
- add xdotool
|
||||
|
||||
102
|
||||
- add unclutter
|
||||
|
||||
101
|
||||
- update to version 50.0.2661.75
|
||||
|
||||
100
|
||||
- initial LibreELEC release
|
@ -1 +0,0 @@
|
||||
Xft.dpi: 96
|
@ -1,13 +0,0 @@
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-arabic-lang.so ArabicScriptEngineLang PangoEngineLang PangoRenderNone arabic:*
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-basic-fc.so BasicScriptEngineFc PangoEngineShape PangoRenderFc common:
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-indic-lang.so devaIndicScriptEngineLang PangoEngineLang PangoRenderNone devanagari:*
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-indic-lang.so bengIndicScriptEngineLang PangoEngineLang PangoRenderNone bengali:*
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-indic-lang.so guruIndicScriptEngineLang PangoEngineLang PangoRenderNone gurmukhi:*
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-indic-lang.so gujrIndicScriptEngineLang PangoEngineLang PangoRenderNone gujarati:*
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-indic-lang.so oryaIndicScriptEngineLang PangoEngineLang PangoRenderNone oriya:*
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-indic-lang.so tamlIndicScriptEngineLang PangoEngineLang PangoRenderNone tamil:*
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-indic-lang.so teluIndicScriptEngineLang PangoEngineLang PangoRenderNone telugu:*
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-indic-lang.so kndaIndicScriptEngineLang PangoEngineLang PangoRenderNone kannada:*
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-indic-lang.so mlymIndicScriptEngineLang PangoEngineLang PangoRenderNone malayalam:*
|
||||
/storage/.kodi/addons/browser.chromium/pango-modules/pango-indic-lang.so sinhIndicScriptEngineLang PangoEngineLang PangoRenderNone sinhala:*
|
||||
|
@ -1,10 +0,0 @@
|
||||
#
|
||||
# pangorc file for uninstalled operation. If pango-viewer is run with
|
||||
# this file in the current directory it will set it as PANGO_RC_FILE
|
||||
#
|
||||
|
||||
[Pango]
|
||||
ModuleFiles = /storage/.kodi/addons/browser.chromium/config/pango.modules
|
||||
|
||||
[PangoX]
|
||||
AliasFiles = /storage/.kodi/addons/browser.chromium/config/pangx.aliases
|
@ -1,125 +0,0 @@
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-jpeg.so"
|
||||
"jpeg" 5 "gdk-pixbuf" "The JPEG image format" "LGPL"
|
||||
"image/jpeg" ""
|
||||
"jpeg" "jpe" "jpg" ""
|
||||
"\377\330" "" 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-ani.so"
|
||||
"ani" 4 "gdk-pixbuf" "The ANI image format" "LGPL"
|
||||
"application/x-navi-animation" ""
|
||||
"ani" ""
|
||||
"RIFF ACON" " xxxx " 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-ico.so"
|
||||
"ico" 5 "gdk-pixbuf" "The ICO image format" "LGPL"
|
||||
"image/x-icon" "image/x-ico" "image/x-win-bitmap" ""
|
||||
"ico" "cur" ""
|
||||
" \001 " "zz znz" 100
|
||||
" \002 " "zz znz" 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-ras.so"
|
||||
"ras" 4 "gdk-pixbuf" "The Sun raster image format" "LGPL"
|
||||
"image/x-cmu-raster" "image/x-sun-raster" ""
|
||||
"ras" ""
|
||||
"Y\246j\225" "" 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-jasper.so"
|
||||
"jpeg2000" 4 "gdk-pixbuf" "The JPEG 2000 image format" "LGPL"
|
||||
"image/jp2" "image/jpeg2000" "image/jpx" ""
|
||||
"jp2" "jpc" "jpx" "j2k" "jpf" ""
|
||||
" jP" "!!!! " 100
|
||||
"\377O\377Q" "" 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-wbmp.so"
|
||||
"wbmp" 4 "gdk-pixbuf" "The WBMP image format" "LGPL"
|
||||
"image/vnd.wap.wbmp" ""
|
||||
"wbmp" ""
|
||||
" " "zz" 1
|
||||
" `" "z " 1
|
||||
" @" "z " 1
|
||||
" " "z " 1
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-png.so"
|
||||
"png" 5 "gdk-pixbuf" "The PNG image format" "LGPL"
|
||||
"image/png" ""
|
||||
"png" ""
|
||||
"\211PNG\r\n\032\n" "" 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-pcx.so"
|
||||
"pcx" 4 "gdk-pixbuf" "The PCX image format" "LGPL"
|
||||
"image/x-pcx" ""
|
||||
"pcx" ""
|
||||
"\n \001" "" 100
|
||||
"\n\002\001" "" 100
|
||||
"\n\003\001" "" 100
|
||||
"\n\004\001" "" 100
|
||||
"\n\005\001" "" 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-qtif.so"
|
||||
"qtif" 4 "gdk-pixbuf" "The QTIF image format" "LGPL"
|
||||
"image/x-quicktime" "image/qtif" ""
|
||||
"qtif" "qif" ""
|
||||
"abcdidsc" "xxxx " 100
|
||||
"abcdidat" "xxxx " 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-tiff.so"
|
||||
"tiff" 5 "gdk-pixbuf" "The TIFF image format" "LGPL"
|
||||
"image/tiff" ""
|
||||
"tiff" "tif" ""
|
||||
"MM *" " z " 100
|
||||
"II* " " z" 100
|
||||
"II* \020 CR\002 " " z zzz z" 0
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-icns.so"
|
||||
"icns" 4 "gdk-pixbuf" "The ICNS image format" "GPL"
|
||||
"image/x-icns" ""
|
||||
"icns" ""
|
||||
"icns" "" 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-tga.so"
|
||||
"tga" 4 "gdk-pixbuf" "The Targa image format" "LGPL"
|
||||
"image/x-tga" ""
|
||||
"tga" "targa" ""
|
||||
" \001\001" "x " 100
|
||||
" \001\t" "x " 100
|
||||
" \002" "xz " 99
|
||||
" \003" "xz " 100
|
||||
" \n" "xz " 100
|
||||
" \v" "xz " 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-bmp.so"
|
||||
"bmp" 5 "gdk-pixbuf" "The BMP image format" "LGPL"
|
||||
"image/bmp" "image/x-bmp" "image/x-MS-bmp" ""
|
||||
"bmp" ""
|
||||
"BM" "" 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-xbm.so"
|
||||
"xbm" 4 "gdk-pixbuf" "The XBM image format" "LGPL"
|
||||
"image/x-xbitmap" ""
|
||||
"xbm" ""
|
||||
"#define " "" 100
|
||||
"/*" "" 50
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-xpm.so"
|
||||
"xpm" 4 "gdk-pixbuf" "The XPM image format" "LGPL"
|
||||
"image/x-xpixmap" ""
|
||||
"xpm" ""
|
||||
"/* XPM */" "" 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-pnm.so"
|
||||
"pnm" 4 "gdk-pixbuf" "The PNM/PBM/PGM/PPM image format family" "LGPL"
|
||||
"image/x-portable-anymap" "image/x-portable-bitmap" "image/x-portable-graymap" "image/x-portable-pixmap" ""
|
||||
"pnm" "pbm" "pgm" "ppm" ""
|
||||
"P1" "" 100
|
||||
"P2" "" 100
|
||||
"P3" "" 100
|
||||
"P4" "" 100
|
||||
"P5" "" 100
|
||||
"P6" "" 100
|
||||
|
||||
"/storage/.kodi/addons/browser.chromium/gdk-pixbuf-modules/libpixbufloader-gif.so"
|
||||
"gif" 4 "gdk-pixbuf" "The GIF image format" "LGPL"
|
||||
"image/gif" ""
|
||||
"gif" ""
|
||||
"GIF8" "" 100
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 33 KiB |
@ -1,164 +0,0 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="chromium"
|
||||
PKG_VERSION="63.0.3239.108"
|
||||
PKG_SHA256="47d80798194da78bdd519b7ce012425b13cf89d6eb287e22a34342a245c31a2b"
|
||||
PKG_REV="108"
|
||||
PKG_ARCH="x86_64"
|
||||
PKG_LICENSE="Mixed"
|
||||
PKG_SITE="http://www.chromium.org/Home"
|
||||
PKG_URL="https://commondatastorage.googleapis.com/chromium-browser-official/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_HOST="toolchain ninja:host Python2:host"
|
||||
PKG_DEPENDS_TARGET="chromium:host node:host pciutils dbus libXcomposite libXcursor libXtst alsa-lib bzip2 yasm nss libXScrnSaver libexif libpng atk gtk+ libva-vdpau-driver unclutter xdotool"
|
||||
PKG_SECTION="browser"
|
||||
PKG_SHORTDESC="Chromium Browser: the open-source web browser from Google"
|
||||
PKG_LONGDESC="Chromium Browser ($PKG_VERSION): the open-source web browser from Google"
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="Chromium"
|
||||
PKG_ADDON_TYPE="xbmc.python.script"
|
||||
PKG_ADDON_PROVIDES="executable"
|
||||
|
||||
post_patch() {
|
||||
cd $(get_build_dir chromium)
|
||||
|
||||
# Use Python 2
|
||||
find . -name '*.py' -exec sed -i -r "s|/usr/bin/python$|$TOOLCHAIN/bin/python|g" {} +
|
||||
|
||||
# set correct widevine
|
||||
sed -i -e 's/@WIDEVINE_VERSION@/Pinkie Pie/' ./third_party/widevine/cdm/stub/widevine_cdm_version.h
|
||||
}
|
||||
|
||||
make_host() {
|
||||
./tools/gn/bootstrap/bootstrap.py --no-rebuild --no-clean --verbose
|
||||
}
|
||||
|
||||
make_target() {
|
||||
export LDFLAGS="$LDFLAGS -ludev"
|
||||
export LD=$CXX
|
||||
|
||||
# Google API keys (see http://www.chromium.org/developers/how-tos/api-keys)
|
||||
# Note: These are for OpenELEC use ONLY. For your own distribution, please
|
||||
# get your own set of keys.
|
||||
|
||||
local _google_api_key=AIzaSyAQ6L9vt9cnN4nM0weaa6Y38K4eyPvtKgI
|
||||
local _google_default_client_id=740889307901-4bkm4e0udppnp1lradko85qsbnmkfq3b.apps.googleusercontent.com
|
||||
local _google_default_client_secret=9TJlhL661hvShQub4cWhANXa
|
||||
|
||||
local _flags=(
|
||||
"host_toolchain=\"//build/toolchain/linux:x64_host\""
|
||||
'is_clang=false'
|
||||
'clang_use_chrome_plugins=false'
|
||||
'symbol_level=0'
|
||||
'is_debug=false'
|
||||
'fatal_linker_warnings=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'
|
||||
'linux_use_bundled_binutils=false'
|
||||
'use_allocator="none"'
|
||||
'use_cups=false'
|
||||
'use_custom_libcxx=false'
|
||||
'use_gconf=false'
|
||||
'use_gnome_keyring=false'
|
||||
'use_gold=false'
|
||||
'use_gtk3=false'
|
||||
'use_kerberos=false'
|
||||
'use_pulseaudio=false'
|
||||
'use_sysroot=true'
|
||||
'use_vaapi=true'
|
||||
'use_v8_context_snapshot=false'
|
||||
'enable_vulkan=false'
|
||||
"target_sysroot=\"${SYSROOT_PREFIX}\""
|
||||
'exclude_unwind_tables=true'
|
||||
'enable_hangout_services_extension=true'
|
||||
'enable_widevine=true'
|
||||
'enable_nacl=false'
|
||||
'enable_nacl_nonsfi=false'
|
||||
'enable_swiftshader=false'
|
||||
'enable_vulkan=false'
|
||||
"google_api_key=\"${_google_api_key}\""
|
||||
"google_default_client_id=\"${_google_default_client_id}\""
|
||||
"google_default_client_secret=\"${_google_default_client_secret}\""
|
||||
)
|
||||
|
||||
./third_party/libaddressinput/chromium/tools/update-strings.py
|
||||
|
||||
./out/Release/gn gen out/Release --args="${_flags[*]}" --script-executable=$TOOLCHAIN/bin/python
|
||||
mkdir -p $PKG_BUILD/third_party/node/linux/node-linux-x64/bin
|
||||
ln -fs $TOOLCHAIN/bin/node $PKG_BUILD/third_party/node/linux/node-linux-x64/bin/node
|
||||
|
||||
ninja -j${CONCURRENCY_MAKE_LEVEL} -C out/Release chrome chrome_sandbox widevinecdmadapter
|
||||
}
|
||||
|
||||
addon() {
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -P $PKG_BUILD/out/Release/chrome $ADDON_BUILD/$PKG_ADDON_ID/bin/chromium.bin
|
||||
cp -P $PKG_BUILD/out/Release/chrome_sandbox $ADDON_BUILD/$PKG_ADDON_ID/bin/chrome-sandbox
|
||||
cp -P $PKG_BUILD/out/Release/{*.pak,*.dat,*.bin,libwidevinecdmadapter.so} $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -PR $PKG_BUILD/out/Release/locales $ADDON_BUILD/$PKG_ADDON_ID/bin/
|
||||
cp -PR $PKG_BUILD/out/Release/gen/content/content_resources.pak $ADDON_BUILD/$PKG_ADDON_ID/bin/
|
||||
|
||||
# config
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/config
|
||||
cp -P $PKG_DIR/config/* $ADDON_BUILD/$PKG_ADDON_ID/config
|
||||
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
|
||||
# pango
|
||||
cp -PL $(get_build_dir pango)/.install_pkg/usr/lib/libpangocairo-1.0.so.0 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
cp -PL $(get_build_dir pango)/.install_pkg/usr/lib/libpango-1.0.so.0 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
cp -PL $(get_build_dir pango)/.install_pkg/usr/lib/libpangoft2-1.0.so.0 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
|
||||
# cairo
|
||||
cp -PL $(get_build_dir cairo)/.install_pkg/usr/lib/libcairo.so.2 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
|
||||
# gtk
|
||||
cp -PL $(get_build_dir gtk+)/.install_pkg/usr/lib/libgdk-x11-2.0.so.0 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
cp -PL $(get_build_dir gtk+)/.install_pkg/usr/lib/libgtk-x11-2.0.so.0 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
|
||||
# harfbuzz
|
||||
cp -PL $(get_build_dir harfbuzz)/.install_pkg/usr/lib/libharfbuzz.so* $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
cp -PL $(get_build_dir harfbuzz)/.install_pkg/usr/lib/libharfbuzz-icu.so* $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
|
||||
# gdk-pixbuf
|
||||
cp -PL $(get_build_dir gdk-pixbuf)/.install_pkg/usr/lib/libgdk_pixbuf-2.0.so.0 $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
|
||||
# pixbuf loaders
|
||||
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/gdk-pixbuf-modules
|
||||
cp -PL $(get_build_dir gdk-pixbuf)/.install_pkg/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders/* $ADDON_BUILD/$PKG_ADDON_ID/gdk-pixbuf-modules
|
||||
|
||||
# libexif
|
||||
cp -PL $(get_build_dir libexif)/.install_pkg/usr/lib/* $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
|
||||
# libva-vdpau-driver
|
||||
cp -PL $(get_build_dir libva-vdpau-driver)/.install_pkg/usr/lib/dri/*.so $ADDON_BUILD/$PKG_ADDON_ID/lib
|
||||
|
||||
# unclutter
|
||||
cp -P $(get_build_dir unclutter)/.install_pkg/usr/bin/unclutter $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
|
||||
# xdotool
|
||||
cp -P $(get_build_dir xdotool)/xdotool $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
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_
|
@ -1,11 +0,0 @@
|
||||
--- chromium-59.0.3071.109/./chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc.org 2017-06-26 20:32:34.907628561 +0200
|
||||
+++ chromium-59.0.3071.109/./chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc 2017-06-26 20:31:05.855206203 +0200
|
||||
@@ -99,7 +99,7 @@
|
||||
IMEDriver::Register();
|
||||
#endif
|
||||
|
||||
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+#if 0
|
||||
// On the Linux desktop, we want to prevent the user from logging in as root,
|
||||
// so that we don't destroy the profile. Now that we have some minimal ui
|
||||
// initialized, check to see if we're running as root and bail if we are.
|
@ -1,10 +0,0 @@
|
||||
--- a/sandbox/linux/suid/client/setuid_sandbox_client.cc 2015-11-13 03:04:19.000000000 -0800
|
||||
+++ b/sandbox/linux/suid/client/setuid_sandbox_client.cc 2016-01-12 22:06:26.291831672 -0800
|
||||
@@ -123,7 +123,6 @@
|
||||
|
||||
// We now consider ourselves "fully sandboxed" as far as the
|
||||
// setuid sandbox is concerned.
|
||||
- CHECK(IsFileSystemAccessDenied());
|
||||
sandboxed_ = true;
|
||||
return true;
|
||||
}
|
@ -1,722 +0,0 @@
|
||||
From 7f29b44224439377592be2b75da0b86d82d8ad6d Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Charles <daniel.charles@intel.com>
|
||||
Date: Wed, 18 Oct 2017 17:27:42 -0700
|
||||
Subject: [PATCH] Enable VAVDA, VAVEA and VAJDA on linux with VAAPI only
|
||||
|
||||
This patch contains all the changes necessary to use VA-API along with
|
||||
vaapi-driver to run all media use cases supported with hardware acceleration.
|
||||
|
||||
It is intended to remain as experimental accessible from chrome://flags on linux.
|
||||
It requires libva/intel-vaapi-driver to be installed on the system path where
|
||||
chrome is executed. Other drivers could be tested if available. Flags are
|
||||
kept independent for linux, where this feature has to be enabled before
|
||||
actually using it. This should not change how other OSes use the flags
|
||||
already, the new flags will show at the buttom on the section of unavailable
|
||||
experiments
|
||||
|
||||
The changes cover a range of compiler pre-processor flags to enable the stack.
|
||||
It moves the presandbox operations to the vaapi_wrapper class as the hook function
|
||||
is available there. vaInit will open driver on the correct installed folder.
|
||||
|
||||
chrome flags consolidtation into only two flags for linux. Mjpeg and accelerated
|
||||
video are used. The other flags are kept for ChromeOS and other OSes.
|
||||
|
||||
Developer testing was made on skylake hardware, ChromeOS and Ubuntu.
|
||||
|
||||
BUG=NONE
|
||||
TEST="subjective testing with VAVDA,VAVEA and VAJDA, autotest for encoder"
|
||||
TEST="and decoder hardware accelerated"
|
||||
TEST="have libva/intel-vaapi-driver installed and not installed in the system"
|
||||
TEST="repeat on different hardware families"
|
||||
R=posciak@chromium.org
|
||||
R=kcwu@chromium.org
|
||||
|
||||
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
|
||||
Change-Id: Ifbbf5c9e5221a8b5733fc6d4d0cf984a1f103171
|
||||
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
||||
---
|
||||
|
||||
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
||||
index 3555293..4c3115f 100644
|
||||
--- a/chrome/browser/about_flags.cc
|
||||
+++ b/chrome/browser/about_flags.cc
|
||||
@@ -1246,12 +1246,14 @@
|
||||
flag_descriptions::kUiPartialSwapDescription, kOsAll,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kUIDisablePartialSwap)},
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
+#if !defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
{"disable-webrtc-hw-decoding", flag_descriptions::kWebrtcHwDecodingName,
|
||||
flag_descriptions::kWebrtcHwDecodingDescription, kOsAndroid | kOsCrOS,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWDecoding)},
|
||||
{"disable-webrtc-hw-encoding", flag_descriptions::kWebrtcHwEncodingName,
|
||||
flag_descriptions::kWebrtcHwEncodingDescription, kOsAndroid | kOsCrOS,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableWebRtcHWEncoding)},
|
||||
+#endif
|
||||
{"enable-webrtc-hw-h264-encoding",
|
||||
flag_descriptions::kWebrtcHwH264EncodingName,
|
||||
flag_descriptions::kWebrtcHwH264EncodingDescription, kOsAndroid | kOsCrOS,
|
||||
@@ -1557,6 +1559,13 @@
|
||||
flag_descriptions::kSpuriousPowerButtonLidAngleChangeDescription, kOsCrOS,
|
||||
MULTI_VALUE_TYPE(kSpuriousPowerButtonLidAngleChangeChoices)},
|
||||
#endif // OS_CHROMEOS
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ {
|
||||
+ "enable-accelerated-video", flag_descriptions::kAcceleratedVideoName,
|
||||
+ flag_descriptions::kAcceleratedVideoDescription, kOsLinux,
|
||||
+ SINGLE_VALUE_TYPE(switches::kEnableAcceleratedVideo),
|
||||
+ },
|
||||
+#else
|
||||
{
|
||||
"disable-accelerated-video-decode",
|
||||
flag_descriptions::kAcceleratedVideoDecodeName,
|
||||
@@ -1564,6 +1573,7 @@
|
||||
kOsMac | kOsWin | kOsCrOS | kOsAndroid,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
|
||||
},
|
||||
+#endif
|
||||
{"mojo-video-encode-accelerator",
|
||||
flag_descriptions::kMojoVideoEncodeAcceleratorName,
|
||||
flag_descriptions::kMojoVideoEncodeAcceleratorDescription,
|
||||
@@ -2229,12 +2239,17 @@
|
||||
FEATURE_VALUE_TYPE(features::kWebVrVsyncAlign)},
|
||||
#endif // OS_ANDROID
|
||||
#endif // ENABLE_VR
|
||||
-#if defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ {"enable-accelerated-mjpeg-decode",
|
||||
+ flag_descriptions::kAcceleratedMjpegDecodeName,
|
||||
+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsLinux,
|
||||
+ SINGLE_VALUE_TYPE(switches::kEnableAcceleratedMjpegDecode)},
|
||||
+#elif defined(OS_CHROMEOS)
|
||||
{"disable-accelerated-mjpeg-decode",
|
||||
flag_descriptions::kAcceleratedMjpegDecodeName,
|
||||
flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
|
||||
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
|
||||
-#endif // OS_CHROMEOS
|
||||
+#endif
|
||||
{"v8-cache-options", flag_descriptions::kV8CacheOptionsName,
|
||||
flag_descriptions::kV8CacheOptionsDescription, kOsAll,
|
||||
MULTI_VALUE_TYPE(kV8CacheOptionsChoices)},
|
||||
diff --git a/chrome/browser/chromeos/login/chrome_restart_request.cc b/chrome/browser/chromeos/login/chrome_restart_request.cc
|
||||
index 3815e79..d5d3712 100644
|
||||
--- a/chrome/browser/chromeos/login/chrome_restart_request.cc
|
||||
+++ b/chrome/browser/chromeos/login/chrome_restart_request.cc
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "base/sys_info.h"
|
||||
#include "base/timer/timer.h"
|
||||
#include "base/values.h"
|
||||
+#include "build/build_config.h"
|
||||
#include "cc/base/switches.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/chromeos/boot_times_recorder.h"
|
||||
@@ -79,8 +80,13 @@
|
||||
::switches::kDisable2dCanvasImageChromium,
|
||||
::switches::kDisableAccelerated2dCanvas,
|
||||
::switches::kDisableAcceleratedJpegDecoding,
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ ::switches::kEnableAcceleratedMjpegDecode,
|
||||
+ ::switches::kEnableAcceleratedVideo,
|
||||
+#else
|
||||
::switches::kDisableAcceleratedMjpegDecode,
|
||||
::switches::kDisableAcceleratedVideoDecode,
|
||||
+#endif
|
||||
::switches::kDisableBlinkFeatures,
|
||||
::switches::kDisableCastStreamingHWEncoding,
|
||||
::switches::kDisableDistanceFieldText,
|
||||
@@ -166,7 +172,7 @@
|
||||
::switches::kDisableWebGLImageChromium,
|
||||
::switches::kEnableWebGLImageChromium,
|
||||
::switches::kEnableWebVR,
|
||||
-#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
+#if BUILDFLAG(ENABLE_WEBRTC) && (defined(OS_CHROMEOS) || defined(OS_ANDROID))
|
||||
::switches::kDisableWebRtcHWDecoding,
|
||||
::switches::kDisableWebRtcHWEncoding,
|
||||
#endif
|
||||
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
||||
index 74e6bc7..ab184a5 100644
|
||||
--- a/chrome/browser/flag_descriptions.cc
|
||||
+++ b/chrome/browser/flag_descriptions.cc
|
||||
@@ -14,6 +14,13 @@
|
||||
"Enables the use of the GPU to perform 2d canvas rendering instead of "
|
||||
"using software rendering.";
|
||||
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+const char kAcceleratedVideoName[] = "Hardware-accelerated video";
|
||||
+const char kAcceleratedVideoDescription[] =
|
||||
+ "Hardware-accelerated video where VA-API driver is installed on the"
|
||||
+ "system.";
|
||||
+#endif
|
||||
+
|
||||
const char kAcceleratedVideoDecodeName[] = "Hardware-accelerated video decode";
|
||||
const char kAcceleratedVideoDecodeDescription[] =
|
||||
"Hardware-accelerated video decode where available.";
|
||||
@@ -1478,6 +1485,7 @@
|
||||
const char kWebrtcEchoCanceller3Description[] =
|
||||
"Experimental WebRTC echo canceller (AEC3).";
|
||||
|
||||
+#if !defined(OS_LINUX) || !defined(OS_CHROMEOS)
|
||||
const char kWebrtcHwDecodingName[] = "WebRTC hardware video decoding";
|
||||
const char kWebrtcHwDecodingDescription[] =
|
||||
"Support in WebRTC for decoding video streams using platform hardware.";
|
||||
@@ -1485,6 +1493,7 @@
|
||||
const char kWebrtcHwEncodingName[] = "WebRTC hardware video encoding";
|
||||
const char kWebrtcHwEncodingDescription[] =
|
||||
"Support in WebRTC for encoding video streams using platform hardware.";
|
||||
+#endif
|
||||
|
||||
const char kWebrtcHwH264EncodingName[] = "WebRTC hardware h264 video encoding";
|
||||
const char kWebrtcHwH264EncodingDescription[] =
|
||||
@@ -2283,14 +2292,16 @@
|
||||
|
||||
// Chrome OS -------------------------------------------------------------------
|
||||
|
||||
-#if defined(OS_CHROMEOS)
|
||||
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
||||
|
||||
const char kAcceleratedMjpegDecodeName[] =
|
||||
"Hardware-accelerated mjpeg decode for captured frame";
|
||||
const char kAcceleratedMjpegDecodeDescription[] =
|
||||
"Enable hardware-accelerated mjpeg decode for captured frame where "
|
||||
"available.";
|
||||
+#endif
|
||||
|
||||
+#if defined(OS_CHROMEOS)
|
||||
const char kAllowTouchpadThreeFingerClickName[] = "Touchpad three-finger-click";
|
||||
const char kAllowTouchpadThreeFingerClickDescription[] =
|
||||
"Enables touchpad three-finger-click as middle button.";
|
||||
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
||||
index 54a4950..5ace5e0 100644
|
||||
--- a/chrome/browser/flag_descriptions.h
|
||||
+++ b/chrome/browser/flag_descriptions.h
|
||||
@@ -37,6 +37,10 @@
|
||||
extern const char kAccelerated2dCanvasName[];
|
||||
extern const char kAccelerated2dCanvasDescription[];
|
||||
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+extern const char kAcceleratedVideoName[];
|
||||
+extern const char kAcceleratedVideoDescription[];
|
||||
+#endif
|
||||
extern const char kAcceleratedVideoDecodeName[];
|
||||
extern const char kAcceleratedVideoDecodeDescription[];
|
||||
|
||||
@@ -1401,13 +1405,17 @@
|
||||
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
-// Chrome OS ------------------------------------------------------------------
|
||||
-
|
||||
-#if defined(OS_CHROMEOS)
|
||||
+#if defined(OS_CHROMEOS) || (defined(OS_LINUX) && !defined(OS_ANDROID))
|
||||
|
||||
extern const char kAcceleratedMjpegDecodeName[];
|
||||
extern const char kAcceleratedMjpegDecodeDescription[];
|
||||
|
||||
+#endif
|
||||
+
|
||||
+// Chrome OS ------------------------------------------------------------------
|
||||
+
|
||||
+#if defined(OS_CHROMEOS)
|
||||
+
|
||||
extern const char kAllowTouchpadThreeFingerClickName[];
|
||||
extern const char kAllowTouchpadThreeFingerClickDescription[];
|
||||
|
||||
diff --git a/content/browser/gpu/compositor_util.cc b/content/browser/gpu/compositor_util.cc
|
||||
index 122282d..bc102a3 100644
|
||||
--- a/content/browser/gpu/compositor_util.cc
|
||||
+++ b/content/browser/gpu/compositor_util.cc
|
||||
@@ -105,7 +105,11 @@
|
||||
{"video_decode",
|
||||
manager->IsFeatureBlacklisted(
|
||||
gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE),
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
|
||||
+#else
|
||||
command_line.HasSwitch(switches::kDisableAcceleratedVideoDecode),
|
||||
+#endif
|
||||
"Accelerated video decode has been disabled, either via blacklist,"
|
||||
" about:flags or the command line.",
|
||||
true},
|
||||
@@ -113,7 +117,11 @@
|
||||
{"video_encode",
|
||||
manager->IsFeatureBlacklisted(
|
||||
gpu::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_ENCODE),
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ !command_line.HasSwitch(switches::kEnableAcceleratedVideo),
|
||||
+#else
|
||||
command_line.HasSwitch(switches::kDisableWebRtcHWEncoding),
|
||||
+#endif
|
||||
"Accelerated video encode has been disabled, either via blacklist,"
|
||||
" about:flags or the command line.",
|
||||
true},
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
index 51aa672..963da85 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
@@ -717,7 +717,11 @@
|
||||
DCHECK(command_line);
|
||||
|
||||
if (ShouldDisableAcceleratedVideoDecode(command_line))
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ command_line->AppendSwitch(switches::kEnableAcceleratedVideo);
|
||||
+#else
|
||||
command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
|
||||
+#endif
|
||||
|
||||
#if defined(USE_AURA)
|
||||
if (!CanUseGpuBrowserCompositor())
|
||||
@@ -748,7 +752,11 @@
|
||||
}
|
||||
|
||||
if (ShouldDisableAcceleratedVideoDecode(command_line)) {
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ command_line->AppendSwitch(switches::kEnableAcceleratedVideo);
|
||||
+#else
|
||||
command_line->AppendSwitch(switches::kDisableAcceleratedVideoDecode);
|
||||
+#endif
|
||||
}
|
||||
|
||||
#if defined(USE_OZONE)
|
||||
@@ -826,7 +834,12 @@
|
||||
const base::CommandLine* command_line =
|
||||
base::CommandLine::ForCurrentProcess();
|
||||
if (!ShouldDisableAcceleratedVideoDecode(command_line) &&
|
||||
- !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) {
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ command_line->HasSwitch(switches::kEnableAcceleratedVideo)
|
||||
+#else
|
||||
+ !command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)
|
||||
+#endif
|
||||
+ ) {
|
||||
prefs->pepper_accelerated_video_decode_enabled = true;
|
||||
}
|
||||
}
|
||||
@@ -1016,7 +1029,13 @@
|
||||
// to resolve crbug/442039 has been collected.
|
||||
const std::string group_name = base::FieldTrialList::FindFullName(
|
||||
"DisableAcceleratedVideoDecode");
|
||||
- if (command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) {
|
||||
+ if (
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ !command_line->HasSwitch(switches::kEnableAcceleratedVideo)
|
||||
+#else
|
||||
+ command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)
|
||||
+#endif
|
||||
+ ) {
|
||||
// It was already disabled on the command line.
|
||||
return false;
|
||||
}
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index 95d4dff..9b26d3f 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -111,7 +111,11 @@
|
||||
|
||||
// Command-line switches to propagate to the GPU process.
|
||||
static const char* const kSwitchNames[] = {
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ switches::kEnableAcceleratedVideo,
|
||||
+#else
|
||||
switches::kDisableAcceleratedVideoDecode,
|
||||
+#endif
|
||||
switches::kDisableBreakpad,
|
||||
switches::kDisableGpuRasterization,
|
||||
switches::kDisableGpuSandbox,
|
||||
@@ -120,7 +124,7 @@
|
||||
switches::kDisableLogging,
|
||||
switches::kDisableSeccompFilterSandbox,
|
||||
switches::kDisableShaderNameHashing,
|
||||
-#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
+#if BUILDFLAG(ENABLE_WEBRTC) && !defined(OS_LINUX)
|
||||
switches::kDisableWebRtcHWEncoding,
|
||||
#endif
|
||||
#if defined(OS_WIN)
|
||||
diff --git a/content/browser/renderer_host/media/video_capture_browsertest.cc b/content/browser/renderer_host/media/video_capture_browsertest.cc
|
||||
index 8ca0ad0..8c489d0 100644
|
||||
--- a/content/browser/renderer_host/media/video_capture_browsertest.cc
|
||||
+++ b/content/browser/renderer_host/media/video_capture_browsertest.cc
|
||||
@@ -155,8 +155,13 @@
|
||||
base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||
switches::kUseFakeJpegDecodeAccelerator);
|
||||
} else {
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||
+ switches::kEnableAcceleratedMjpegDecode);
|
||||
+#else
|
||||
base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||
switches::kDisableAcceleratedMjpegDecode);
|
||||
+#endif
|
||||
}
|
||||
if (params_.use_mojo_service) {
|
||||
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
|
||||
diff --git a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
|
||||
index 34afec23..ad77490 100644
|
||||
--- a/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
|
||||
+++ b/content/browser/renderer_host/media/video_capture_gpu_jpeg_decoder.cc
|
||||
@@ -56,15 +56,21 @@
|
||||
bool is_platform_supported =
|
||||
base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kUseFakeJpegDecodeAccelerator);
|
||||
-#if defined(OS_CHROMEOS)
|
||||
- // Non-ChromeOS platforms do not support HW JPEG decode now. Do not establish
|
||||
- // gpu channel to avoid introducing overhead.
|
||||
+#if !defined(OS_ANDROID) && defined(OS_LINUX)
|
||||
+ // Non-ChromeOS or Non-Linux platforms do not support HW JPEG decode now. Do
|
||||
+ // not establish gpu channel to avoid introducing overhead.
|
||||
is_platform_supported = true;
|
||||
#endif
|
||||
|
||||
if (!is_platform_supported ||
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+ !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
+ switches::kEnableAcceleratedMjpegDecode)
|
||||
+#else
|
||||
base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
- switches::kDisableAcceleratedMjpegDecode)) {
|
||||
+ switches::kDisableAcceleratedMjpegDecode)
|
||||
+#endif
|
||||
+ ) {
|
||||
decoder_status_ = FAILED;
|
||||
RecordInitDecodeUMA_Locked();
|
||||
return;
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index fbe4d21..1be295e 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2506,7 +2506,11 @@
|
||||
switches::kDefaultTileHeight,
|
||||
switches::kDisable2dCanvasImageChromium,
|
||||
switches::kDisableAcceleratedJpegDecoding,
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+ switches::kEnableAcceleratedVideo,
|
||||
+#else
|
||||
switches::kDisableAcceleratedVideoDecode,
|
||||
+#endif
|
||||
switches::kDisableBackgroundTimerThrottling,
|
||||
switches::kDisableBreakpad,
|
||||
switches::kDisableBrowserSideNavigation,
|
||||
@@ -2660,8 +2664,10 @@
|
||||
switches::kDisableMojoRenderer,
|
||||
#endif
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
+#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
|
||||
switches::kDisableWebRtcHWDecoding,
|
||||
switches::kDisableWebRtcHWEncoding,
|
||||
+#endif
|
||||
switches::kEnableWebRtcSrtpAesGcm,
|
||||
switches::kEnableWebRtcSrtpEncryptedHeaders,
|
||||
switches::kEnableWebRtcStunOrigin,
|
||||
diff --git a/content/browser/webrtc/webrtc_media_recorder_browsertest.cc b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
|
||||
index 3d815a2..2c96048 100644
|
||||
--- a/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
|
||||
+++ b/content/browser/webrtc/webrtc_media_recorder_browsertest.cc
|
||||
@@ -58,7 +58,12 @@
|
||||
return;
|
||||
// This flag is also used for encoding, https://crbug.com/616640.
|
||||
base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||
- switches::kDisableAcceleratedVideoDecode);
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+ switches::kEnableAcceleratedVideo
|
||||
+#else
|
||||
+ switches::kDisableAcceleratedVideoDecode
|
||||
+#endif
|
||||
+ );
|
||||
}
|
||||
|
||||
private:
|
||||
diff --git a/content/gpu/BUILD.gn b/content/gpu/BUILD.gn
|
||||
index a5424bb..b68b802 100644
|
||||
--- a/content/gpu/BUILD.gn
|
||||
+++ b/content/gpu/BUILD.gn
|
||||
@@ -45,7 +45,6 @@
|
||||
]
|
||||
|
||||
configs += [ "//content:content_implementation" ]
|
||||
-
|
||||
deps = [
|
||||
"//base",
|
||||
"//base/third_party/dynamic_annotations",
|
||||
@@ -114,4 +113,8 @@
|
||||
if (enable_vulkan) {
|
||||
deps += [ "//gpu/vulkan" ]
|
||||
}
|
||||
+
|
||||
+ if (is_desktop_linux) {
|
||||
+ public_configs = [ "//media/gpu:libva_config" ]
|
||||
+ }
|
||||
}
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index 556cf00..730f4ae 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -254,7 +254,7 @@
|
||||
// Initializes StatisticsRecorder which tracks UMA histograms.
|
||||
base::StatisticsRecorder::Initialize();
|
||||
|
||||
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX)
|
||||
// Set thread priority before sandbox initialization.
|
||||
base::PlatformThread::SetCurrentThreadPriority(base::ThreadPriority::DISPLAY);
|
||||
#endif
|
||||
@@ -283,7 +283,7 @@
|
||||
GetContentClient()->SetGpuInfo(gpu_init->gpu_info());
|
||||
|
||||
base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL;
|
||||
-#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
|
||||
+#if defined(OS_LINUX)
|
||||
io_thread_priority = base::ThreadPriority::DISPLAY;
|
||||
#endif
|
||||
|
||||
diff --git a/content/public/browser/gpu_utils.cc b/content/public/browser/gpu_utils.cc
|
||||
index 6aafb06..d4ddd8d 100644
|
||||
--- a/content/public/browser/gpu_utils.cc
|
||||
+++ b/content/public/browser/gpu_utils.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "base/command_line.h"
|
||||
#include "base/single_thread_task_runner.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
+#include "build/build_config.h"
|
||||
#include "content/browser/gpu/gpu_process_host.h"
|
||||
#include "content/public/common/content_features.h"
|
||||
#include "content/public/common/content_switches.h"
|
||||
@@ -57,12 +58,19 @@
|
||||
gpu_preferences.ui_prioritize_in_gpu_process =
|
||||
command_line->HasSwitch(switches::kUIPrioritizeInGpuProcess);
|
||||
gpu_preferences.disable_accelerated_video_decode =
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+ !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
|
||||
+#else
|
||||
command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
|
||||
-#if defined(OS_CHROMEOS)
|
||||
+#endif
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+ gpu_preferences.disable_vaapi_accelerated_video_encode =
|
||||
+ !command_line->HasSwitch(switches::kEnableAcceleratedVideo);
|
||||
+#elif defined(OS_CHROMEOS)
|
||||
gpu_preferences.disable_vaapi_accelerated_video_encode =
|
||||
command_line->HasSwitch(switches::kDisableVaapiAcceleratedVideoEncode);
|
||||
#endif
|
||||
-#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
+#if BUILDFLAG(ENABLE_WEBRTC) && (!defined(OS_LINUX) || defined(OS_CHROMEOS))
|
||||
gpu_preferences.disable_web_rtc_hw_encoding =
|
||||
command_line->HasSwitch(switches::kDisableWebRtcHWEncoding);
|
||||
#endif
|
||||
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
|
||||
index 4e699d1..3a7a2b7 100644
|
||||
--- a/content/public/common/content_switches.cc
|
||||
+++ b/content/public/common/content_switches.cc
|
||||
@@ -89,12 +89,21 @@
|
||||
|
||||
// Disable gpu-accelerated 2d canvas.
|
||||
const char kDisableAccelerated2dCanvas[] = "disable-accelerated-2d-canvas";
|
||||
-
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+// Enable hardware accelerated mjpeg decode on linux
|
||||
+const char kEnableAcceleratedMjpegDecode[] = "enable-accelerated-mjpeg-decode";
|
||||
+#else
|
||||
// Disable hardware acceleration of mjpeg decode for captured frame, where
|
||||
// available.
|
||||
const char kDisableAcceleratedMjpegDecode[] =
|
||||
"disable-accelerated-mjpeg-decode";
|
||||
+#endif
|
||||
|
||||
+#if defined(OS_LINUX)
|
||||
+// Enables hardware acceleration of video for Linux only. VA-API driver
|
||||
+// is required to be present on the system installation.
|
||||
+const char kEnableAcceleratedVideo[] = "enable-accelerated-video";
|
||||
+#endif
|
||||
// Disables hardware acceleration of video decode, where available.
|
||||
const char kDisableAcceleratedVideoDecode[] =
|
||||
"disable-accelerated-video-decode";
|
||||
@@ -932,11 +941,13 @@
|
||||
// ignores this switch on its stable and beta channels.
|
||||
const char kDisableWebRtcEncryption[] = "disable-webrtc-encryption";
|
||||
|
||||
+#if defined(OS_CHROMEOS)
|
||||
// Disables HW decode acceleration for WebRTC.
|
||||
const char kDisableWebRtcHWDecoding[] = "disable-webrtc-hw-decoding";
|
||||
|
||||
// Disables HW encode acceleration for WebRTC.
|
||||
const char kDisableWebRtcHWEncoding[] = "disable-webrtc-hw-encoding";
|
||||
+#endif
|
||||
|
||||
// Enables negotiation of GCM cipher suites from RFC 7714 for SRTP in WebRTC.
|
||||
// See https://tools.ietf.org/html/rfc7714 for further information.
|
||||
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
|
||||
index 2704924..67d00bb 100644
|
||||
--- a/content/public/common/content_switches.h
|
||||
+++ b/content/public/common/content_switches.h
|
||||
@@ -35,7 +35,11 @@
|
||||
CONTENT_EXPORT extern const char kDisable3DAPIs[];
|
||||
CONTENT_EXPORT extern const char kDisableAccelerated2dCanvas[];
|
||||
CONTENT_EXPORT extern const char kDisableAcceleratedJpegDecoding[];
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+CONTENT_EXPORT extern const char kEnableAcceleratedMjpegDecode[];
|
||||
+#else
|
||||
CONTENT_EXPORT extern const char kDisableAcceleratedMjpegDecode[];
|
||||
+#endif
|
||||
CONTENT_EXPORT extern const char kDisableAcceleratedVideoDecode[];
|
||||
CONTENT_EXPORT extern const char kDisableAudioSupportForDesktopShare[];
|
||||
extern const char kDisableBackingStoreLimit[];
|
||||
@@ -109,6 +113,9 @@
|
||||
CONTENT_EXPORT extern const char kDomAutomationController[];
|
||||
extern const char kDisable2dCanvasClipAntialiasing[];
|
||||
CONTENT_EXPORT extern const char kDumpBlinkRuntimeCallStats[];
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
|
||||
+CONTENT_EXPORT extern const char kEnableAcceleratedVideo[];
|
||||
+#endif
|
||||
CONTENT_EXPORT extern const char kEnableAggressiveDOMStorageFlushing[];
|
||||
CONTENT_EXPORT extern const char kEnableAutomation[];
|
||||
CONTENT_EXPORT extern const char kEnablePreferCompositingToLCDText[];
|
||||
@@ -256,8 +263,10 @@
|
||||
|
||||
#if BUILDFLAG(ENABLE_WEBRTC)
|
||||
CONTENT_EXPORT extern const char kDisableWebRtcEncryption[];
|
||||
+#if defined(OS_CHROMEOS)
|
||||
CONTENT_EXPORT extern const char kDisableWebRtcHWDecoding[];
|
||||
CONTENT_EXPORT extern const char kDisableWebRtcHWEncoding[];
|
||||
+#endif
|
||||
CONTENT_EXPORT extern const char kEnableWebRtcSrtpAesGcm[];
|
||||
CONTENT_EXPORT extern const char kEnableWebRtcSrtpEncryptedHeaders[];
|
||||
CONTENT_EXPORT extern const char kEnableWebRtcStunOrigin[];
|
||||
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
||||
index 017056c..825bdce 100644
|
||||
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
||||
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
||||
@@ -239,10 +239,19 @@
|
||||
|
||||
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
|
||||
if (gpu_factories && gpu_factories->IsGpuVideoAcceleratorEnabled()) {
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+ if (cmd_line->HasSwitch(switches::kEnableAcceleratedVideo))
|
||||
+#else
|
||||
if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding))
|
||||
+#endif
|
||||
decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories));
|
||||
|
||||
- if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) {
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+ if (cmd_line->HasSwitch(switches::kEnableAcceleratedVideo))
|
||||
+#else
|
||||
+ if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
|
||||
+#endif
|
||||
+ {
|
||||
encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories));
|
||||
}
|
||||
}
|
||||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index dc01117..2f9ee03 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1456,7 +1456,11 @@
|
||||
scoped_refptr<base::SingleThreadTaskRunner> media_task_runner =
|
||||
GetMediaThreadTaskRunner();
|
||||
const bool enable_video_accelerator =
|
||||
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
|
||||
+ cmd_line->HasSwitch(switches::kEnableAcceleratedVideo);
|
||||
+#else
|
||||
!cmd_line->HasSwitch(switches::kDisableAcceleratedVideoDecode);
|
||||
+#endif
|
||||
const bool enable_gpu_memory_buffer_video_frames =
|
||||
#if defined(OS_MACOSX) || defined(OS_LINUX)
|
||||
!cmd_line->HasSwitch(switches::kDisableGpuMemoryBufferVideoFrames) &&
|
||||
diff --git a/gpu/command_buffer/service/gpu_preferences.h b/gpu/command_buffer/service/gpu_preferences.h
|
||||
index b37c2cc..a721eb7 100644
|
||||
--- a/gpu/command_buffer/service/gpu_preferences.h
|
||||
+++ b/gpu/command_buffer/service/gpu_preferences.h
|
||||
@@ -50,7 +50,7 @@
|
||||
// Disables hardware acceleration of video decode, where available.
|
||||
bool disable_accelerated_video_decode = false;
|
||||
|
||||
-#if defined(OS_CHROMEOS)
|
||||
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
|
||||
// Disables VA-API accelerated video encode.
|
||||
bool disable_vaapi_accelerated_video_encode = false;
|
||||
#endif
|
||||
diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json
|
||||
index 1289a55..22e11e5 100644
|
||||
--- a/gpu/config/software_rendering_list.json
|
||||
+++ b/gpu/config/software_rendering_list.json
|
||||
@@ -374,17 +374,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
- "id": 48,
|
||||
- "description": "Accelerated video decode is unavailable on Linux",
|
||||
- "cr_bugs": [137247],
|
||||
- "os": {
|
||||
- "type": "linux"
|
||||
- },
|
||||
- "features": [
|
||||
- "accelerated_video_decode"
|
||||
- ]
|
||||
- },
|
||||
- {
|
||||
"id": 50,
|
||||
"description": "Disable VMware software renderer on older Mesa",
|
||||
"cr_bugs": [145531, 332596, 571899, 629434],
|
||||
diff --git a/media/filters/BUILD.gn b/media/filters/BUILD.gn
|
||||
index 490722c..1cda2fb 100644
|
||||
--- a/media/filters/BUILD.gn
|
||||
+++ b/media/filters/BUILD.gn
|
||||
@@ -189,7 +189,7 @@
|
||||
deps += [ "//media/base/android" ]
|
||||
}
|
||||
|
||||
- if (current_cpu != "arm" && is_chromeos) {
|
||||
+ if (current_cpu != "arm" && (is_chromeos || is_desktop_linux)) {
|
||||
sources += [
|
||||
"h264_bitstream_buffer.cc",
|
||||
"h264_bitstream_buffer.h",
|
||||
diff --git a/media/gpu/BUILD.gn b/media/gpu/BUILD.gn
|
||||
index 729c6fa..4878251 100644
|
||||
--- a/media/gpu/BUILD.gn
|
||||
+++ b/media/gpu/BUILD.gn
|
||||
@@ -24,6 +24,14 @@
|
||||
import("//build/config/mac/mac_sdk.gni")
|
||||
}
|
||||
|
||||
+if (is_desktop_linux && use_vaapi) {
|
||||
+ import("//build/config/linux/pkg_config.gni")
|
||||
+
|
||||
+ pkg_config("libva_config") {
|
||||
+ packages = [ "libva" ]
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
if (use_vaapi) {
|
||||
action("libva_generate_stubs") {
|
||||
extra_header = "va_stub_header.fragment"
|
||||
@@ -334,6 +342,9 @@
|
||||
"vaapi_drm_picture.h",
|
||||
]
|
||||
}
|
||||
+ if (is_desktop_linux) {
|
||||
+ public_configs = [ ":libva_config" ]
|
||||
+ }
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/media/gpu/gpu_video_decode_accelerator_factory.cc b/media/gpu/gpu_video_decode_accelerator_factory.cc
|
||||
index 2cee490..de02414 100644
|
||||
--- a/media/gpu/gpu_video_decode_accelerator_factory.cc
|
||||
+++ b/media/gpu/gpu_video_decode_accelerator_factory.cc
|
||||
@@ -87,6 +87,7 @@
|
||||
// profile (instead of calculating a superset).
|
||||
// TODO(posciak,henryhsu): improve this so that we choose a superset of
|
||||
// resolutions and other supported profile parameters.
|
||||
+ DVLOG(1) << "Get Supported profiles";
|
||||
#if defined(OS_WIN)
|
||||
capabilities.supported_profiles =
|
||||
DXVAVideoDecodeAccelerator::GetSupportedProfiles(gpu_preferences,
|
||||
diff --git a/media/gpu/vaapi_wrapper.cc b/media/gpu/vaapi_wrapper.cc
|
||||
index 1e72893..6495642 100644
|
||||
--- a/media/gpu/vaapi_wrapper.cc
|
||||
+++ b/media/gpu/vaapi_wrapper.cc
|
||||
@@ -1117,6 +1117,7 @@
|
||||
if (drm_file.IsValid())
|
||||
GetDisplayState()->SetDrmFd(drm_file.GetPlatformFile());
|
||||
#endif
|
||||
+ GetProfileInfos(); // dlopen all necessary libraries
|
||||
}
|
||||
|
||||
// static
|
@ -1,48 +0,0 @@
|
||||
--- a/build/toolchain/linux/BUILD.gn 2017-08-30 14:08:06.342205027 +0200
|
||||
+++ b/build/toolchain/linux/BUILD.gn 2017-08-30 14:15:18.648503216 +0200
|
||||
@@ -129,12 +129,13 @@
|
||||
}
|
||||
|
||||
gcc_toolchain("x64") {
|
||||
- cc = "gcc"
|
||||
- cxx = "g++"
|
||||
+ toolchainprefix = "x86_64-libreelec-linux-gnu-"
|
||||
+ cc = "${toolchainprefix}gcc"
|
||||
+ cxx = "${toolchainprefix}g++"
|
||||
|
||||
- readelf = "readelf"
|
||||
- nm = "nm"
|
||||
- ar = "ar"
|
||||
+ readelf = "${toolchainprefix}readelf"
|
||||
+ nm = "${toolchainprefix}nm"
|
||||
+ ar = "${toolchainprefix}ar"
|
||||
ld = cxx
|
||||
|
||||
# Output linker map files for binary size analysis.
|
||||
@@ -147,6 +148,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
+gcc_toolchain("x64_host") {
|
||||
+ toolchainprefix = "host-"
|
||||
+ cc = "${toolchainprefix}gcc"
|
||||
+ cxx = "${toolchainprefix}g++"
|
||||
+
|
||||
+ readelf = "readelf"
|
||||
+ nm = "nm"
|
||||
+ ar = "ar"
|
||||
+ ld = cxx
|
||||
+
|
||||
+ # Output linker map files for binary size analysis.
|
||||
+ enable_linker_map = true
|
||||
+
|
||||
+ toolchain_args = {
|
||||
+ current_cpu = "x64"
|
||||
+ current_os = "linux"
|
||||
+ is_clang = false
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
clang_toolchain("clang_mipsel") {
|
||||
toolchain_args = {
|
||||
current_cpu = "mipsel"
|
@ -1,44 +0,0 @@
|
||||
From 1fc37227522ccd314f82ec893ed15c6129296604 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Jensen <pauljensen@chromium.org>
|
||||
Date: Wed, 11 Oct 2017 08:37:34 -0400
|
||||
Subject: [PATCH] Move exclude_unwind_tables back into declare_args
|
||||
|
||||
There is desire to adjust this flag manually.
|
||||
|
||||
BUG=762629
|
||||
R=thakis@chromium.org
|
||||
|
||||
Change-Id: I3bd134c19270cd1f729b3ea078674e734493d4ab
|
||||
---
|
||||
|
||||
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
|
||||
index ad40fd9..50e19a4 100644
|
||||
--- a/build/config/compiler/compiler.gni
|
||||
+++ b/build/config/compiler/compiler.gni
|
||||
@@ -68,18 +68,18 @@
|
||||
|
||||
# Whether or not we should use position independent code.
|
||||
use_pic = true
|
||||
+
|
||||
+ # Exclude unwind tables for official builds as unwinding can be done from
|
||||
+ # stack dumps produced by Crashpad at a later time "offline" in the crash
|
||||
+ # server. For unofficial (e.g. development) builds and non-Chrome branded
|
||||
+ # (e.g. Cronet which doesn't use Crashpad, crbug.com/479283) builds it's
|
||||
+ # useful to be able to unwind at runtime.
|
||||
+ exclude_unwind_tables = (is_chrome_branded && is_official_build) ||
|
||||
+ (is_chromecast && !is_cast_desktop_build && !is_debug)
|
||||
}
|
||||
|
||||
assert(!is_cfi || use_thin_lto, "CFI requires ThinLTO")
|
||||
|
||||
-# Exclude unwind tables for official builds as unwinding can be done from stack
|
||||
-# dumps produced by Crashpad at a later time "offline" in the crash server.
|
||||
-# For unofficial (e.g. development) builds and non-Chrome branded (e.g. Cronet
|
||||
-# which doesn't use Crashpad, crbug.com/479283) builds it's useful to be able
|
||||
-# to unwind at runtime.
|
||||
-exclude_unwind_tables = (is_chrome_branded && is_official_build) ||
|
||||
- (is_chromecast && !is_cast_desktop_build && !is_debug)
|
||||
-
|
||||
# If true, optimize for size. Does not affect windows builds.
|
||||
# Linux & Mac favor speed over size.
|
||||
# TODO(brettw) it's weird that Mac and desktop Linux are different. We should
|
@ -1,12 +0,0 @@
|
||||
diff -Naur a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
|
||||
--- a/tools/gn/bootstrap/bootstrap.py 2017-08-10 17:18:53.767165155 +0200
|
||||
+++ b/tools/gn/bootstrap/bootstrap.py 2017-08-10 17:23:28.668750638 +0200
|
||||
@@ -657,7 +657,7 @@
|
||||
'base/allocator/allocator_shim.cc',
|
||||
'base/allocator/allocator_shim_default_dispatch_to_glibc.cc',
|
||||
])
|
||||
- libs.extend(['-lrt', '-latomic'])
|
||||
+ libs.extend(['-lrt'])
|
||||
static_libraries['libevent']['include_dirs'].extend([
|
||||
os.path.join(SRC_ROOT, 'base', 'third_party', 'libevent', 'linux')
|
||||
])
|
@ -1,10 +0,0 @@
|
||||
--- chromium-63.0.3239.84//third_party/webrtc/p2p/base/port.cc.org 2017-12-09 01:53:55.490672425 +0100
|
||||
+++ chromium-63.0.3239.84//third_party/webrtc/p2p/base/port.cc 2017-12-09 01:54:10.826751406 +0100
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
+#include <cmath>
|
||||
|
||||
#include "p2p/base/common.h"
|
||||
#include "p2p/base/portallocator.h"
|
@ -1,10 +0,0 @@
|
||||
--- a/chrome/browser/ui/libgtkui/gtk_ui.h 2017-10-19 00:15:47.451704332 +0200
|
||||
+++ b/chrome/browser/ui/libgtkui/gtk_ui.h 2017-10-18 23:53:19.328373980 +0200
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "base/observer_list.h"
|
||||
#include "chrome/browser/ui/libgtkui/gtk_signal.h"
|
||||
#include "chrome/browser/ui/libgtkui/libgtkui_export.h"
|
||||
+#include "chrome/browser/ui/libgtkui/nav_button_layout_manager.h"
|
||||
#include "ui/gfx/color_utils.h"
|
||||
#include "ui/views/linux_ui/linux_ui.h"
|
||||
#include "ui/views/window/frame_buttons.h"
|
@ -1,16 +0,0 @@
|
||||
Source: https://aur.archlinux.org/packages/chromium-vaapi/ chromium-gcc-r1.patch
|
||||
|
||||
diff --git a/base/numerics/safe_math_shared_impl.h b/base/numerics/safe_math_shared_impl.h
|
||||
index 99f230ce7e9a..de2415d402f5 100644
|
||||
--- a/base/numerics/safe_math_shared_impl.h
|
||||
+++ b/base/numerics/safe_math_shared_impl.h
|
||||
@@ -21,8 +21,7 @@
|
||||
#if !defined(__native_client__) && \
|
||||
((defined(__clang__) && \
|
||||
((__clang_major__ > 3) || \
|
||||
- (__clang_major__ == 3 && __clang_minor__ >= 4))) || \
|
||||
- (defined(__GNUC__) && __GNUC__ >= 5))
|
||||
+ (__clang_major__ == 3 && __clang_minor__ >= 4))))
|
||||
#include "base/numerics/safe_math_clang_gcc_impl.h"
|
||||
#define BASE_HAS_OPTIMIZED_SAFE_MATH (1)
|
||||
#else
|
@ -1,106 +0,0 @@
|
||||
#!/bin/sh
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# OpenELEC is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# OpenELEC is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
. /etc/profile
|
||||
oe_setup_addon browser.chromium
|
||||
if [ -e $ADDON_HOME/env ]
|
||||
then
|
||||
. $ADDON_HOME/env
|
||||
fi
|
||||
|
||||
# drop profile for testing only
|
||||
#rm -rf /storage/.kodi/userdata/addon_data/browser.chromium/profile
|
||||
|
||||
# fix file permissons (zip packaging)
|
||||
chmod +x $ADDON_DIR/bin/chromium $ADDON_DIR/bin/chromium.bin
|
||||
chmod 4755 $ADDON_DIR/bin/chrome-sandbox
|
||||
|
||||
# make sure we use "own" gtk/pango/nss/etc
|
||||
export LD_LIBRARY_PATH=$ADDON_DIR/lib
|
||||
|
||||
# configure pango/pixbuf
|
||||
export PANGO_RC_FILE=$ADDON_DIR/config/pangorc
|
||||
export GDK_PIXBUF_MODULE_FILE=$ADDON_DIR/config/pixbuf.loaders.cache
|
||||
|
||||
# font rendering in gtk widgets is brokeen with nvidia blob. use our Xdefaults
|
||||
export XENVIRONMENT=$ADDON_DIR/config/Xdefaults
|
||||
|
||||
# start unclutter
|
||||
if [ "$HIDE_CURSOR" == "true" ]
|
||||
then
|
||||
unclutter &
|
||||
UNCLUTTER_PID=$!
|
||||
fi
|
||||
|
||||
# vaapi
|
||||
LIBVA_DRIVERS_PATH="/usr/lib/dri:$ADDON_DIR/lib"
|
||||
LIBVA_DRIVER_NAME=''
|
||||
case $VAAPI_MODE in
|
||||
'intel')
|
||||
LIBVA_DRIVER_NAME='i965'
|
||||
CHROMIUM_OPTS="$CHROMIUM_OPTS --enable-accelerated-video"
|
||||
;;
|
||||
'amd')
|
||||
LIBVA_DRIVER_NAME='vdpau'
|
||||
CHROMIUM_OPTS="$CHROMIUM_OPTS --enable-accelerated-video"
|
||||
;;
|
||||
'nvidia')
|
||||
LIBVA_DRIVER_NAME='vdpau'
|
||||
CHROMIUM_OPTS="$CHROMIUM_OPTS --enable-accelerated-video --allow-no-sandbox-job --disable-gpu-sandbox"
|
||||
;;
|
||||
*)
|
||||
LIBGL_ALWAYS_SOFTWARE='1'
|
||||
export LIBGL_ALWAYS_SOFTWARE
|
||||
esac
|
||||
export LIBVA_DRIVER_NAME LIBVA_DRIVERS_PATH
|
||||
|
||||
# windowed
|
||||
case $WINDOW_MODE in
|
||||
'maximized') CHROMIUM_OPTS="$CHROMIUM_OPTS --start-maximized";;
|
||||
'kiosk') CHROMIUM_OPTS="$CHROMIUM_OPTS --kiosk";;
|
||||
esac
|
||||
|
||||
# rasterization
|
||||
case $RASTER_MODE in
|
||||
'off') CHROMIUM_OPTS="$CHROMIUM_OPTS --disable-accelerated-2d-canvas --disable-gpu-compositing";;
|
||||
'force') CHROMIUM_OPTS="$CHROMIUM_OPTS --enable-gpu-rasterization --enable-accelerated-2d-canvas --ignore-gpu-blacklist";;
|
||||
esac
|
||||
|
||||
# flash
|
||||
if [ -e $ADDON_DIR/PepperFlash/libpepflashplayer.so ]; then
|
||||
CHROMIUM_OPTS="$CHROMIUM_OPTS --ppapi-flash-path=$ADDON_DIR/PepperFlash/libpepflashplayer.so"
|
||||
fi
|
||||
|
||||
# alsa
|
||||
if [ ! -z $ALSA_DEVICE ]; then
|
||||
CHROMIUM_OPTS="$CHROMIUM_OPTS --alsa-output-device=$ALSA_DEVICE"
|
||||
fi
|
||||
|
||||
# start chromium
|
||||
LD_PRELOAD=/usr/lib/libGL.so $ADDON_DIR/bin/chromium.bin \
|
||||
$CHROMIUM_OPTS \
|
||||
--no-sandbox \
|
||||
--user-data-dir=$ADDON_HOME/profile \
|
||||
--test-type $@ \
|
||||
2>&1 | tee $ADDON_LOG_FILE
|
||||
|
||||
# kill unclutter
|
||||
if [ "$HIDE_CURSOR" == "true" ]
|
||||
then
|
||||
kill $UNCLUTTER_PID
|
||||
fi
|
@ -1,163 +0,0 @@
|
||||
################################################################################
|
||||
# This file is part of OpenELEC - http://www.openelec.tv
|
||||
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
|
||||
#
|
||||
# This Program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This Program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with OpenELEC.tv; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
|
||||
# http://www.gnu.org/copyleft/gpl.html
|
||||
################################################################################
|
||||
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import xbmcaddon
|
||||
import subprocess
|
||||
from xml.dom.minidom import parse
|
||||
|
||||
sys.path.append('/usr/share/kodi/addons/service.libreelec.settings')
|
||||
|
||||
import oe
|
||||
|
||||
__addon__ = xbmcaddon.Addon();
|
||||
__path__ = os.path.join(__addon__.getAddonInfo('path'), 'bin') + '/'
|
||||
|
||||
pauseXBMC = __addon__.getSetting("PAUSE_XBMC")
|
||||
|
||||
# widevine and flash stuff
|
||||
def install_flash():
|
||||
__url__ = 'https://fpdownload.adobe.com/pub/flashplayer/pdc/24.0.0.186/flash_player_ppapi_linux.x86_64.tar.gz'
|
||||
__file__ = __url__.split('/')[-1]
|
||||
__tmp__ = '/tmp/pepperflash/'
|
||||
__lib__ = 'libpepflashplayer.so'
|
||||
try:
|
||||
if not os.path.isdir(__tmp__):
|
||||
os.mkdir(__tmp__)
|
||||
if not os.path.exists(__tmp__ + __file__):
|
||||
oe.download_file(__url__, __tmp__ + __file__)
|
||||
if not os.path.exists(__tmp__ + __file__):
|
||||
oe.notify('Chromium', 'Could not download file')
|
||||
else:
|
||||
oe.notify('Chromium', 'Extracting libpepflashplayer.so')
|
||||
if not os.path.isdir(__tmp__ + __file__):
|
||||
oe.execute('tar zxf ' + __tmp__ + __file__ + ' -C ' + __tmp__ + '')
|
||||
if not os.path.isdir(__path__ + 'PepperFlash'):
|
||||
os.mkdir(__path__ + 'PepperFlash')
|
||||
oe.copy_file(__tmp__ + __lib__, __path__ + 'PepperFlash/' + __lib__)
|
||||
oe.notify('Chromium', 'Installation of libpepflashplayer.so succeeded')
|
||||
except Exception, e:
|
||||
oe.notify('Chromium', 'Installation of libpepflashplayer.so failed')
|
||||
|
||||
def install_widevine():
|
||||
__url__ = 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'
|
||||
__file__ = __url__.split('/')[-1]
|
||||
__tar__ = 'data.tar.xz'
|
||||
__tmp__ = '/tmp/widevine/'
|
||||
__lib__ = 'opt/google/chrome/libwidevinecdm.so'
|
||||
try:
|
||||
if not os.path.isdir(__tmp__):
|
||||
os.mkdir(__tmp__)
|
||||
if not os.path.exists(__tmp__ + __file__):
|
||||
oe.download_file(__url__, __tmp__ + __file__)
|
||||
if not os.path.exists(__tmp__ + __file__):
|
||||
oe.notify('Chromium', 'Could not download file')
|
||||
else:
|
||||
oe.notify('Chromium', 'Extracting libwidevinecdm.so')
|
||||
if not os.path.isdir(__tmp__ + __tar__):
|
||||
oe.execute('cd ' + __tmp__ + ' && ar -x ' + __file__)
|
||||
oe.execute('tar xf ' + __tmp__ + __tar__ + ' -C ' + __tmp__ + ' ./' + __lib__)
|
||||
oe.copy_file(__tmp__ + __lib__, __path__ + __lib__.split('/')[-1])
|
||||
oe.notify('Chromium', 'Installation of libwidevinecdm.so succeeded')
|
||||
except Exception, e:
|
||||
oe.notify('Chromium', 'Installation of libwidevinecdm.so failed')
|
||||
|
||||
def pauseXbmc():
|
||||
if pauseXBMC == "true":
|
||||
xbmc.executebuiltin("PlayerControl(Stop)")
|
||||
xbmc.audioSuspend()
|
||||
xbmc.enableNavSounds(False)
|
||||
|
||||
def resumeXbmc():
|
||||
if pauseXBMC == "true":
|
||||
xbmc.audioResume()
|
||||
xbmc.enableNavSounds(True)
|
||||
|
||||
def startChromium(args):
|
||||
try:
|
||||
new_env = os.environ.copy()
|
||||
new_env['VAAPI_MODE'] = __addon__.getSetting('VAAPI_MODE')
|
||||
new_env['WINDOW_MODE'] = __addon__.getSetting('WINDOW_MODE')
|
||||
new_env['RASTER_MODE'] = __addon__.getSetting('RASTER_MODE')
|
||||
|
||||
new_env['ALSA_DEVICE'] = ''
|
||||
if __addon__.getSetting('USE_CUST_AUDIODEVICE') == 'true':
|
||||
alsa_device = __addon__.getSetting('CUST_AUDIODEVICE_STR')
|
||||
else:
|
||||
alsa_device = getAudioDevice()
|
||||
if not alsa_device == None and not alsa_device == '':
|
||||
new_env['ALSA_DEVICE'] = alsa_device
|
||||
|
||||
chrome_params = args + ' ' + \
|
||||
__addon__.getSetting('HOMEPAGE')
|
||||
subprocess.call(__path__ + 'chromium ' + chrome_params, shell=True, env=new_env)
|
||||
except Exception, e:
|
||||
oe.dbg_log('chromium', unicode(e))
|
||||
|
||||
def isRuning(pname):
|
||||
tmp = os.popen("ps -Af").read()
|
||||
pcount = tmp.count(pname)
|
||||
if pcount > 0:
|
||||
return True
|
||||
return False
|
||||
|
||||
def getAudioDevice():
|
||||
try:
|
||||
dom = parse("/storage/.kodi/userdata/guisettings.xml")
|
||||
audiooutput=dom.getElementsByTagName('audiooutput')
|
||||
for node in audiooutput:
|
||||
dev = node.getElementsByTagName('audiodevice')[0].childNodes[0].nodeValue
|
||||
if dev.startswith("ALSA:"):
|
||||
dev = dev.split("ALSA:")[1]
|
||||
if dev == "@":
|
||||
return None
|
||||
if dev.startswith("@:"):
|
||||
dev = dev.split("@:")[1]
|
||||
else:
|
||||
# not ALSA
|
||||
return None
|
||||
except:
|
||||
return None
|
||||
if dev.startswith("CARD="):
|
||||
dev = "plughw:" + dev
|
||||
return dev
|
||||
|
||||
if (not __addon__.getSetting("firstrun")):
|
||||
__addon__.setSetting("firstrun", "1")
|
||||
__addon__.openSettings()
|
||||
|
||||
try:
|
||||
args = ' '.join(sys.argv[1:])
|
||||
except:
|
||||
args = ""
|
||||
|
||||
if args == 'widevine':
|
||||
install_widevine()
|
||||
elif args == 'flash':
|
||||
install_flash()
|
||||
else:
|
||||
if not isRuning('chromium.bin'):
|
||||
pauseXbmc()
|
||||
startChromium(args)
|
||||
while isRuning('chromium.bin'):
|
||||
time.sleep(1)
|
||||
resumeXbmc()
|
@ -1,17 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<strings>
|
||||
<string id="1000">General</string>
|
||||
<string id="1001">Actions</string>
|
||||
<string id="1020">Chromium Configuration</string>
|
||||
<string id="1021">Stop Kodi Player and Suspend AudioEngine</string>
|
||||
<string id="1022">HW Acceleration Mode</string>
|
||||
<string id="1023">Rasterization Mode</string>
|
||||
<string id="1024">Window Mode</string>
|
||||
<string id="1025">Default Homepage</string>
|
||||
<string id="1026">Use Custom Audio Device</string>
|
||||
<string id="1027">Audio Device</string>
|
||||
<string id="1028">Hide Cursor</string>
|
||||
<string id="1030">Chromium Actions</string>
|
||||
<string id="1031">Install libwidevinecdm.so (Netflix Support)</string>
|
||||
<string id="1032">Install libpepflashplayer.so (Flash Player Support)</string>
|
||||
</strings>
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<settings>
|
||||
<category label="1000">
|
||||
<setting label="1020" type="lsep"/>
|
||||
<setting type="sep" />
|
||||
<setting id="PAUSE_XBMC" type="bool" label="1021" default="true" />
|
||||
<setting id="VAAPI_MODE" type="labelenum" label="1022" values="off|intel|amd|nvidia" default="off"/>
|
||||
<setting id="RASTER_MODE" type="labelenum" label="1023" values="default|off|force" default="default" subsetting="true" enable="!eq(-1,0)"/>
|
||||
<setting id="WINDOW_MODE" type="labelenum" label="1024" values="maximized|kiosk|none" default="maximized" />
|
||||
<setting id="HOMEPAGE" type="text" label="1025" default="https://libreelec.tv" />
|
||||
<setting id="USE_CUST_AUDIODEVICE" type="bool" label="1026" default="false" />
|
||||
<setting id="CUST_AUDIODEVICE_STR" type="text" label="1027" visible="eq(-1,true)" subsetting="true" default="" />
|
||||
<setting id="HIDE_CURSOR" type="bool" label="1028" default="false" />
|
||||
</category>
|
||||
<category label="1001">
|
||||
<setting label="1030" type="lsep"/>
|
||||
<setting type="sep" />
|
||||
<setting label="1031" type="action" action="RunScript(browser.chromium, widevine)"/>
|
||||
<setting label="1032" type="action" action="RunScript(browser.chromium, flash)"/>
|
||||
</category>
|
||||
</settings>
|
Loading…
x
Reference in New Issue
Block a user