summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Playfair Cal2019-07-27 17:29:19 +1000
committerDaniel Playfair Cal2019-07-27 17:29:19 +1000
commitc983bc3007fc25f4f9fabd6380fc1e977257b1f0 (patch)
tree7986a3d537556b92f082f97ab563a261b5eb07ff
parentf999c83e03301027193afe373abf09ee26a9ea61 (diff)
downloadaur-c983bc3007fc25f4f9fabd6380fc1e977257b1f0.tar.gz
75.0.3770.142-1
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD30
-rw-r--r--chromium-mutex-surfaces.patch123
-rw-r--r--chromium-sway-presentation.patch71
4 files changed, 219 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 07b963203d51..9462d8e22cc0 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = chromium-ozone
pkgdesc = Chromium built with patches for wayland support via Ozone
- pkgver = 75.0.3770.100
+ pkgver = 75.0.3770.142
pkgrel = 1
url = https://www.chromium.org/Home
install = chromium.install
@@ -16,7 +16,7 @@ pkgbase = chromium-ozone
makedepends = git
makedepends = clang
makedepends = lld
- makedepends = gn
+ makedepends = gn<0.1578.0
makedepends = java-runtime-headless
depends = gtk3
depends = nss
@@ -55,22 +55,26 @@ pkgbase = chromium-ozone
optdepends = kwallet: for storing passwords in KWallet
provides = chromium
conflicts = chromium
- source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-75.0.3770.100.tar.xz
+ source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-75.0.3770.142.tar.xz
source = chromium-launcher-6.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v6.tar.gz
- source = meta-browser-f24753238414a8b04e5227772f22bb4dd9171b2f.tar.gz::https://github.com/OSSystems/meta-browser/archive/f24753238414a8b04e5227772f22bb4dd9171b2f.tar.gz
+ source = meta-browser-3a0df19242cddda96efd91f195fe0df53fe4f955.tar.gz::https://github.com/OSSystems/meta-browser/archive/3a0df19242cddda96efd91f195fe0df53fe4f955.tar.gz
source = chromium-system-icu.patch
source = chromium-fix-window-flash-for-some-WMs.patch
source = chromium-widevine.patch
source = chromium-skia-harmony.patch
+ source = chromium-sway-presentation.patch
+ source = chromium-mutex-surfaces.patch
source = https://git.nightly.network/Exherbo/desktop/raw/de0a391d9e7442dce614553835ef599119826387/packages/net-www/chromium-stable/files/chromium-remove-const.patch
source = Added-HiDPI-support-for-Ozone-Wayland.patch
- sha256sums = 9e1360101b6d9f9635e540db77626e3e15b452f413d8750518244ac37b73fca0
+ sha256sums = 510e6ca7ccc218b401b375c13656f6aecab196b03142026dc3602b9d1804a5ac
sha256sums = 04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1
- sha256sums = e7ead0cdb341819adb52082aed1ae674e243944fbf23456ab9ca60f4c4baefe5
+ sha256sums = 6bacd62414282999a5631e06cd3fa1eca787ee5b20a41fd3499668eead55f4d1
sha256sums = e2d284311f49c529ea45083438a768db390bde52949995534034d2a814beab89
sha256sums = 183d8cc712f0bcf1afcb01ce90c4c104a4c8d8070a06f94974a28b007d9e2ce4
sha256sums = d081f2ef8793544685aad35dea75a7e6264a2cb987ff3541e6377f4a3650a28b
sha256sums = 5887f78b55c4ecbbcba5930f3f0bb7bc0117c2a41c2f761805fcf7f46f1ca2b3
+ sha256sums = 279b9558a466d96bc7dcba96a9f41efaed98ede1cd69e1562689ee4409940fe8
+ sha256sums = dcf01e0d630eb107e5efb56bb00c140269a0c9711b3ae90a3fd289ad5153ac08
sha256sums = 005f7db8acc774e2c66f99d900f2263abf495ccd5eda33c45a957fce2ed30f8d
sha256sums = b6b258a6d3b42731c9375395b4e6e896edef00617d5b7028c348a5d2dbb14eb7
diff --git a/PKGBUILD b/PKGBUILD
index fa6dd5a4e4b8..e8d907ec1dfd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,10 +5,10 @@
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=chromium-ozone
-pkgver=75.0.3770.100
+pkgver=75.0.3770.142
pkgrel=1
_launcher_ver=6
-_meta_browser_sha=f24753238414a8b04e5227772f22bb4dd9171b2f
+_meta_browser_sha=3a0df19242cddda96efd91f195fe0df53fe4f955
pkgdesc="Chromium built with patches for wayland support via Ozone"
arch=('x86_64')
url="https://www.chromium.org/Home"
@@ -19,7 +19,7 @@ depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
provides=('chromium')
conflicts=('chromium')
makedepends=('python' 'python2' 'gperf' 'yasm' 'mesa' 'ninja' 'nodejs' 'git'
- 'clang' 'lld' 'gn' 'java-runtime-headless')
+ 'clang' 'lld' 'gn<0.1578.0' 'java-runtime-headless')
optdepends=('pepper-flash: support for Flash content'
'kdialog: needed for file dialogs in KDE'
'gnome-keyring: for storing passwords in GNOME keyring'
@@ -32,15 +32,19 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom
chromium-fix-window-flash-for-some-WMs.patch
chromium-widevine.patch
chromium-skia-harmony.patch
+ chromium-sway-presentation.patch
+ chromium-mutex-surfaces.patch
https://git.nightly.network/Exherbo/desktop/raw/de0a391d9e7442dce614553835ef599119826387/packages/net-www/chromium-stable/files/chromium-remove-const.patch
Added-HiDPI-support-for-Ozone-Wayland.patch)
-sha256sums=('9e1360101b6d9f9635e540db77626e3e15b452f413d8750518244ac37b73fca0'
+sha256sums=('510e6ca7ccc218b401b375c13656f6aecab196b03142026dc3602b9d1804a5ac'
'04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1'
- 'e7ead0cdb341819adb52082aed1ae674e243944fbf23456ab9ca60f4c4baefe5'
+ '6bacd62414282999a5631e06cd3fa1eca787ee5b20a41fd3499668eead55f4d1'
'e2d284311f49c529ea45083438a768db390bde52949995534034d2a814beab89'
'183d8cc712f0bcf1afcb01ce90c4c104a4c8d8070a06f94974a28b007d9e2ce4'
'd081f2ef8793544685aad35dea75a7e6264a2cb987ff3541e6377f4a3650a28b'
'5887f78b55c4ecbbcba5930f3f0bb7bc0117c2a41c2f761805fcf7f46f1ca2b3'
+ '279b9558a466d96bc7dcba96a9f41efaed98ede1cd69e1562689ee4409940fe8'
+ 'dcf01e0d630eb107e5efb56bb00c140269a0c9711b3ae90a3fd289ad5153ac08'
'005f7db8acc774e2c66f99d900f2263abf495ccd5eda33c45a957fce2ed30f8d'
'b6b258a6d3b42731c9375395b4e6e896edef00617d5b7028c348a5d2dbb14eb7')
@@ -80,22 +84,12 @@ _google_default_client_id=413772536636.apps.googleusercontent.com
_google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4
_general_patches=(
- '0001-Add-support-for-GCC-Compilers.patch'
- '0001-Revert-Use-noexcept-consistently-on-the-move-ctor-of.patch'
- '0001-TrackEventJSONExporter-HandleLegacyEvent-Use-std-mov.patch'
- '0001-webrequest-Fix-GCC-build-after-2d47b917314a.patch'
- '0001-GCC-7-workaround-remove-constexpr-ctor.patch'
'0001-libstdc-do-not-assume-unique_ptr-has-ostream-operato.patch'
- 'aarch64-skia-build-fix.patch'
'oe-clang-fixes.patch'
# 'v8-qemu-wrapper.patch'
'wrapper-extra-flags.patch'
'do-not-specify-march-on-arm.patch'
- '0005-Remove-banned-designated-initializer-list-usage-from.patch'
- '0006-GCC-add-std-move-to-return-to-base-Optional.patch'
- '0001-GCC-fix-another-GCC-bug-by-implementing-copy-assign-.patch'
'add_internal_define_armv7ve.patch'
- '0001-Avoid-pure-virtual-crash-destroying-RenderProcessUse.patch'
)
_wayland_patches=(
@@ -169,6 +163,12 @@ prepare() {
patch -Np1 -i $srcdir/meta-browser-${_meta_browser_sha}/recipes-browser/chromium/chromium-ozone-wayland/${PATCH}
done
+ # https://chromium-review.googlesource.com/c/chromium/src/+/1718406
+ patch -Np1 -i ../chromium-mutex-surfaces.patch
+
+ # https://chromium-review.googlesource.com/c/chromium/src/+/1719013
+ patch -Np1 -i ../chromium-sway-presentation.patch
+
# https://chromium-review.googlesource.com/c/chromium/src/+/1647154
patch -Np1 -i ../Added-HiDPI-support-for-Ozone-Wayland.patch
diff --git a/chromium-mutex-surfaces.patch b/chromium-mutex-surfaces.patch
new file mode 100644
index 000000000000..c96fbb3124b0
--- /dev/null
+++ b/chromium-mutex-surfaces.patch
@@ -0,0 +1,123 @@
+commit e4085b7e427a848fea61980252f17e5a3676a9ea
+Author: Maksim Sisov <msisov@igalia.com>
+Date: Thu Jul 25 16:22:09 2019 +0300
+
+ [ozone/wayland] Use mutex before accessing surfaces map.
+
+ We must make sure that accessing surfaces map from different threads
+ is safe. Otherwise, this is subject to races and unexpected crashes.
+
+ Bug: 987950
+ Change-Id: I2e70e9c1ad48943be518c3571b7ca1fb91f8d51b
+
+diff --git a/ui/ozone/platform/wayland/gpu/gbm_pixmap_wayland.cc b/ui/ozone/platform/wayland/gpu/gbm_pixmap_wayland.cc
+index 72d2419b5f84..f0081ca725c5 100644
+--- a/ui/ozone/platform/wayland/gpu/gbm_pixmap_wayland.cc
++++ b/ui/ozone/platform/wayland/gpu/gbm_pixmap_wayland.cc
+@@ -135,6 +135,8 @@ bool GbmPixmapWayland::ScheduleOverlayPlane(
+ const gfx::RectF& crop_rect,
+ bool enable_blend,
+ std::unique_ptr<gfx::GpuFence> gpu_fence) {
++ base::AutoLock scoped_lock(*(buffer_manager_->lock()));
++
+ auto* surface = buffer_manager_->GetSurface(widget);
+ DCHECK(surface);
+ GbmSurfacelessWayland* surfaceless =
+diff --git a/ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.cc b/ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.cc
+index 63bfa3032fde..2f3499e93589 100644
+--- a/ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.cc
++++ b/ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.cc
+@@ -43,6 +43,8 @@ void WaylandBufferManagerGpu::OnSubmission(gfx::AcceleratedWidget widget,
+ gfx::SwapResult swap_result) {
+ DCHECK(io_thread_runner_->BelongsToCurrentThread());
+ DCHECK_NE(widget, gfx::kNullAcceleratedWidget);
++ base::AutoLock scoped_lock(*lock());
++
+ auto* surface = GetSurface(widget);
+ // There can be a race between destruction and submitting the last frames. The
+ // surface can be destroyed by the time the host receives a request to destroy
+@@ -64,6 +66,8 @@ void WaylandBufferManagerGpu::OnPresentation(
+ const gfx::PresentationFeedback& feedback) {
+ DCHECK(io_thread_runner_->BelongsToCurrentThread());
+ DCHECK_NE(widget, gfx::kNullAcceleratedWidget);
++ base::AutoLock scoped_lock(*lock());
++
+ auto* surface = GetSurface(widget);
+ // There can be a race between destruction and presenting the last frames. The
+ // surface can be destroyed by the time the host receives a request to destroy
+@@ -80,15 +84,20 @@ void WaylandBufferManagerGpu::OnPresentation(
+
+ void WaylandBufferManagerGpu::RegisterSurface(gfx::AcceleratedWidget widget,
+ WaylandSurfaceGpu* surface) {
++ base::AutoLock scoped_lock(lock_);
+ widget_to_surface_map_.insert(std::make_pair(widget, surface));
+ }
+
+ void WaylandBufferManagerGpu::UnregisterSurface(gfx::AcceleratedWidget widget) {
++ base::AutoLock scoped_lock(lock_);
+ widget_to_surface_map_.erase(widget);
+ }
+
+ WaylandSurfaceGpu* WaylandBufferManagerGpu::GetSurface(
+- gfx::AcceleratedWidget widget) const {
++ gfx::AcceleratedWidget widget) {
++ // Before accessing the map, the |lock_| must be acquired.
++ lock_.AssertAcquired();
++
+ WaylandSurfaceGpu* surface = nullptr;
+ auto it = widget_to_surface_map_.find(widget);
+ if (it != widget_to_surface_map_.end())
+diff --git a/ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.h b/ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.h
+index 87439610cfc3..d1a34357a6a0 100644
+--- a/ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.h
++++ b/ui/ozone/platform/wayland/gpu/wayland_buffer_manager_gpu.h
+@@ -8,6 +8,7 @@
+ #include <memory>
+
+ #include "base/macros.h"
++#include "base/synchronization/lock.h"
+ #include "base/threading/sequenced_task_runner_handle.h"
+ #include "base/threading/thread_checker.h"
+ #include "mojo/public/cpp/bindings/associated_binding.h"
+@@ -43,6 +44,10 @@ class WaylandBufferManagerGpu : public ozone::mojom::WaylandBufferManagerGpu {
+ WaylandBufferManagerGpu();
+ ~WaylandBufferManagerGpu() override;
+
++ // Whenever GetSurface is called, the caller must ensure to lock the mutex
++ // before that call.
++ base::Lock* lock() { return &lock_; }
++
+ // WaylandBufferManagerGpu overrides:
+ void SetWaylandBufferManagerHost(
+ BufferManagerHostPtr buffer_manager_host_ptr) override;
+@@ -66,7 +71,9 @@ class WaylandBufferManagerGpu : public ozone::mojom::WaylandBufferManagerGpu {
+ void RegisterSurface(gfx::AcceleratedWidget widget,
+ WaylandSurfaceGpu* surface);
+ void UnregisterSurface(gfx::AcceleratedWidget widget);
+- WaylandSurfaceGpu* GetSurface(gfx::AcceleratedWidget widget) const;
++ // A client of this method must always get and acquire lock before doing
++ // any manipulations with the surface. Once done, the lock must be released.
++ WaylandSurfaceGpu* GetSurface(gfx::AcceleratedWidget widget);
+
+ // Methods, which can be used when in both in-process-gpu and out of process
+ // modes. These calls are forwarded to the browser process through the
+@@ -156,7 +163,8 @@ class WaylandBufferManagerGpu : public ozone::mojom::WaylandBufferManagerGpu {
+ mojo::AssociatedBinding<ozone::mojom::WaylandBufferManagerGpu>
+ associated_binding_;
+
+- std::map<gfx::AcceleratedWidget, WaylandSurfaceGpu*> widget_to_surface_map_;
++ std::map<gfx::AcceleratedWidget, WaylandSurfaceGpu*>
++ widget_to_surface_map_; // Guarded by |lock_|.
+
+ // This task runner can be used to pass messages back to the same thread,
+ // where the commit buffer request came from. For example, swap requests come
+@@ -171,6 +179,9 @@ class WaylandBufferManagerGpu : public ozone::mojom::WaylandBufferManagerGpu {
+ // needed to ensure mojo calls happen on a right sequence.
+ scoped_refptr<base::SingleThreadTaskRunner> io_thread_runner_;
+
++ // Protects access to |widget_to_surface_map_|.
++ base::Lock lock_;
++
+ DISALLOW_COPY_AND_ASSIGN(WaylandBufferManagerGpu);
+ };
+
diff --git a/chromium-sway-presentation.patch b/chromium-sway-presentation.patch
new file mode 100644
index 000000000000..3d06fcebb1df
--- /dev/null
+++ b/chromium-sway-presentation.patch
@@ -0,0 +1,71 @@
+commit 5682b344c0dabc6d7047363f9c877dcf4c0add72
+Author: Maksim Sisov <msisov@igalia.com>
+Date: Fri Jul 26 14:33:28 2019 +0300
+
+ [ozone/wayland] Sway: avoid sending presentation early.
+
+ In Sway, presentation callbacks may come much earlier than we send
+ submission callbacks. That results in unexpected crashes in the
+ GbmSurfacelessWayland, because of early presentation callbacks.
+ Shortly speaking, a submitted frame may not receive the submission
+ callback and not be moved to the list of waiting for a presentation
+ frames. That means GbmSurfacelessWayland::OnPresentation simply
+ accesses an invalid pointer to a frame, for which the presentation
+ feedback comes.
+
+ Bug: 974456
+ Change-Id: Iae7ab57a00d06f0dde6057ed05df885239e099bd
+
+diff --git a/ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc b/ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc
+index eed48394602f..cd3245390fdf 100644
+--- a/ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc
++++ b/ui/ozone/platform/wayland/host/wayland_buffer_manager_host.cc
+@@ -228,6 +228,12 @@ class WaylandBufferManagerHost::Surface {
+ // surface can tell the gpu about successful swap.
+ bool released = true;
+
++ // In some cases, a presentation feedback can come earlier than we fire a
++ // submission callback. Thus, instead of sending it immediately to the GPU
++ // process, we store it and fire as soon as the submission callback is
++ // fired.
++ bool needs_send_feedback = false;
++
+ gfx::PresentationFeedback feedback;
+
+ DISALLOW_COPY_AND_ASSIGN(WaylandBuffer);
+@@ -355,6 +361,10 @@ class WaylandBufferManagerHost::Surface {
+ void CompleteSubmission() {
+ DCHECK(submitted_buffer_);
+ auto id = submitted_buffer_->buffer_id;
++
++ auto feedback = std::move(submitted_buffer_->feedback);
++ bool needs_send_feedback = submitted_buffer_->needs_send_feedback;
++
+ prev_submitted_buffer_ = submitted_buffer_;
+ submitted_buffer_ = nullptr;
+ // We can now complete the latest submission. We had to wait for this
+@@ -370,14 +380,21 @@ class WaylandBufferManagerHost::Surface {
+ OnPresentation(id, gfx::PresentationFeedback(
+ base::TimeTicks::Now(), base::TimeDelta(),
+ GetPresentationKindFlags(0)));
++ } else if (needs_send_feedback) {
++ OnPresentation(id, std::move(feedback));
+ }
+ }
+
+ void OnPresentation(uint32_t buffer_id,
+ const gfx::PresentationFeedback& feedback) {
+- // The order of submission and presentation callbacks is checked on the GPU
+- // side, but it must never happen, because the Submission is called
+- // immediately after the buffer is swapped.
++ // The order of submission and presentation callbacks cannot be controlled.
++ // Some Wayland compositors may fire presentation callbacks earlier than we
++ // are able to send submission callbacks is bad. Thus, handle it here.
++ if (submitted_buffer_ && submitted_buffer_->buffer_id == buffer_id) {
++ submitted_buffer_->feedback = feedback;
++ return;
++ }
++
+ buffer_manager_->OnPresentation(window_->GetWidget(), buffer_id, feedback);
+ }
+