From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 57D8815808B for ; Mon, 21 Mar 2022 11:27:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9A671E088C; Mon, 21 Mar 2022 11:27:20 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 72988E088C for ; Mon, 21 Mar 2022 11:27:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B8D51343060 for ; Mon, 21 Mar 2022 11:27:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5A9A6177 for ; Mon, 21 Mar 2022 11:27:18 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1647862024.fda08f4f2fb7a2bdb484cbd67bebc8aac162f679.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwayland/, dev-qt/qtwayland/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-qt/qtwayland/files/qtwayland-5.15.3-QTBUG-90037-QTBUG-91264.patch dev-qt/qtwayland/qtwayland-5.15.3.ebuild X-VCS-Directories: dev-qt/qtwayland/ dev-qt/qtwayland/files/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: fda08f4f2fb7a2bdb484cbd67bebc8aac162f679 X-VCS-Branch: master Date: Mon, 21 Mar 2022 11:27:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: b4770a8d-3659-4c0d-aeea-7638232c11f9 X-Archives-Hash: a013701c9048120530a4e172b2b70f3e commit: fda08f4f2fb7a2bdb484cbd67bebc8aac162f679 Author: Andreas Sturmlechner gentoo org> AuthorDate: Mon Mar 21 11:27:04 2022 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Mon Mar 21 11:27:04 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fda08f4f dev-qt/qtwayland: Cleanup duplicate patch file Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner gentoo.org> .../qtwayland-5.15.3-QTBUG-90037-QTBUG-91264.patch | 131 --------------------- dev-qt/qtwayland/qtwayland-5.15.3.ebuild | 2 +- 2 files changed, 1 insertion(+), 132 deletions(-) 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 deleted file mode 100644 index 8bffa3e08b3e..000000000000 --- a/dev-qt/qtwayland/files/qtwayland-5.15.3-QTBUG-90037-QTBUG-91264.patch +++ /dev/null @@ -1,131 +0,0 @@ -From d7b34dbf072236cdfb3b64e5ad26d1ff29dfec5f Mon Sep 17 00:00:00 2001 -From: Eskil Abrahamsen Blomfeldt -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 -Reviewed-by: David Edmundson -(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 index bf1a290f2e8f..148e79fc7b31 100644 --- a/dev-qt/qtwayland/qtwayland-5.15.3.ebuild +++ b/dev-qt/qtwayland/qtwayland-5.15.3.ebuild @@ -33,7 +33,7 @@ BDEPEND=" dev-util/wayland-scanner " -PATCHES=( "${FILESDIR}/${P}-QTBUG-90037-QTBUG-91264.patch" ) # upstream pending +PATCHES=( "${FILESDIR}/${PN}-5.15.2-QTBUG-90037-QTBUG-91264.patch" ) # upstream pending src_configure() { local myqmakeargs=(