Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qt:master commit in: dev-qt/qtdeclarative/, dev-qt/qtdeclarative/files/
Date: Sun, 24 May 2020 22:34:18
Message-Id: 1590359525.94bf4289184ee4f99674091abe08ec9f072dccb3.asturm@gentoo
1 commit: 94bf4289184ee4f99674091abe08ec9f072dccb3
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 24 22:32:05 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun May 24 22:32:05 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/qt.git/commit/?id=94bf4289
7
8 dev-qt/qtdeclarative: Backport fixes from 5.15.1
9
10 - Fix subpixel positioned text
11 QTBUG: https://bugreports.qt.io/browse/QTBUG-49646
12
13 - QQuickItemView: Fix max(X/Y)Extent()
14 KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=419514
15 QTBUG: https://bugreports.qt.io/browse/QTBUG-83890
16
17 Bug: https://bugs.gentoo.org/716992
18 Package-Manager: Portage-2.3.99, Repoman-2.3.22
19 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
20
21 ...ve-5.14.2-QQuickItemView-fix-maxXY-extent.patch | 42 ++++++++++++++
22 ...ative-5.14.2-fix-subpixel-positioned-text.patch | 64 ++++++++++++++++++++++
23 .../qtdeclarative/qtdeclarative-5.15.0_rc2.ebuild | 5 ++
24 3 files changed, 111 insertions(+)
25
26 diff --git a/dev-qt/qtdeclarative/files/qtdeclarative-5.14.2-QQuickItemView-fix-maxXY-extent.patch b/dev-qt/qtdeclarative/files/qtdeclarative-5.14.2-QQuickItemView-fix-maxXY-extent.patch
27 new file mode 100644
28 index 00000000..c9ccb211
29 --- /dev/null
30 +++ b/dev-qt/qtdeclarative/files/qtdeclarative-5.14.2-QQuickItemView-fix-maxXY-extent.patch
31 @@ -0,0 +1,42 @@
32 +From cc5387ad22ca503d167fd66e2429107d45b937af Mon Sep 17 00:00:00 2001
33 +From: David Redondo <qt@×××××××××××××.de>
34 +Date: Wed, 13 May 2020 11:04:23 +0200
35 +Subject: [PATCH] QQuickItemView: Fix max(X/Y)Extent()
36 +
37 +QQuickFlickable maxXExtent() and maxYExtent() return the amount of space
38 +that is not shown when inside a ScrollView. QQuickItemView however just
39 +returned width() if vertical and height() if horizontal. In these cases
40 +just defer to the QQuickFlickable base implementation like minXExtent()
41 +and minYExtent() already do.
42 +
43 +Fixes: QTBUG-83890
44 +Pick-to: 5.15
45 +Change-Id: I7f4060c2f46ae07611bedceca0d322c5f7f6affb
46 +---
47 + src/quick/items/qquickitemview.cpp | 4 ++--
48 + 1 file changed, 2 insertions(+), 2 deletions(-)
49 +
50 +diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp
51 +index 7fb392233e4..ab130ac6857 100644
52 +--- a/src/quick/items/qquickitemview.cpp
53 ++++ b/src/quick/items/qquickitemview.cpp
54 +@@ -1393,7 +1393,7 @@ qreal QQuickItemView::maxYExtent() const
55 + {
56 + Q_D(const QQuickItemView);
57 + if (d->layoutOrientation() == Qt::Horizontal)
58 +- return height();
59 ++ return QQuickFlickable::maxYExtent();
60 +
61 + if (d->vData.maxExtentDirty) {
62 + d->maxExtent = d->maxExtentForAxis(d->vData, false);
63 +@@ -1421,7 +1421,7 @@ qreal QQuickItemView::maxXExtent() const
64 + {
65 + Q_D(const QQuickItemView);
66 + if (d->layoutOrientation() == Qt::Vertical)
67 +- return width();
68 ++ return QQuickFlickable::maxXExtent();
69 +
70 + if (d->hData.maxExtentDirty) {
71 + d->maxExtent = d->maxExtentForAxis(d->hData, true);
72 +--
73 +2.16.3
74
75 diff --git a/dev-qt/qtdeclarative/files/qtdeclarative-5.14.2-fix-subpixel-positioned-text.patch b/dev-qt/qtdeclarative/files/qtdeclarative-5.14.2-fix-subpixel-positioned-text.patch
76 new file mode 100644
77 index 00000000..23eaa7d5
78 --- /dev/null
79 +++ b/dev-qt/qtdeclarative/files/qtdeclarative-5.14.2-fix-subpixel-positioned-text.patch
80 @@ -0,0 +1,64 @@
81 +From e807f9d1d80559b8ff91f1c3cfdd755b3da56a6d Mon Sep 17 00:00:00 2001
82 +From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@××.io>
83 +Date: Tue, 5 May 2020 11:36:24 +0200
84 +Subject: [PATCH] Fix subpixel positioned text with Text.NativeRendering
85 +
86 +We would be generating subpixel positioned glyphs based on the
87 +relative positions of the glyphs, ignoring the fractional part
88 +contributed by the origin of the text. So if the text origin was
89 +inside a pixel, the subpixel antialiasing would be wrong and we
90 +would see kerning errors.
91 +
92 +This was especially visible when using AlignHCenter on text
93 +with hinting disabled and resizing the item it was aligning to.
94 +
95 +Pick-to: 5.15
96 +Task-number: QTBUG-49646
97 +Change-Id: I0e709ba2b5d2440e34c94c6f819befe0a65a113a
98 +Reviewed-by: Lars Knoll <lars.knoll@××.io>
99 +Reviewed-by: Konstantin Ritt <ritt.ks@×××××.com>
100 +---
101 + src/quick/scenegraph/qsgdefaultglyphnode_p.cpp | 9 ++++-----
102 + 1 file changed, 4 insertions(+), 5 deletions(-)
103 +
104 +diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
105 +index cfa645bfd03..f73b64f537f 100644
106 +--- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
107 ++++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
108 +@@ -789,11 +789,12 @@ void QSGTextMaskMaterial::populate(const QPointF &p,
109 + const QMargins &margins)
110 + {
111 + Q_ASSERT(m_font.isValid());
112 ++ QPointF position(p.x(), p.y() - m_font.ascent());
113 + QVector<QFixedPoint> fixedPointPositions;
114 + const int glyphPositionsSize = glyphPositions.size();
115 + fixedPointPositions.reserve(glyphPositionsSize);
116 + for (int i=0; i < glyphPositionsSize; ++i)
117 +- fixedPointPositions.append(QFixedPoint::fromPointF(glyphPositions.at(i)));
118 ++ fixedPointPositions.append(QFixedPoint::fromPointF(position + glyphPositions.at(i)));
119 +
120 + QTextureGlyphCache *cache = glyphCache();
121 +
122 +@@ -815,18 +816,16 @@ void QSGTextMaskMaterial::populate(const QPointF &p,
123 + Q_ASSERT(geometry->sizeOfVertex() == sizeof(QVector4D));
124 + ushort *ip = geometry->indexDataAsUShort();
125 +
126 +- QPointF position(p.x(), p.y() - m_font.ascent());
127 + bool supportsSubPixelPositions = fontD->fontEngine->supportsSubPixelPositions();
128 + for (int i=0; i<glyphIndexes.size(); ++i) {
129 ++ QPointF glyphPosition = glyphPositions.at(i) + position;
130 + QFixed subPixelPosition;
131 + if (supportsSubPixelPositions)
132 +- subPixelPosition = fontD->fontEngine->subPixelPositionForX(QFixed::fromReal(glyphPositions.at(i).x()));
133 ++ subPixelPosition = fontD->fontEngine->subPixelPositionForX(QFixed::fromReal(glyphPosition.x()));
134 +
135 + QTextureGlyphCache::GlyphAndSubPixelPosition glyph(glyphIndexes.at(i), subPixelPosition);
136 + const QTextureGlyphCache::Coord &c = cache->coords.value(glyph);
137 +
138 +- QPointF glyphPosition = glyphPositions.at(i) + position;
139 +-
140 + // On a retina screen the glyph positions are not pre-scaled (as opposed to
141 + // eg. the raster paint engine). To ensure that we get the same behavior as
142 + // the raster engine (and CoreText itself) when it comes to rounding of the
143 +--
144 +2.16.3
145
146 diff --git a/dev-qt/qtdeclarative/qtdeclarative-5.15.0_rc2.ebuild b/dev-qt/qtdeclarative/qtdeclarative-5.15.0_rc2.ebuild
147 index 5e3c49a6..ffc90aff 100644
148 --- a/dev-qt/qtdeclarative/qtdeclarative-5.15.0_rc2.ebuild
149 +++ b/dev-qt/qtdeclarative/qtdeclarative-5.15.0_rc2.ebuild
150 @@ -27,6 +27,11 @@ RDEPEND="${DEPEND}
151 !<dev-qt/qtquickcontrols-5.7:5
152 "
153
154 +PATCHES=(
155 + "${FILESDIR}/${PN}-5.14.2-QQuickItemView-fix-maxXY-extent.patch" # QTBUG-83890
156 + "${FILESDIR}/${PN}-5.14.2-fix-subpixel-positioned-text.patch" # QTBUG-49646
157 +)
158 +
159 src_prepare() {
160 use jit || PATCHES+=("${FILESDIR}/${PN}-5.4.2-disable-jit.patch")