diff options
author | Maxim Baz | 2019-07-03 18:16:27 +0200 |
---|---|---|
committer | Maxim Baz | 2019-07-03 18:16:27 +0200 |
commit | 1d3ade301507a078a809e31b4d8544cc08c66ef9 (patch) | |
tree | 6f3684982c0d322471318fb40d9a50776d43e4c2 | |
parent | 182fe35a91ff5e957b5cc258f70a3b9fa1a0294d (diff) | |
download | aur-1d3ade301507a078a809e31b4d8544cc08c66ef9.tar.gz |
chromium-vaapi: 75.0.3770.100
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | chromium-non-const-deltas.patch | 21 | ||||
-rw-r--r-- | vaapi-fix.patch | 134 |
4 files changed, 174 insertions, 7 deletions
@@ -1,7 +1,7 @@ pkgbase = chromium-vaapi pkgdesc = Chromium with VA-API support to enable hardware acceleration - pkgver = 75.0.3770.90 - pkgrel = 3 + pkgver = 75.0.3770.100 + pkgrel = 1 url = https://www.chromium.org/Home install = chromium.install arch = x86_64 @@ -56,21 +56,25 @@ pkgbase = chromium-vaapi optdepends = kwallet: for storing passwords in KWallet provides = chromium conflicts = chromium - source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-75.0.3770.90.tar.xz + source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-75.0.3770.100.tar.xz source = chromium-launcher-6.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v6.tar.gz source = chromium-drirc-disable-10bpc-color-configs.conf source = chromium-vaapi.patch + source = vaapi-fix.patch source = chromium-system-icu.patch + source = chromium-non-const-deltas.patch source = libstdc-do-not-assume-unique_ptr-has-ostream-operator.patch source = disallow-partial-swaps-for-linux-based-on-gl_version.patch source = chromium-fix-window-flash-for-some-WMs.patch source = chromium-widevine.patch source = chromium-skia-harmony.patch - sha256sums = b1b59abbe19ecb88c17d99fa68f5c1c5585a5d66c100858f944aa3b93b943839 + sha256sums = 9e1360101b6d9f9635e540db77626e3e15b452f413d8750518244ac37b73fca0 sha256sums = 04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1 sha256sums = babda4f5c1179825797496898d77334ac067149cac03d797ab27ac69671a7feb sha256sums = 4befcfa310db89736c890dd41e698a6a77ecec8b6f75077ddbae4a1c0ba80092 + sha256sums = 83cca45acc2515b9c83f34844494a8788f85bb04c36834b88e905c490988d9bb sha256sums = e2d284311f49c529ea45083438a768db390bde52949995534034d2a814beab89 + sha256sums = 09c5f16b726ef7031d74807b534fbbfa49a7276ee2a239b70602de2704fa197c sha256sums = e309dfd9d790f32cb1d23103726ac25e405b6ae6757a1c957a8395667d753908 sha256sums = 1e4686de75c019f38a3ed947463e429a777d5387fd29310deef2108c58617b07 sha256sums = 183d8cc712f0bcf1afcb01ce90c4c104a4c8d8070a06f94974a28b007d9e2ce4 @@ -10,8 +10,8 @@ # Contributor: Daniel J Griffiths <ghost1227@archlinux.us> pkgname=chromium-vaapi -pkgver=75.0.3770.90 -pkgrel=3 +pkgver=75.0.3770.100 +pkgrel=1 _launcher_ver=6 pkgdesc="Chromium with VA-API support to enable hardware acceleration" arch=('x86_64') @@ -33,17 +33,21 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz chromium-drirc-disable-10bpc-color-configs.conf chromium-vaapi.patch + vaapi-fix.patch chromium-system-icu.patch + chromium-non-const-deltas.patch libstdc-do-not-assume-unique_ptr-has-ostream-operator.patch disallow-partial-swaps-for-linux-based-on-gl_version.patch chromium-fix-window-flash-for-some-WMs.patch chromium-widevine.patch chromium-skia-harmony.patch) -sha256sums=('b1b59abbe19ecb88c17d99fa68f5c1c5585a5d66c100858f944aa3b93b943839' +sha256sums=('9e1360101b6d9f9635e540db77626e3e15b452f413d8750518244ac37b73fca0' '04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1' 'babda4f5c1179825797496898d77334ac067149cac03d797ab27ac69671a7feb' '4befcfa310db89736c890dd41e698a6a77ecec8b6f75077ddbae4a1c0ba80092' + '83cca45acc2515b9c83f34844494a8788f85bb04c36834b88e905c490988d9bb' 'e2d284311f49c529ea45083438a768db390bde52949995534034d2a814beab89' + '09c5f16b726ef7031d74807b534fbbfa49a7276ee2a239b70602de2704fa197c' 'e309dfd9d790f32cb1d23103726ac25e405b6ae6757a1c957a8395667d753908' '1e4686de75c019f38a3ed947463e429a777d5387fd29310deef2108c58617b07' '183d8cc712f0bcf1afcb01ce90c4c104a4c8d8070a06f94974a28b007d9e2ce4' @@ -103,6 +107,7 @@ prepare() { # Enable VAAPI on Linux patch -Np1 -i ../chromium-vaapi.patch + patch -Np1 -i ../vaapi-fix.patch # https://crbug.com/973216 patch -Np1 -i ../disallow-partial-swaps-for-linux-based-on-gl_version.patch @@ -119,6 +124,9 @@ prepare() { # https://bugs.gentoo.org/661880#c21 patch -Np1 -i ../chromium-system-icu.patch + # https://bugs.gentoo.org/686982#c5 + patch -Np1 -i ../chromium-non-const-deltas.patch + # Force script incompatible with Python 3 to use /usr/bin/python2 sed -i '1s|python$|&2|' third_party/dom_distiller_js/protoc_plugins/*.py diff --git a/chromium-non-const-deltas.patch b/chromium-non-const-deltas.patch new file mode 100644 index 000000000000..646cfd0f3893 --- /dev/null +++ b/chromium-non-const-deltas.patch @@ -0,0 +1,21 @@ +Bug: https://bugs.gentoo.org/686982 + +TabStripModelChange has a defaulted default constructor and a const data member +without a user-defined default constructor. This leads to a bug: + +error: defaulting this default constructor would delete it after +its first declaration + +We declare the data member as non-const instead. + +--- a/chrome/browser/ui/tabs/tab_strip_model_observer.h ++++ b/chrome/browser/ui/tabs/tab_strip_model_observer.h +@@ -103,7 +103,7 @@ class TabStripModelChange { + + private: + const Type type_ = kSelectionOnly; +- const std::vector<Delta> deltas_; ++ std::vector<Delta> deltas_; + + DISALLOW_COPY_AND_ASSIGN(TabStripModelChange); + }; diff --git a/vaapi-fix.patch b/vaapi-fix.patch new file mode 100644 index 000000000000..824e3d52438e --- /dev/null +++ b/vaapi-fix.patch @@ -0,0 +1,134 @@ +From 757f4ca3fbeee9bb5ef88d3dc5ff6b241541c6b9 Mon Sep 17 00:00:00 2001 +From: Akarshan Biswas <akarshanbiswas@fedoraproject.org> +Date: Fri, 28 Jun 2019 14:27:33 +0530 +Subject: [PATCH] Do not use VPP on Linux; Add some info logs and fix vaapi DRM + +--- + .../gpu_video_decode_accelerator_factory.cc | 2 ++ + .../vaapi/vaapi_video_decode_accelerator.cc | 16 +++++++++++++ + media/gpu/vaapi/vaapi_wrapper.cc | 24 +++++++++++++++---- + 3 files changed, 37 insertions(+), 5 deletions(-) + +diff --git a/media/gpu/gpu_video_decode_accelerator_factory.cc b/media/gpu/gpu_video_decode_accelerator_factory.cc +index dc9ff3fb3..53189759c 100644 +--- a/media/gpu/gpu_video_decode_accelerator_factory.cc ++++ b/media/gpu/gpu_video_decode_accelerator_factory.cc +@@ -183,6 +183,8 @@ GpuVideoDecodeAcceleratorFactory::CreateVDA( + 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; +diff --git a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc +index 3c1316dca..1e7fac393 100644 +--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc ++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc +@@ -627,6 +627,13 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers( + const unsigned int va_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. +@@ -640,6 +647,7 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers( + NotifyError(PLATFORM_FAILURE); + } + } ++ #endif + + for (size_t i = 0; i < buffers.size(); ++i) { + DCHECK(requested_pic_size_ == buffers[i].size()); +@@ -648,9 +656,13 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers( + // only used as a copy destination. Therefore, the VaapiWrapper used and + // owned by |picture| is |vpp_vaapi_wrapper_|. + 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_, buffers[i]); + RETURN_AND_NOTIFY_ON_FAILURE(picture, "Failed creating a VaapiPicture", + PLATFORM_FAILURE, ); +@@ -1063,6 +1075,9 @@ VaapiVideoDecodeAccelerator::GetSupportedProfiles() { + + 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) +@@ -1095,6 +1110,7 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() { + return BufferAllocationMode::kReduced; + + return BufferAllocationMode::kSuperReduced; ++ #endif + } + + bool VaapiVideoDecodeAccelerator::IsBufferAllocationModeReducedOrSuperReduced() +diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc +index f6008d288..d829582a6 100644 +--- a/media/gpu/vaapi/vaapi_wrapper.cc ++++ b/media/gpu/vaapi/vaapi_wrapper.cc +@@ -266,6 +266,10 @@ void VADisplayState::PreSandboxInitialization() { + 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() +@@ -303,10 +307,11 @@ 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: +@@ -339,8 +344,17 @@ 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, refer:(Github)akarshanbiswas/chromium-vaapi/issues/7): " << 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; ++ } + } + + va_initialized_ = true; +-- +2.21.0 |