summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsL1pKn072019-12-18 06:43:29 +0100
committersL1pKn072019-12-18 06:43:29 +0100
commit429ea55794c3cf70c8282e01c6e386f0ba5c2053 (patch)
tree1afd177813f0d4a305f530a9a9c552a077a63f60
parentfaa958e44620a7faaff029f008cde4acde9862d3 (diff)
downloadaur-429ea55794c3cf70c8282e01c6e386f0ba5c2053.tar.gz
Update to 80.0.3987.7
- Drop VAAPI patch. sorry guys :(
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD49
-rw-r--r--enable-vaapi.patch378
4 files changed, 21 insertions, 419 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e177014808f..e7d8d6e75c1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = chromium-dev
pkgdesc = The open-source project behind Google Chrome (Dev Channel)
- pkgver = 79.0.3941.4
+ pkgver = 80.0.3987.7
pkgrel = 1
url = http://www.chromium.org
install = chromium-dev.install
@@ -9,6 +9,7 @@ pkgbase = chromium-dev
makedepends = gperf
makedepends = ninja
makedepends = python2
+ makedepends = python2-protobuf
makedepends = python
makedepends = yasm
makedepends = nasm
@@ -34,19 +35,14 @@ pkgbase = chromium-dev
optdepends = kdialog: Needed for file dialogs in KF5
optdepends = kwalletmanager: Needed for storing passwords in KWallet5
optdepends = ttf-font: For some typography
- optdepends = libva-vdpau-driver-chromium: HW video acceleration for NVIDIA users
- optdepends = libva-mesa-driver: HW video acceleration for Nouveau, R600 and RadeonSI users
- optdepends = libva-intel-driver: HW video acceleration for Intel G45 and HD users
- source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-79.0.3941.4.tar.xz
+ source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-80.0.3987.7.tar.xz
source = git+https://github.com/foutrelis/chromium-launcher.git
source = chromium-dev.svg
- source = enable-vaapi.patch
source = fix_vaapi_wayland.patch::https://patch-diff.githubusercontent.com/raw/Igalia/chromium/pull/517.patch
source = chromium-skia-harmony-r2.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/chromium-skia-harmony.patch?h=packages/chromium
- sha256sums = e5e841e8cdd133359acc7dbd0a2c0abe6046e0cc0a4527410866e6cef02de005
+ sha256sums = d8729238b1047ab2f2d2c1b86c4e9692d36ba5c6e6956212f301259f57a12048
sha256sums = SKIP
sha256sums = dd2b5c4191e468972b5ea8ddb4fa2e2fa3c2c94c79fc06645d0efc0e63ce7ee1
- sha256sums = 45c5ceb13df8e6ba1411b71bed6ab3b3f7c9c427ce51305e2721215d7abe3a42
sha256sums = 1b93388254c9d780365e4639d494bfa337a7924426c12f7362a1f7e8e7fad014
sha256sums = 771292942c0901092a402cc60ee883877a99fb804cb54d568c8c6c94565a48e1
diff --git a/.gitignore b/.gitignore
index e5580160e13..a7fad0ffc10 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,5 +4,4 @@
!PKGBUILD
!chromium-dev.install
!chromium-dev.svg
-!enable-vaapi.patch
!chromium-skia-harmony-r1.patch
diff --git a/PKGBUILD b/PKGBUILD
index b2c3f360ae3..c9ca80c8807 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,7 +15,7 @@ _use_wayland=0 # Build Wayland NOTE: extremely experimental and don't
## -- Package and components information -- ##
##############################################
pkgname=chromium-dev
-pkgver=79.0.3941.4
+pkgver=80.0.3987.7
pkgrel=1
pkgdesc="The open-source project behind Google Chrome (Dev Channel)"
arch=('x86_64')
@@ -47,6 +47,7 @@ makedepends=(
'gperf'
'ninja'
'python2'
+ 'python2-protobuf'
'python'
'yasm'
'nasm'
@@ -63,10 +64,6 @@ optdepends=(
'kwalletmanager: Needed for storing passwords in KWallet5'
#
'ttf-font: For some typography'
- #
- 'libva-vdpau-driver-chromium: HW video acceleration for NVIDIA users'
- 'libva-mesa-driver: HW video acceleration for Nouveau, R600 and RadeonSI users'
- 'libva-intel-driver: HW video acceleration for Intel G45 and HD users'
)
source=(
#"https://gsdview.appspot.com/chromium-browser-official/chromium-${pkgver}.tar.xz"
@@ -76,7 +73,6 @@ source=(
# Patch form Gentoo.
# Misc Patches.
- 'enable-vaapi.patch' # Use Saikrishna Arcot patch again :https://raw.githubusercontent.com/saiarcot895/chromium-ubuntu-build/a996c32c7ae7b369799b528daddb7be3c8b67de4/debian/patches/enable_vaapi_on_linux_2.diff'
'fix_vaapi_wayland.patch::https://patch-diff.githubusercontent.com/raw/Igalia/chromium/pull/517.patch' # Attemp to fix build if enable wayland
# Patch from crbug.com (chromium bugtracker), chromium-review.googlesource.com / Gerrit or Arch chromium package.
'chromium-skia-harmony-r2.patch::https://git.archlinux.org/svntogit/packages.git/plain/trunk/chromium-skia-harmony.patch?h=packages/chromium'
@@ -89,7 +85,6 @@ sha256sums=(
# Patch form Gentoo
# Misc Patches
- '45c5ceb13df8e6ba1411b71bed6ab3b3f7c9c427ce51305e2721215d7abe3a42'
'1b93388254c9d780365e4639d494bfa337a7924426c12f7362a1f7e8e7fad014'
# Patch from crbug (chromium bugtracker) or Arch chromium package
'771292942c0901092a402cc60ee883877a99fb804cb54d568c8c6c94565a48e1'
@@ -150,8 +145,6 @@ _keeplibs=(
'third_party/blink'
'third_party/boringssl'
'third_party/boringssl/src/third_party/fiat'
- 'third_party/boringssl/src/third_party/sike'
- 'third_party/boringssl/linux-x86_64/crypto/third_party/sike'
'third_party/breakpad'
'third_party/breakpad/breakpad/src/third_party/curl'
'third_party/brotli'
@@ -187,11 +180,13 @@ _keeplibs=(
'third_party/depot_tools'
'third_party/depot_tools/third_party/six'
'third_party/devscripts'
+ 'third_party/devtools-frontend'
+ 'third_party/devtools-frontend/src/third_party/axe-core'
+ 'third_party/devtools-frontend/src/third_party/pyjson5'
'third_party/dom_distiller_js'
'third_party/emoji-segmenter'
'third_party/ffmpeg'
'third_party/flatbuffers'
- 'third_party/flot'
'third_party/glslang'
'third_party/google_input_tools'
'third_party/google_input_tools/third_party/closure_library'
@@ -210,6 +205,7 @@ _keeplibs=(
'third_party/libaom'
'third_party/libaom/source/libaom/third_party/vector'
'third_party/libaom/source/libaom/third_party/x86inc'
+ 'third_party/libgifcodec'
'third_party/libjingle'
'third_party/libphonenumber'
'third_party/libsecret'
@@ -220,7 +216,7 @@ _keeplibs=(
'third_party/libvpx/source/libvpx/third_party/x86inc'
'third_party/libwebm'
'third_party/libwebp'
- 'third_party/libxml/chromium'
+ 'third_party/libxml' #/chromium'
'third_party/libyuv'
'third_party/llvm'
'third_party/lss'
@@ -264,7 +260,6 @@ _keeplibs=(
'third_party/skia'
'third_party/skia/include/third_party/skcms'
'third_party/skia/include/third_party/vulkan'
- 'third_party/skia/third_party/gif'
'third_party/skia/third_party/skcms'
'third_party/skia/third_party/vulkan'
'third_party/smhasher'
@@ -385,7 +380,7 @@ _use_system=(
'libpng'
# 'libvpx' # Needs update.
# 'libwebp' # Needs update.
- 'libxml'
+# 'libxml' # Needs fix
'libxslt'
'openh264'
'opus'
@@ -433,11 +428,12 @@ prepare() {
cd "${srcdir}/chromium-${pkgver}"
# Force script incompatible with Python 3 to use /usr/bin/python2.
- sed -i '1s|python$|&2|' \
- -i third_party/dom_distiller_js/protoc_plugins/json_values_converter.py \
- -i third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py \
- -i third_party/ffmpeg/chromium/scripts/build_ffmpeg.py \
- -i third_party/ffmpeg/chromium/scripts/generate_gn.py
+ sed -i '1s|python$|&2|' \
+ -i third_party/ffmpeg/chromium/scripts/build_ffmpeg.py \
+ -i third_party/ffmpeg/chromium/scripts/generate_gn.py \
+ -i third_party/dom_distiller_js/protoc_plugins/json_values_converter.py \
+ -i third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py
+
export PNACLPYTHON=/usr/bin/python2
sed 's|iteritems|items|g' -i build/linux/unbundle/remove_bundled_libraries.py
@@ -467,7 +463,7 @@ prepare() {
sed -e 's|chromium-browser|chromium-dev|g' \
-i chrome/browser/shell_integration_linux.cc \
-i chrome/browser/ui/libgtkui/gtk_util.cc
- sed -e 's|config_dir.Append("chromium|&-dev|' \
+ sed -e 's|chromium|&-dev|' \
-i chrome/common/chrome_paths_linux.cc
sed -e 's|/etc/chromium|&-dev|' \
-e 's|/usr/share/chromium|&-dev|' \
@@ -498,10 +494,6 @@ prepare() {
-i third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \
-i third_party/libxml/chromium/libxml_utils.cc
- # Enable VAAPI.
- patch -p1 -i "${srcdir}/enable-vaapi.patch"
- sed 's|/dri/|/|g' -i media/gpu/vaapi/vaapi_wrapper.cc
-
# Unbundle zlib
sed 's|zlib:zlib_config|zlib:system_zlib|g' -i third_party/perfetto/gn/BUILD.gn
@@ -610,7 +602,6 @@ package() {
_libs=(
'swiftshader/libEGL.so'
'swiftshader/libGLESv2.so'
- 'swiftshader/libvk_swiftshader_icd.json'
'libvk_swiftshader.so'
)
if [ "${_use_wayland}" = "1" ]; then
@@ -627,22 +618,16 @@ package() {
for i in "${_libs[@]}"; do
install -Dm755 "${i}" "${pkgdir}/usr/lib/chromium-dev/${i}"
- case "$i" in
- swiftshader/libvk_swiftshader_icd.json)
- ;;
- *)
- strip $STRIP_SHARED "${pkgdir}/usr/lib/chromium-dev/${i}"
- ;;
- esac
+ strip $STRIP_SHARED "${pkgdir}/usr/lib/chromium-dev/${i}"
done
_blobs=(
- 'natives_blob.bin'
'snapshot_blob.bin'
'v8_context_snapshot.bin'
'icudtl.dat' # https://crbug.com/678661.
'MEIPreload/manifest.json'
'MEIPreload/preloaded_data.pb'
+ 'vk_swiftshader_icd.json'
)
if [ "${_use_wayland}" = "0" ]; then
diff --git a/enable-vaapi.patch b/enable-vaapi.patch
deleted file mode 100644
index c5d5ee126a5..00000000000
--- a/enable-vaapi.patch
+++ /dev/null
@@ -1,378 +0,0 @@
-From 53b93dfe87fd10cced5d2a2a63072dfc7a2af6e4 Mon Sep 17 00:00:00 2001
-From: Daniel Charles <daniel.charles@intel.com>
-Date: Fri, 28 Jul 2017 16:31:47 -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>
----
-
-Index: dev/chrome/browser/about_flags.cc
-===================================================================
---- dev.orig/chrome/browser/about_flags.cc
-+++ dev/chrome/browser/about_flags.cc
-@@ -1420,7 +1420,7 @@ const FeatureEntry kFeatureEntries[] = {
- "disable-accelerated-video-decode",
- flag_descriptions::kAcceleratedVideoDecodeName,
- flag_descriptions::kAcceleratedVideoDecodeDescription,
-- kOsMac | kOsWin | kOsCrOS | kOsAndroid,
-+ kOsAll,
- SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedVideoDecode),
- },
- {
-@@ -1867,10 +1867,10 @@ const FeatureEntry kFeatureEntries[] = {
- FEATURE_VALUE_TYPE(service_manager::features::kXRSandbox)},
- #endif // ENABLE_ISOLATED_XR_SERVICE
- #endif // ENABLE_VR
--#if defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_ANDROID)
- {"disable-accelerated-mjpeg-decode",
- flag_descriptions::kAcceleratedMjpegDecodeName,
-- flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS,
-+ flag_descriptions::kAcceleratedMjpegDecodeDescription, kOsCrOS | kOsLinux,
- SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAcceleratedMjpegDecode)},
- #endif // OS_CHROMEOS
- {"system-keyboard-lock", flag_descriptions::kSystemKeyboardLockName,
-Index: dev/chrome/browser/flag_descriptions.cc
-===================================================================
---- dev.orig/chrome/browser/flag_descriptions.cc
-+++ dev/chrome/browser/flag_descriptions.cc
-@@ -2789,9 +2789,7 @@ const char kMacSystemMediaPermissionsInf
-
- #endif
-
--// Chrome OS -------------------------------------------------------------------
--
--#if defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_ANDROID)
-
- const char kAcceleratedMjpegDecodeName[] =
- "Hardware-accelerated mjpeg decode for captured frame";
-@@ -2799,6 +2797,12 @@ const char kAcceleratedMjpegDecodeDescri
- "Enable hardware-accelerated mjpeg decode for captured frame where "
- "available.";
-
-+#endif
-+
-+// Chrome OS -------------------------------------------------------------------
-+
-+#if defined(OS_CHROMEOS)
-+
- const char kAppServiceAshName[] = "App Service Ash";
- const char kAppServiceAshDescription[] =
- "Use the App Service to provide data to the Ash UI, such as the shelf and "
-Index: dev/chrome/browser/flag_descriptions.h
-===================================================================
---- dev.orig/chrome/browser/flag_descriptions.h
-+++ dev/chrome/browser/flag_descriptions.h
-@@ -1659,13 +1659,17 @@ extern const char kPermissionPromptPersi
-
- #endif // defined(OS_MACOSX)
-
--// Chrome OS ------------------------------------------------------------------
--
--#if defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_ANDROID)
-
- extern const char kAcceleratedMjpegDecodeName[];
- extern const char kAcceleratedMjpegDecodeDescription[];
-
-+#endif
-+
-+// Chrome OS ------------------------------------------------------------------
-+
-+#if defined(OS_CHROMEOS)
-+
- extern const char kAggregatedMlAppRankingName[];
- extern const char kAggregatedMlAppRankingDescription[];
-
-Index: dev/content/gpu/BUILD.gn
-===================================================================
---- dev.orig/content/gpu/BUILD.gn
-+++ dev/content/gpu/BUILD.gn
-@@ -6,6 +6,7 @@ import("//build/config/jumbo.gni")
- import("//build/config/ui.gni")
- import("//gpu/vulkan/features.gni")
- import("//media/media_options.gni")
-+import("//media/gpu/args.gni")
- import("//ui/ozone/ozone.gni")
-
- # See //content/BUILD.gn for how this works.
-@@ -128,4 +129,8 @@ target(link_target_type, "gpu_sources")
- (!is_chromecast || is_cast_desktop_build)) {
- configs += [ "//build/config/linux/dri" ]
- }
-+
-+ if (is_desktop_linux && use_vaapi) {
-+ public_configs = [ "//build/config/linux/libva" ]
-+ }
- }
-Index: dev/gpu/config/software_rendering_list.json
-===================================================================
---- dev.orig/gpu/config/software_rendering_list.json
-+++ dev/gpu/config/software_rendering_list.json
-@@ -369,17 +369,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],
-Index: dev/media/base/media_switches.cc
-===================================================================
---- dev.orig/media/base/media_switches.cc
-+++ dev/media/base/media_switches.cc
-@@ -528,7 +528,7 @@ bool IsVideoCaptureAcceleratedJpegDecodi
- switches::kUseFakeMjpegDecodeAccelerator)) {
- return true;
- }
--#if defined(OS_CHROMEOS)
-+#if defined(OS_LINUX) && !defined(OS_ANDROID)
- return true;
- #endif
- return false;
-Index: dev/media/gpu/BUILD.gn
-===================================================================
---- dev.orig/media/gpu/BUILD.gn
-+++ dev/media/gpu/BUILD.gn
-@@ -521,6 +521,7 @@ if (use_v4l2_codec || use_vaapi || is_ma
- if (use_ozone) {
- deps += [ "//ui/ozone" ]
- }
-+ public_configs = [ "//build/config/linux/libva" ]
- }
- }
-
-Index: dev/media/gpu/gpu_video_decode_accelerator_factory.cc
-===================================================================
---- dev.orig/media/gpu/gpu_video_decode_accelerator_factory.cc
-+++ dev/media/gpu/gpu_video_decode_accelerator_factory.cc
-@@ -171,6 +171,8 @@ GpuVideoDecodeAcceleratorFactory::Create
- vda = (this->*create_vda_function)(workarounds, gpu_preferences, media_log);
- if (vda && vda->Initialize(config, client))
- return vda;
-+ else
-+ LOG(ERROR) << "Initialization of one or more VDAs failed.";
- }
-
- return nullptr;
-@@ -229,6 +231,7 @@ GpuVideoDecodeAcceleratorFactory::Create
- const gpu::GpuDriverBugWorkarounds& workarounds,
- const gpu::GpuPreferences& gpu_preferences,
- MediaLog* media_log) const {
-+ LOG(WARNING) << "Initializing VAAPI VDA.";
- std::unique_ptr<VideoDecodeAccelerator> decoder;
- decoder.reset(new VaapiVideoDecodeAccelerator(make_context_current_cb_,
- bind_image_cb_));
-Index: dev/media/gpu/ipc/service/gpu_video_decode_accelerator.cc
-===================================================================
---- dev.orig/media/gpu/ipc/service/gpu_video_decode_accelerator.cc
-+++ dev/media/gpu/ipc/service/gpu_video_decode_accelerator.cc
-@@ -381,6 +381,7 @@ bool GpuVideoDecodeAccelerator::Initiali
- LOG(ERROR) << "Failed creating the VDA factory";
- return false;
- }
-+ LOG(WARNING) << "Created the VDA factory";
-
- const gpu::GpuDriverBugWorkarounds& gpu_workarounds =
- stub_->channel()->gpu_channel_manager()->gpu_driver_bug_workarounds();
-@@ -394,6 +395,7 @@ bool GpuVideoDecodeAccelerator::Initiali
- << (config.is_encrypted() ? " with encryption" : "");
- return false;
- }
-+ LOG(WARNING) << "Created VDA";
-
- // Attempt to set up performing decoding tasks on IO thread, if supported by
- // the VDA.
-Index: dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
-===================================================================
---- dev.orig/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
-+++ dev/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
-@@ -64,6 +64,7 @@ void ReportToUMA(VAVDADecoderFailure fai
- VAVDA_DECODER_FAILURES_MAX + 1);
- }
-
-+#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
- // Returns true if the CPU is an Intel Gemini Lake or later (including Kaby
- // Lake) Cpu platform id's are referenced from the following file in kernel
- // source arch/x86/include/asm/intel-family.h
-@@ -76,6 +77,7 @@ bool IsGeminiLakeOrLater() {
- cpuid.model() >= kGeminiLakeModelId;
- return is_geminilake_or_later;
- }
-+#endif
-
- } // namespace
-
-@@ -635,6 +637,10 @@ void VaapiVideoDecodeAccelerator::Assign
- va_surface_format_ = GetVaFormatForVideoCodecProfile(profile_);
- std::vector<VASurfaceID> va_surface_ids;
-
-+ // Nvidia doesn't support VAProfileNone, so don't try to create a temporary
-+ // copy buffer there. It's not needed anyways for hardware video decoding
-+ // to work.
-+#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
- // If we aren't in BufferAllocationMode::kNone, we have to allocate a
- // |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's
- // internal decoded frame.
-@@ -648,6 +654,7 @@ void VaapiVideoDecodeAccelerator::Assign
- NotifyError(PLATFORM_FAILURE);
- }
- }
-+#endif
-
- for (size_t i = 0; i < buffers.size(); ++i) {
- DCHECK(requested_pic_size_ == buffers[i].size());
-@@ -656,9 +663,13 @@ void VaapiVideoDecodeAccelerator::Assign
- PictureBuffer buffer = buffers[i];
- buffer.set_size(requested_pic_size_);
- std::unique_ptr<VaapiPicture> picture = vaapi_picture_factory_->Create(
-+#if defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
-+ vaapi_wrapper_,
-+#else
- (buffer_allocation_mode_ == BufferAllocationMode::kNone)
- ? vaapi_wrapper_
- : vpp_vaapi_wrapper_,
-+#endif
- make_context_current_cb_, bind_image_cb_, buffer);
- RETURN_AND_NOTIFY_ON_FAILURE(picture, "Failed creating a VaapiPicture",
- PLATFORM_FAILURE, );
-@@ -1077,6 +1088,9 @@ VaapiVideoDecodeAccelerator::GetSupporte
-
- VaapiVideoDecodeAccelerator::BufferAllocationMode
- VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
-+#if defined(OS_LINUX) && !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
-+ return BufferAllocationMode::kNormal;
-+#else
- // TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT
- // |output_mode_| as well.
- if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
-@@ -1109,6 +1123,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe
- return BufferAllocationMode::kReduced;
-
- return BufferAllocationMode::kSuperReduced;
-+#endif
- }
-
- bool VaapiVideoDecodeAccelerator::IsBufferAllocationModeReducedOrSuperReduced()
-Index: dev/media/gpu/vaapi/vaapi_wrapper.cc
-===================================================================
---- dev.orig/media/gpu/vaapi/vaapi_wrapper.cc
-+++ dev/media/gpu/vaapi/vaapi_wrapper.cc
-@@ -250,6 +250,11 @@ void VADisplayState::PreSandboxInitializ
- base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE);
- if (drm_file.IsValid())
- VADisplayState::Get()->SetDrmFd(drm_file.GetPlatformFile());
-+
-+ const char kNvidiaPath[] = "/dev/dri/nvidiactl";
-+ base::File nvidia_file = base::File(
-+ base::FilePath::FromUTF8Unsafe(kNvidiaPath),
-+ base::File::FLAG_OPEN | base::File::FLAG_READ | base::File::FLAG_WRITE);
- }
-
- VADisplayState::VADisplayState()
-@@ -277,10 +282,6 @@ bool VADisplayState::Initialize() {
- }
-
- bool VADisplayState::InitializeOnce() {
-- static_assert(
-- VA_MAJOR_VERSION >= 2 || (VA_MAJOR_VERSION == 1 && VA_MINOR_VERSION >= 1),
-- "Requires VA-API >= 1.1.0");
--
- switch (gl::GetGLImplementation()) {
- case gl::kGLImplementationEGLGLES2:
- va_display_ = vaGetDisplayDRM(drm_fd_.get());
-@@ -287,10 +289,10 @@ bool VADisplayState::InitializeOnce() {
- case gl::kGLImplementationDesktopGL:
- #if defined(USE_X11)
- va_display_ = vaGetDisplay(gfx::GetXDisplay());
--#else
-- LOG(WARNING) << "VAAPI video acceleration not available without "
-- "DesktopGL (GLX).";
-+ if (vaDisplayIsValid(va_display_))
-+ break;
- #endif // USE_X11
-+ va_display_ = vaGetDisplayDRM(drm_fd_.get());
- break;
- // Cannot infer platform from GL, try all available displays
- case gl::kGLImplementationNone:
-@@ -323,8 +325,19 @@ bool VADisplayState::InitializeOnce() {
- int major_version, minor_version;
- VAStatus va_res = vaInitialize(va_display_, &major_version, &minor_version);
- if (va_res != VA_STATUS_SUCCESS) {
-- LOG(ERROR) << "vaInitialize failed: " << vaErrorStr(va_res);
-- return false;
-+ LOG(ERROR) << "vaInitialize failed (ignore if using Wayland desktop environment): " << vaErrorStr(va_res);
-+ va_display_ = vaGetDisplayDRM(drm_fd_.get());
-+ if (!vaDisplayIsValid(va_display_)) {
-+ LOG(ERROR) << "Could not get a valid DRM VA display";
-+ return false;
-+ }
-+ va_res = vaInitialize(va_display_, &major_version, &minor_version);
-+ if (va_res != VA_STATUS_SUCCESS) {
-+ LOG(ERROR) << "vaInitialize failed using DRM: " << vaErrorStr(va_res);
-+ return false;
-+ } else {
-+ LOG(WARNING) << "vaInitialize succeeded for DRM";
-+ }
- }
-
- va_initialized_ = true;
-@@ -332,7 +345,7 @@ bool VADisplayState::InitializeOnce() {
- va_vendor_string_ = vaQueryVendorString(va_display_);
- DLOG_IF(WARNING, va_vendor_string_.empty())
- << "Vendor string empty or error reading.";
-- DVLOG(1) << "VAAPI version: " << major_version << "." << minor_version << " "
-+ VLOG(1) << "VAAPI version: " << major_version << "." << minor_version << " "
- << va_vendor_string_;
-
- // The VAAPI version is determined from what is loaded on the system by
-@@ -665,7 +678,7 @@ bool VASupportedProfiles::AreAttribsSupp
- 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
-+ VLOG(1) << "Unsupported value " << required_attribs[i].value
- << " for attribute type " << required_attribs[i].type;
- return false;
- }