1 |
commit: edec91eb45321a028ed914292879eb240edae7e7 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 28 23:59:16 2023 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 29 00:12:14 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edec91eb |
7 |
|
8 |
kde-frameworks/plasma: Adjust fade animation to not flicker as much |
9 |
|
10 |
Upstream commit 3fcd43a6ed03d0aff188dfc190cc464c34302a1f |
11 |
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=463061 |
12 |
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=463685 |
13 |
|
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
...sma-5.102.0-fix-flicker-on-fade-animation.patch | 44 +++++++++++++ |
17 |
kde-frameworks/plasma/plasma-5.102.0-r2.ebuild | 72 ++++++++++++++++++++++ |
18 |
2 files changed, 116 insertions(+) |
19 |
|
20 |
diff --git a/kde-frameworks/plasma/files/plasma-5.102.0-fix-flicker-on-fade-animation.patch b/kde-frameworks/plasma/files/plasma-5.102.0-fix-flicker-on-fade-animation.patch |
21 |
new file mode 100644 |
22 |
index 000000000000..1c6ddab618aa |
23 |
--- /dev/null |
24 |
+++ b/kde-frameworks/plasma/files/plasma-5.102.0-fix-flicker-on-fade-animation.patch |
25 |
@@ -0,0 +1,44 @@ |
26 |
+From 3fcd43a6ed03d0aff188dfc190cc464c34302a1f Mon Sep 17 00:00:00 2001 |
27 |
+From: Arjen Hiemstra <ahiemstra@×××××.nl> |
28 |
+Date: Tue, 10 Jan 2023 12:46:20 +0100 |
29 |
+Subject: [PATCH] iconitem: Adjust fade animation to not flicker as much |
30 |
+ |
31 |
+As it turns out, mix(old texture, new texture, animation value) does |
32 |
+actually result in a different visual from simply blending the two |
33 |
+textures on top of each other, because the old texture first gets |
34 |
+blended with the underlying color. This results in some of the |
35 |
+underlying color bleeding through, which can cause flickering if the two |
36 |
+textures are almost the same. To avoid this, change the animation |
37 |
+slightly so that rather than crossfading, we first fade in the new |
38 |
+texture then fade out the old texture. This doesn't cause a whole lot of |
39 |
+visual difference for two completely different textures, but removes the |
40 |
+flickering when they are very similar. |
41 |
+ |
42 |
+BUG: 463061 |
43 |
+BUG: 463685 |
44 |
+--- |
45 |
+ src/declarativeimports/core/iconitem.cpp | 8 ++++++-- |
46 |
+ 1 file changed, 6 insertions(+), 2 deletions(-) |
47 |
+ |
48 |
+diff --git a/src/declarativeimports/core/iconitem.cpp b/src/declarativeimports/core/iconitem.cpp |
49 |
+index de1f56c69..a474a72f9 100644 |
50 |
+--- a/src/declarativeimports/core/iconitem.cpp |
51 |
++++ b/src/declarativeimports/core/iconitem.cpp |
52 |
+@@ -645,8 +645,12 @@ QSGNode *IconItem::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *update |
53 |
+ m_textureChanged = true; |
54 |
+ } |
55 |
+ |
56 |
+- updateSubtree(oldNode->firstChild(), 1.0 - m_animValue); |
57 |
+- updateSubtree(oldNode->lastChild(), m_animValue); |
58 |
++ // Rather than doing a perfect crossfade, first fade in the new texture |
59 |
++ // then fade out the old texture. This is done to avoid the underlying |
60 |
++ // color bleeding through when both textures are at ~0.5 opacity, which |
61 |
++ // causes flickering if the two textures are very similar. |
62 |
++ updateSubtree(oldNode->firstChild(), 2.0 - m_animValue * 2.0); |
63 |
++ updateSubtree(oldNode->lastChild(), m_animValue * 2.0); |
64 |
+ } else { |
65 |
+ if (oldNode->childCount() == 0) { |
66 |
+ oldNode->appendChildNode(createSubtree(1.0)); |
67 |
+-- |
68 |
+GitLab |
69 |
+ |
70 |
|
71 |
diff --git a/kde-frameworks/plasma/plasma-5.102.0-r2.ebuild b/kde-frameworks/plasma/plasma-5.102.0-r2.ebuild |
72 |
new file mode 100644 |
73 |
index 000000000000..19a29410133d |
74 |
--- /dev/null |
75 |
+++ b/kde-frameworks/plasma/plasma-5.102.0-r2.ebuild |
76 |
@@ -0,0 +1,72 @@ |
77 |
+# Copyright 1999-2023 Gentoo Authors |
78 |
+# Distributed under the terms of the GNU General Public License v2 |
79 |
+ |
80 |
+EAPI=8 |
81 |
+ |
82 |
+KDE_ORG_NAME="${PN}-framework" |
83 |
+PVCUT=$(ver_cut 1-2) |
84 |
+QTMIN=5.15.5 |
85 |
+VIRTUALX_REQUIRED="test" |
86 |
+inherit ecm frameworks.kde.org |
87 |
+ |
88 |
+DESCRIPTION="Plasma framework" |
89 |
+ |
90 |
+LICENSE="LGPL-2+" |
91 |
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" |
92 |
+IUSE="gles2-only man wayland" |
93 |
+ |
94 |
+RESTRICT="test" |
95 |
+ |
96 |
+# kde-frameworks/kwindowsystem[X]: Unconditional use of KX11Extras |
97 |
+RDEPEND=" |
98 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
99 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5 |
100 |
+ >=dev-qt/qtgui-${QTMIN}:5[gles2-only=,X] |
101 |
+ >=dev-qt/qtquickcontrols-${QTMIN}:5 |
102 |
+ >=dev-qt/qtsql-${QTMIN}:5 |
103 |
+ >=dev-qt/qtsvg-${QTMIN}:5 |
104 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
105 |
+ >=dev-qt/qtx11extras-${QTMIN}:5 |
106 |
+ =kde-frameworks/kactivities-${PVCUT}*:5 |
107 |
+ =kde-frameworks/karchive-${PVCUT}*:5 |
108 |
+ =kde-frameworks/kconfig-${PVCUT}*:5[qml] |
109 |
+ =kde-frameworks/kconfigwidgets-${PVCUT}*:5 |
110 |
+ =kde-frameworks/kcoreaddons-${PVCUT}*:5 |
111 |
+ =kde-frameworks/kdeclarative-${PVCUT}*:5 |
112 |
+ =kde-frameworks/kglobalaccel-${PVCUT}*:5 |
113 |
+ =kde-frameworks/kguiaddons-${PVCUT}*:5 |
114 |
+ =kde-frameworks/ki18n-${PVCUT}*:5 |
115 |
+ =kde-frameworks/kiconthemes-${PVCUT}*:5 |
116 |
+ =kde-frameworks/kio-${PVCUT}*:5 |
117 |
+ =kde-frameworks/kirigami-${PVCUT}*:5 |
118 |
+ =kde-frameworks/knotifications-${PVCUT}*:5 |
119 |
+ =kde-frameworks/kpackage-${PVCUT}*:5 |
120 |
+ =kde-frameworks/kservice-${PVCUT}*:5 |
121 |
+ =kde-frameworks/kwidgetsaddons-${PVCUT}*:5 |
122 |
+ =kde-frameworks/kwindowsystem-${PVCUT}*:5[X] |
123 |
+ =kde-frameworks/kxmlgui-${PVCUT}*:5 |
124 |
+ x11-libs/libX11 |
125 |
+ x11-libs/libxcb |
126 |
+ !gles2-only? ( media-libs/libglvnd[X] ) |
127 |
+ wayland? ( |
128 |
+ =kde-frameworks/kwayland-${PVCUT}*:5 |
129 |
+ media-libs/libglvnd |
130 |
+ ) |
131 |
+" |
132 |
+DEPEND="${RDEPEND} |
133 |
+ x11-base/xorg-proto |
134 |
+" |
135 |
+BDEPEND="man? ( >=kde-frameworks/kdoctools-${PVCUT}:5 )" |
136 |
+ |
137 |
+PATCHES=( "${FILESDIR}/${P}-fix-flicker-on-fade-animation.patch" ) # KDE-bug 463061, 463685 |
138 |
+ |
139 |
+src_configure() { |
140 |
+ local mycmakeargs=( |
141 |
+ $(cmake_use_find_package !gles2-only OpenGL) |
142 |
+ $(cmake_use_find_package man KF5DocTools) |
143 |
+ $(cmake_use_find_package wayland EGL) |
144 |
+ $(cmake_use_find_package wayland KF5Wayland) |
145 |
+ ) |
146 |
+ |
147 |
+ ecm_src_configure |
148 |
+} |