[neon/qt6/qt6-declarative/Neon/release] debian/patches: add patch recommended by david e backported from git https://codereview.qt-project.org/c/qt/qtdeclarative/+/483751

Jonathan Esk-Riddell null at kde.org
Tue Jun 20 11:26:54 BST 2023


Git commit 7d5059e2aefea6785c3812fb7bb0b08f71765e43 by Jonathan Esk-Riddell.
Committed on 20/06/2023 at 10:26.
Pushed by jriddell into branch 'Neon/release'.

add patch recommended by david e backported from git https://codereview.qt-project.org/c/qt/qtdeclarative/+/483751

A  +47   -0    debian/patches/935c60a.diff
A  +1    -0    debian/patches/series

https://invent.kde.org/neon/qt6/qt6-declarative/-/commit/7d5059e2aefea6785c3812fb7bb0b08f71765e43

diff --git a/debian/patches/935c60a.diff b/debian/patches/935c60a.diff
new file mode 100644
index 0000000..b3ccb92
--- /dev/null
+++ b/debian/patches/935c60a.diff
@@ -0,0 +1,47 @@
+From 935c60a93b3196809587d8168525f49b96ae216b Mon Sep 17 00:00:00 2001
+From: David Edmundson <davidedmundson at kde.org>
+Date: Wed, 07 Jun 2023 16:59:20 +0100
+Subject: [PATCH] Match fontEngine glyph cache key to lifespan of owner
+
+The glyph cache key is based on the RHI instance. We clean up the font
+cache when the QSGRenderContext is deleted.
+
+For a regular QQuickWindow this is effectively the same. For a
+QQuickWidget the RHI instance has a lifespan of the parent widget, but
+the render context changes.
+
+Task-number: QTBUG-113426
+Task-number: QTBUG-112306
+Change-Id: Ifd901ace6caaff9a08352901956865f5f58e06ef
+Reviewed-by: Laszlo Agocs <laszlo.agocs at qt.io>
+(cherry picked from commit cc4fbbc5ef208ef22c94b1b034173edffacafe19)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot at qt-project.org>
+---
+
+diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
+index 43a7e91..1896c11 100644
+--- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
++++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
+@@ -408,7 +408,8 @@
+         qreal devicePixelRatio;
+         void *cacheKey;
+         Q_ASSERT(m_rhi);
+-        cacheKey = m_rhi;
++        Q_ASSERT(m_rc);
++        cacheKey = m_rc;
+         // Get the dpr the modern way. This value retrieved via the
+         // rendercontext matches what RenderState::devicePixelRatio()
+         // exposes to the material shaders later on.
+diff --git a/src/quick/scenegraph/qsgdefaultrendercontext.cpp b/src/quick/scenegraph/qsgdefaultrendercontext.cpp
+index cd0a5b6..4621969 100644
+--- a/src/quick/scenegraph/qsgdefaultrendercontext.cpp
++++ b/src/quick/scenegraph/qsgdefaultrendercontext.cpp
+@@ -110,7 +110,7 @@
+     // sequence. (see qsgdefaultglyphnode_p.cpp's init())
+     for (QSet<QFontEngine *>::const_iterator it = m_fontEnginesToClean.constBegin(),
+          end = m_fontEnginesToClean.constEnd(); it != end; ++it) {
+-        (*it)->clearGlyphCache(m_rhi);
++        (*it)->clearGlyphCache(this);
+         if (!(*it)->ref.deref())
+             delete *it;
+     }
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5bc4e18
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+935c60a.diff


More information about the Neon-commits mailing list