summaryrefslogtreecommitdiff
path: root/dev-qt
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-03-17 22:52:09 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2022-03-21 12:03:36 +0100
commitcc0b61233fb5f280359588eec8672d0fd248dc56 (patch)
tree8acd536f746214aca42e73d6a0b807b3c7e85014 /dev-qt
parentdev-qt/qtvirtualkeyboard: 5.15.3 version bump (diff)
downloadgentoo-cc0b61233fb5f280359588eec8672d0fd248dc56.tar.gz
gentoo-cc0b61233fb5f280359588eec8672d0fd248dc56.tar.bz2
gentoo-cc0b61233fb5f280359588eec8672d0fd248dc56.zip
dev-qt/qtwayland: 5.15.3 version bump
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'dev-qt')
-rw-r--r--dev-qt/qtwayland/Manifest2
-rw-r--r--dev-qt/qtwayland/files/qtwayland-5.15.3-QTBUG-90037-QTBUG-91264.patch131
-rw-r--r--dev-qt/qtwayland/qtwayland-5.15.3.ebuild51
3 files changed, 184 insertions, 0 deletions
diff --git a/dev-qt/qtwayland/Manifest b/dev-qt/qtwayland/Manifest
index c5f631739822..8a755b3fdabc 100644
--- a/dev-qt/qtwayland/Manifest
+++ b/dev-qt/qtwayland/Manifest
@@ -1,2 +1,4 @@
DIST qtwayland-5.15.2-867540b9.tar.gz 830061 BLAKE2B b831288d6a3e671631b4df00eb1edb72e35128f3ed5a73983b3e15193f554fddcd0337deb832d44b795d2e37f0601fe35b8b0fcb5986bcc44154d172f3a54193 SHA512 b834802811d9f65559ef5e7468189b53c666e390aa09edeb490e5fee2dece13082b11da0f8b5924b89f7dc8e1eba375a485940f4dfbf0445f3d1e96033e33f24
DIST qtwayland-5.15.2-d6a6b727.tar.gz 831439 BLAKE2B 430f7c8570f9941e80db68f63efa9669f40d045e8df8820ec8653152938078b91d8d68b76667c6c01cc83cfca3f3b0ea67b6fdee6230e04fd091dcaaed4400bc SHA512 a2314f31c979594c4bd46fe8f1ac44d3391e45e6fedef44eaac5fb8700d1b32ac992f3e9d17e2453f0311038979a2bf8fabb14ea887525e16fb210307844c71d
+DIST qtwayland-5.15.3-gentoo-kde-1.tar.xz 34944 BLAKE2B e2113d9351b9c773d2a946a5593657dda7d62b8022190ac10527dea4324951aa486b66e2a461d45d583c3b316b4be6e60d391ceed49dfbc5adb5d4e164e9d763 SHA512 80ae360d3be2c0a63d2161b76bbc5e90a45c39841f8642162bc5da1236a3af7016a2899775ed79c8144d17dcb80f84fa8d05cfc69090ed7a69b72edf4d69bcff
+DIST qtwayland-everywhere-opensource-src-5.15.3.tar.xz 565004 BLAKE2B bc146caf77d42436dcb599df8d2aea422ac8717151dee91b9be129b97902d5af274dec90bd5ffceef62512515e5cf57a61ab773cfc6c13742a6cc5d9b6f72726 SHA512 0a9768282170709050490fb1b9daef59c21c8b5c4785f56a452d7954ffb6f016ec836022693941c99c5c10b2c3c55c75ba37fdad09dd1e0cde627f8b87b90c89
diff --git a/dev-qt/qtwayland/files/qtwayland-5.15.3-QTBUG-90037-QTBUG-91264.patch b/dev-qt/qtwayland/files/qtwayland-5.15.3-QTBUG-90037-QTBUG-91264.patch
new file mode 100644
index 000000000000..8bffa3e08b3e
--- /dev/null
+++ b/dev-qt/qtwayland/files/qtwayland-5.15.3-QTBUG-90037-QTBUG-91264.patch
@@ -0,0 +1,131 @@
+From d7b34dbf072236cdfb3b64e5ad26d1ff29dfec5f Mon Sep 17 00:00:00 2001
+From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
+Date: Thu, 22 Apr 2021 08:42:33 +0200
+Subject: client: Gracefully handle shutdown and window hiding
+
+When a window is hidden or destroyed, the render thread may already
+be rendering. We need to properly read-lock the surface pointer
+when it is in use and exit when it becomes null.
+
+Note that there is also a potential crash in the Mesa GL driver
+where it keeps a proxy to the wl_surface, so if we delete this
+while we are still rendering, it can crash inside the driver.
+This is not addressed by this patch, and has not been reproduced
+on any other drivers so far.
+
+[ChangeLog][Client] Fixed a crash that could happen when hiding
+or closing windows while Qt Quick was actively rendering on
+a different thread.
+
+Pick-to: 6.0 6.1 5.15
+Fixes: QTBUG-91264
+Fixes: QTBUG-90037
+Task-number: QTBUG-92249
+Change-Id: I029b123b83c58740321e8b90a463ced748d8bcf4
+Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
+Reviewed-by: David Edmundson <davidedmundson@kde.org>
+(cherry picked from commit b19b0fbaf775e8b8eda1e03c265a5393d618c6c0)
+---
+ src/client/qwaylandwindow.cpp | 17 ++++++++++++++++-
+ src/client/qwaylandwindow_p.h | 2 +-
+ .../client/wayland-egl/qwaylandglcontext.cpp | 1 -
+ 3 files changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
+index 494911b3..0d849b57 100644
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -414,6 +414,7 @@ void QWaylandWindow::closePopups(QWaylandWindow *parent)
+
+ QPlatformScreen *QWaylandWindow::calculateScreenFromSurfaceEvents() const
+ {
++ QReadLocker lock(&mSurfaceLock);
+ if (mSurface) {
+ if (auto *screen = mSurface->oldestEnteredScreen())
+ return screen;
+@@ -552,6 +553,10 @@ void QWaylandWindow::sendRecursiveExposeEvent()
+
+ void QWaylandWindow::attach(QWaylandBuffer *buffer, int x, int y)
+ {
++ QReadLocker locker(&mSurfaceLock);
++ if (mSurface == nullptr)
++ return;
++
+ if (buffer) {
+ Q_ASSERT(!buffer->committed());
+ handleUpdate();
+@@ -571,6 +576,10 @@ void QWaylandWindow::attachOffset(QWaylandBuffer *buffer)
+
+ void QWaylandWindow::damage(const QRect &rect)
+ {
++ QReadLocker locker(&mSurfaceLock);
++ if (mSurface == nullptr)
++ return;
++
+ const int s = scale();
+ if (mDisplay->compositorVersion() >= 4)
+ mSurface->damage_buffer(s * rect.x(), s * rect.y(), s * rect.width(), s * rect.height());
+@@ -605,6 +614,8 @@ void QWaylandWindow::commit(QWaylandBuffer *buffer, const QRegion &damage)
+ qCDebug(lcWaylandBackingstore) << "Buffer already committed, ignoring.";
+ return;
+ }
++
++ QReadLocker locker(&mSurfaceLock);
+ if (!mSurface)
+ return;
+
+@@ -624,7 +635,9 @@ void QWaylandWindow::commit(QWaylandBuffer *buffer, const QRegion &damage)
+
+ void QWaylandWindow::commit()
+ {
+- mSurface->commit();
++ QReadLocker locker(&mSurfaceLock);
++ if (mSurface != nullptr)
++ mSurface->commit();
+ }
+
+ const wl_callback_listener QWaylandWindow::callbackListener = {
+@@ -725,6 +738,7 @@ QPointF QWaylandWindow::mapFromWlSurface(const QPointF &surfacePosition) const
+
+ wl_surface *QWaylandWindow::wlSurface()
+ {
++ QReadLocker locker(&mSurfaceLock);
+ return mSurface ? mSurface->object() : nullptr;
+ }
+
+@@ -749,6 +763,7 @@ QWaylandScreen *QWaylandWindow::waylandScreen() const
+
+ void QWaylandWindow::handleContentOrientationChange(Qt::ScreenOrientation orientation)
+ {
++ QReadLocker locker(&mSurfaceLock);
+ if (mDisplay->compositorVersion() < 2)
+ return;
+
+diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
+index d45980a8..54ac67a9 100644
+--- a/src/client/qwaylandwindow_p.h
++++ b/src/client/qwaylandwindow_p.h
+@@ -288,7 +288,7 @@ private:
+
+ static QWaylandWindow *mMouseGrab;
+
+- QReadWriteLock mSurfaceLock;
++ mutable QReadWriteLock mSurfaceLock;
+
+ friend class QWaylandSubSurface;
+ };
+diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+index 683fe123..8f12736d 100644
+--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
++++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+@@ -192,7 +192,6 @@ public:
+ }
+ void blit(QWaylandEglWindow *window)
+ {
+- Q_ASSERT(window->wlSurface());
+ QOpenGLTextureCache *cache = QOpenGLTextureCache::cacheForContext(m_context->context());
+
+ QSize surfaceSize = window->surfaceSize();
+--
+2.35.0
+
diff --git a/dev-qt/qtwayland/qtwayland-5.15.3.ebuild b/dev-qt/qtwayland/qtwayland-5.15.3.ebuild
new file mode 100644
index 000000000000..bf1a290f2e8f
--- /dev/null
+++ b/dev-qt/qtwayland/qtwayland-5.15.3.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+QT5_KDEPATCHSET_REV=1
+inherit qt5-build
+
+DESCRIPTION="Wayland platform plugin for Qt"
+SLOT=5/${QT5_PV} # bug 815646
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+IUSE="vulkan X"
+
+DEPEND="
+ dev-libs/wayland
+ =dev-qt/qtcore-${QT5_PV}*:5=
+ =dev-qt/qtdeclarative-${QT5_PV}*:5=
+ =dev-qt/qtgui-${QT5_PV}*:5=[egl,libinput,vulkan=,X?]
+ media-libs/libglvnd
+ vulkan? ( dev-util/vulkan-headers )
+ X? (
+ =dev-qt/qtgui-${QT5_PV}*[-gles2-only]
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+ dev-util/wayland-scanner
+"
+
+PATCHES=( "${FILESDIR}/${P}-QTBUG-90037-QTBUG-91264.patch" ) # upstream pending
+
+src_configure() {
+ local myqmakeargs=(
+ --
+ $(qt_use vulkan feature-wayland-vulkan-server-buffer)
+ $(qt_use X feature-xcomposite-egl)
+ $(qt_use X feature-xcomposite-glx)
+ )
+ qt5-build_src_configure
+}
+
+src_install() {
+ qt5-build_src_install
+ rm "${D}${QT5_BINDIR}"/qtwaylandscanner || die
+}