summaryrefslogtreecommitdiff
path: root/www-client/chromium/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /www-client/chromium/files
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'www-client/chromium/files')
-rw-r--r--www-client/chromium/files/chromium-84-mediaalloc.patch41
-rw-r--r--www-client/chromium/files/chromium-87-fix-vaapi-build.patch177
-rw-r--r--www-client/chromium/files/chromium-87-webcodecs-deps.patch27
-rw-r--r--www-client/chromium/files/chromium-88-ozone-deps.patch40
-rw-r--r--www-client/chromium/files/chromium-launcher-r5.sh56
5 files changed, 67 insertions, 274 deletions
diff --git a/www-client/chromium/files/chromium-84-mediaalloc.patch b/www-client/chromium/files/chromium-84-mediaalloc.patch
deleted file mode 100644
index 69f0229088a9..000000000000
--- a/www-client/chromium/files/chromium-84-mediaalloc.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://bugs.chromium.org/p/chromium/issues/detail?id=1095962
-
---- /media/base/media.cc
-+++ /media/base/media.cc
-@@ -2,6 +2,8 @@
- // Use of this source code is governed by a BSD-style license that can be
- // found in the LICENSE file.
-
-+#include <limits>
-+
- #include "media/base/media.h"
-
- #include "base/allocator/buildflags.h"
-@@ -41,7 +43,7 @@
-
- #if BUILDFLAG(USE_ALLOCATOR_SHIM)
- // Remove allocation limit from ffmpeg, so calls go down to shim layer.
-- av_max_alloc(0);
-+ av_max_alloc(std::numeric_limits<size_t>::max());
- #endif // BUILDFLAG(USE_ALLOCATOR_SHIM)
-
- #endif // BUILDFLAG(ENABLE_FFMPEG)
---- /third_party/ffmpeg/chromium/dllmain.cc
-+++ /third_party/ffmpeg/chromium/dllmain.cc
-@@ -3,6 +3,7 @@
- // found in the LICENSE file.
-
- #include <intrin.h>
-+#include <limits>
- #include <new.h>
- #include <stdlib.h>
- #include <windows.h>
-@@ -28,7 +29,7 @@
- if (reason == DLL_PROCESS_ATTACH) {
- DisableThreadLibraryCalls(instance);
- // Remove allocation limit from ffmpeg, so calls go down to shim layer.
-- av_max_alloc(0);
-+ av_max_alloc(std::numeric_limits<size_t>::max());
- // Enable OOM crashes in the shim for all malloc calls that fail.
- _set_new_mode(1);
- _set_new_handler(&OnNoMemory);
diff --git a/www-client/chromium/files/chromium-87-fix-vaapi-build.patch b/www-client/chromium/files/chromium-87-fix-vaapi-build.patch
deleted file mode 100644
index e230510fde7f..000000000000
--- a/www-client/chromium/files/chromium-87-fix-vaapi-build.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From 90c4cfb5355a36de6660df4ed0a1c405a830ca0e Mon Sep 17 00:00:00 2001
-From: Tom Anderson <thomasanderson@chromium.org>
-Date: Tue, 15 Sep 2020 12:02:17 -0700
-Subject: [PATCH] [XProto] Fix VAAPI build
-
-Fixes the build after [1] broke it.
-
-[1] https://chromium-review.googlesource.com/c/chromium/src/+/2392140
-
-Bug: 1066670, 1127532
-Change-Id: I340f91a1d4ba7214ea47fa4b1bb4a368fe5597f5
-R=mcasas
-CC=tmathmeyer
----
-
-diff --git a/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc b/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc
-index 843cf22..91eb184 100644
---- a/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc
-+++ b/media/gpu/vaapi/vaapi_picture_native_pixmap_angle.cc
-@@ -7,6 +7,8 @@
- #include "media/gpu/vaapi/va_surface.h"
- #include "media/gpu/vaapi/vaapi_wrapper.h"
- #include "ui/base/ui_base_features.h"
-+#include "ui/gfx/x/connection.h"
-+#include "ui/gfx/x/xproto.h"
- #include "ui/gl/gl_bindings.h"
- #include "ui/gl/gl_image_egl_pixmap.h"
- #include "ui/gl/scoped_binders.h"
-@@ -16,24 +18,27 @@
- namespace {
-
- inline Pixmap CreatePixmap(const gfx::Size& size) {
-- auto* display = gfx::GetXDisplay();
-+ auto* connection = x11::Connection::Get();
-+ auto* display = connection->display();
- if (!display)
- return 0;
-
-- int screen = DefaultScreen(display);
-- auto root = XRootWindow(display, screen);
-- if (root == BadValue)
-- return 0;
-+ auto root = connection->default_root();
-
-- XWindowAttributes win_attr = {};
-- // returns 0 on failure, see:
-- // https://tronche.com/gui/x/xlib/introduction/errors.html#Status
-- if (!XGetWindowAttributes(display, root, &win_attr))
-+ uint8_t depth = 0;
-+ if (auto reply = connection->GetGeometry({root}).Sync())
-+ depth = reply->depth;
-+ else
- return 0;
-
- // TODO(tmathmeyer) should we use the depth from libva instead of root window?
-- return XCreatePixmap(display, root, size.width(), size.height(),
-- win_attr.depth);
-+ auto pixmap = connection->GenerateId<x11::Pixmap>();
-+ auto req = connection->CreatePixmap(
-+ {depth, pixmap, root, base::checked_cast<uint16_t>(size.width()),
-+ base::checked_cast<uint16_t>(size.height())});
-+ if (req.Sync().error)
-+ pixmap = x11::Pixmap::None;
-+ return base::strict_cast<::Pixmap>(pixmap);
- }
-
- } // namespace
-@@ -71,11 +76,8 @@
- DCHECK_EQ(glGetError(), static_cast<GLenum>(GL_NO_ERROR));
- }
-
-- if (x_pixmap_) {
-- if (auto* display = gfx::GetXDisplay()) {
-- XFreePixmap(display, x_pixmap_);
-- }
-- }
-+ if (x_pixmap_)
-+ x11::Connection::Get()->FreePixmap({static_cast<x11::Pixmap>(x_pixmap_)});
- }
-
- Status VaapiPictureNativePixmapAngle::Allocate(gfx::BufferFormat format) {
-diff --git a/media/gpu/vaapi/vaapi_picture_tfp.cc b/media/gpu/vaapi/vaapi_picture_tfp.cc
-index 9ff0372..1c917a1 100644
---- a/media/gpu/vaapi/vaapi_picture_tfp.cc
-+++ b/media/gpu/vaapi/vaapi_picture_tfp.cc
-@@ -7,6 +7,7 @@
- #include "media/gpu/vaapi/va_surface.h"
- #include "media/gpu/vaapi/vaapi_wrapper.h"
- #include "ui/base/ui_base_features.h"
-+#include "ui/gfx/x/connection.h"
- #include "ui/gfx/x/x11_types.h"
- #include "ui/gl/gl_bindings.h"
- #include "ui/gl/gl_image_glx.h"
-@@ -33,7 +34,8 @@
- texture_id,
- client_texture_id,
- texture_target),
-- x_display_(gfx::GetXDisplay()),
-+ connection_(x11::Connection::Get()),
-+ x_display_(connection_->display()),
- x_pixmap_(0) {
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- DCHECK(!features::IsUsingOzonePlatform());
-@@ -49,7 +51,7 @@
- }
-
- if (x_pixmap_)
-- XFreePixmap(x_display_, x_pixmap_);
-+ connection_->FreePixmap({static_cast<x11::Pixmap>(x_pixmap_)});
- }
-
- Status VaapiTFPPicture::Initialize() {
-@@ -85,15 +87,20 @@
- }
-
- XWindowAttributes win_attr;
-- int screen = DefaultScreen(x_display_);
-- XGetWindowAttributes(x_display_, XRootWindow(x_display_, screen), &win_attr);
-+ auto root = connection_->default_root();
-+ XGetWindowAttributes(x_display_, static_cast<::Window>(root), &win_attr);
- // TODO(posciak): pass the depth required by libva, not the RootWindow's
- // depth
-- x_pixmap_ = XCreatePixmap(x_display_, XRootWindow(x_display_, screen),
-- size_.width(), size_.height(), win_attr.depth);
-- if (!x_pixmap_) {
-+ auto pixmap = connection_->GenerateId<x11::Pixmap>();
-+ if (connection_
-+ ->CreatePixmap(
-+ {win_attr.depth, pixmap, root, size_.width(), size_.height()})
-+ .Sync()
-+ .error) {
- DLOG(ERROR) << "Failed creating an X Pixmap for TFP";
- return StatusCode::kVaapiNoPixmap;
-+ } else {
-+ x_pixmap_ = static_cast<::Pixmap>(pixmap);
- }
-
- return Initialize();
-diff --git a/media/gpu/vaapi/vaapi_picture_tfp.h b/media/gpu/vaapi/vaapi_picture_tfp.h
-index c4eb2c1..a32955e 100644
---- a/media/gpu/vaapi/vaapi_picture_tfp.h
-+++ b/media/gpu/vaapi/vaapi_picture_tfp.h
-@@ -11,6 +11,7 @@
- #include "base/memory/ref_counted.h"
- #include "media/gpu/vaapi/vaapi_picture.h"
- #include "ui/gfx/geometry/size.h"
-+#include "ui/gfx/x/connection.h"
- #include "ui/gl/gl_bindings.h"
-
- namespace gl {
-@@ -47,6 +48,7 @@
- private:
- Status Initialize();
-
-+ x11::Connection* const connection_;
- Display* x_display_;
-
- Pixmap x_pixmap_;
-diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc
-index 2ad0b997..a988233 100644
---- a/media/gpu/vaapi/vaapi_wrapper.cc
-+++ b/media/gpu/vaapi/vaapi_wrapper.cc
-@@ -57,8 +57,13 @@
- #include "ui/gl/gl_implementation.h"
-
- #if defined(USE_X11)
--#include <va/va_x11.h>
- #include "ui/gfx/x/x11_types.h" // nogncheck
-+
-+typedef XID Drawable;
-+
-+extern "C" {
-+#include "media/gpu/vaapi/va_x11.sigs"
-+}
- #endif
-
- #if defined(USE_OZONE)
diff --git a/www-client/chromium/files/chromium-87-webcodecs-deps.patch b/www-client/chromium/files/chromium-87-webcodecs-deps.patch
new file mode 100644
index 000000000000..e9d411305ee9
--- /dev/null
+++ b/www-client/chromium/files/chromium-87-webcodecs-deps.patch
@@ -0,0 +1,27 @@
+From 47f6a3bcf7e72c467ca6a2cd633a5c3585a218d5 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Fri, 2 Oct 2020 06:44:53 +0000
+Subject: [PATCH] add dependency on openh264:encoder
+
+webcodecs uses openh264 encoder, but dependency is missing. With
+unbundled openh264 library build fails, because include path is
+incomplete.
+---
+ third_party/blink/renderer/modules/webcodecs/BUILD.gn | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/third_party/blink/renderer/modules/webcodecs/BUILD.gn b/third_party/blink/renderer/modules/webcodecs/BUILD.gn
+index 99d0e47..7c4d188 100644
+--- a/third_party/blink/renderer/modules/webcodecs/BUILD.gn
++++ b/third_party/blink/renderer/modules/webcodecs/BUILD.gn
+@@ -54,6 +54,7 @@ blink_modules_sources("webcodecs") {
+ "//media/mojo/clients",
+ "//media/mojo/mojom",
+ "//third_party/libyuv:libyuv",
++ "//third_party/openh264:encoder",
+ ]
+ public_deps = [
+ "//third_party/blink/renderer/modules/mediastream:mediastream",
+--
+2.26.2
+
diff --git a/www-client/chromium/files/chromium-88-ozone-deps.patch b/www-client/chromium/files/chromium-88-ozone-deps.patch
new file mode 100644
index 000000000000..6274ded44aca
--- /dev/null
+++ b/www-client/chromium/files/chromium-88-ozone-deps.patch
@@ -0,0 +1,40 @@
+From a5a6050ed551972faaaa65ebc2b4e7e1958738a1 Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Fri, 6 Nov 2020 16:17:30 +0000
+Subject: [PATCH] fix building without Ozone
+
+When building with use_x11=true and use_ozone=false build fails,
+because features::IsUsingOzonePlatform() is not defined:
+
+../../content/browser/gpu/gpu_internals_ui.cc: In function
+'std::unique_ptr<base::ListValue>
+content::{anonymous}::GpuMemoryBufferInfo(const gfx::GpuExtraInfo&)'
+../../content/browser/gpu/gpu_internals_ui.cc:397:18: error:
+'IsUsingOzonePlatform' is not a member of 'features'
+ 397 | if (!features::IsUsingOzonePlatform()) {
+ | ^~~~~~~~~~~~~~~~~~~~
+---
+ content/browser/gpu/gpu_internals_ui.cc | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc
+index 4f07186..01dfcbf 100644
+--- a/content/browser/gpu/gpu_internals_ui.cc
++++ b/content/browser/gpu/gpu_internals_ui.cc
+@@ -394,7 +394,12 @@ std::unique_ptr<base::ListValue> GpuMemoryBufferInfo(
+
+ gpu::GpuMemoryBufferConfigurationSet native_config;
+ #if defined(USE_X11)
+- if (!features::IsUsingOzonePlatform()) {
++#if defined(USE_OZONE)
++ const auto is_using_ozone_platform = features::IsUsingOzonePlatform();
++#else
++ const auto is_using_ozone_platform = false;
++#endif
++ if (!is_using_ozone_platform) {
+ for (const auto& config : gpu_extra_info.gpu_memory_buffer_support_x11) {
+ native_config.emplace(config);
+ }
+--
+2.26.2
+
diff --git a/www-client/chromium/files/chromium-launcher-r5.sh b/www-client/chromium/files/chromium-launcher-r5.sh
deleted file mode 100644
index d9aa3af9a057..000000000000
--- a/www-client/chromium/files/chromium-launcher-r5.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-
-# Allow the user to override command-line flags, bug #357629.
-# This is based on Debian's chromium-browser package, and is intended
-# to be consistent with Debian.
-for f in /etc/chromium/*; do
- [[ -f ${f} ]] && source "${f}"
-done
-
-# Prefer user defined CHROMIUM_USER_FLAGS (from env) over system
-# default CHROMIUM_FLAGS (from /etc/chromium/default).
-CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-"$CHROMIUM_FLAGS"}
-
-# Let the wrapped binary know that it has been run through the wrapper
-export CHROME_WRAPPER=$(readlink -f "$0")
-
-PROGDIR=${CHROME_WRAPPER%/*}
-
-case ":$PATH:" in
- *:$PROGDIR:*)
- # $PATH already contains $PROGDIR
- ;;
- *)
- # Append $PROGDIR to $PATH
- export PATH="$PATH:$PROGDIR"
- ;;
-esac
-
-if [[ ${EUID} == 0 && -O ${XDG_CONFIG_HOME:-${HOME}} ]]; then
- # Running as root with HOME owned by root.
- # Pass --user-data-dir to work around upstream failsafe.
- CHROMIUM_FLAGS="--user-data-dir=${XDG_CONFIG_HOME:-${HOME}/.config}/chromium
- ${CHROMIUM_FLAGS}"
-fi
-
-# Select session type
-if @@OZONE_AUTO_SESSION@@; then
- platform=
- if [[ ${XDG_SESSION_TYPE} == x11 ]]; then
- platform=x11
- elif [[ ${XDG_SESSION_TYPE} == wayland ]]; then
- platform=wayland
- else
- if [[ -n ${WAYLAND_DISPLAY} ]]; then
- platform=wayland
- else
- platform=x11
- fi
- fi
- CHROMIUM_FLAGS="--ozone-platform=${platform} ${CHROMIUM_FLAGS}"
-fi
-
-# Set the .desktop file name
-export CHROME_DESKTOP="chromium-browser-chromium.desktop"
-
-exec -a "chromium-browser" "$PROGDIR/chrome" --extra-plugin-dir=/usr/lib/nsbrowser/plugins ${CHROMIUM_FLAGS} "$@"