summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berton <fabio.berton@ossystems.com.br>2017-12-05 16:51:09 -0200
committerOtavio Salvador <otavio@ossystems.com.br>2017-12-12 09:53:38 -0200
commit18daae47bd0d517f2e577654690636436d2add63 (patch)
tree969ebce252e45304c89f2b35cceb519e7f595a7f
parent470cd54e44913f81c76538641bbdd80574624677 (diff)
downloadmeta-freescale-18daae47bd0d517f2e577654690636436d2add63.tar.gz
qtbase: Remove upstream applied patch
This patch was applied on qtbase commit: commit 9ae028f507a22bd03c861e9d14c2efc4aa2efeda Author: Marco Martin <mart@kde.org> Date: Fri Feb 10 15:00:23 2017 +0100 Environment variable enabling the workaround FBO readback bug On some ARM devices the font glyph generation is broken Add an environment variable to enable workaround_brokenFBOReadBack in QOpenGLContext, to fix font rendering on such devices as Mali and Adreno Change-Id: I9cc99ecb8b71a35bc369ec9dd11b877016b1179e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Change-Id: I0aec7ed2941b22aa2a0ea7638a5523a25c47fbd1 Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/Environment-variable-enabling-the-workaround-FBO-rea.patch134
-rw-r--r--dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend1
2 files changed, 0 insertions, 135 deletions
diff --git a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/Environment-variable-enabling-the-workaround-FBO-rea.patch b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/Environment-variable-enabling-the-workaround-FBO-rea.patch
deleted file mode 100644
index a056c8ed..00000000
--- a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase/Environment-variable-enabling-the-workaround-FBO-rea.patch
+++ /dev/null
@@ -1,134 +0,0 @@
1From 068c13d7f561f3bd88facb14093cdc88fe1b50f2 Mon Sep 17 00:00:00 2001
2From: Marco Martin <mart@kde.org>
3Date: Fri, 10 Feb 2017 15:00:23 +0100
4Subject: [PATCH] Environment variable enabling the workaround FBO readback bug
5Organization: O.S. Systems Software LTDA.
6
7On some ARM devices the font glyph generation is broken
8Add an environment variable to enable workaround_brokenFBOReadBack
9in QOpenGLContext, to fix font rendering on such devices as
10Mali and Adreno
11
12Change-Id: I9cc99ecb8b71a35bc369ec9dd11b877016b1179e
13---
14 src/gui/kernel/qopenglcontext.cpp | 34 ++++++++++++++++++++++
15 .../android/qandroidplatformopenglcontext.cpp | 31 --------------------
16 .../android/qandroidplatformopenglcontext.h | 1 -
17 3 files changed, 34 insertions(+), 32 deletions(-)
18
19diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
20index 0f7bbfd2e1..2b0b1f7ff1 100644
21--- a/src/gui/kernel/qopenglcontext.cpp
22+++ b/src/gui/kernel/qopenglcontext.cpp
23@@ -951,6 +951,7 @@ GLuint QOpenGLContext::defaultFramebufferObject() const
24 bool QOpenGLContext::makeCurrent(QSurface *surface)
25 {
26 Q_D(QOpenGLContext);
27+
28 if (!isValid())
29 return false;
30
31@@ -972,6 +973,39 @@ bool QOpenGLContext::makeCurrent(QSurface *surface)
32 QOpenGLContext *previous = QOpenGLContextPrivate::setCurrentContext(this);
33
34 if (d->platformGLContext->makeCurrent(surface->surfaceHandle())) {
35+ static bool needsWorkaroundSet = false;
36+ static bool needsWorkaround = false;
37+
38+ if (!needsWorkaroundSet) {
39+#ifdef Q_OS_ANDROID
40+ const QByteArray env = qgetenv("QT_ANDROID_DISABLE_GLYPH_CACHE_WORKAROUND");
41+ needsWorkaround = env.isEmpty() || env == "0" || env == "false";
42+#endif
43+ QByteArray env = qgetenv("QT_ENABLE_GLYPH_CACHE_WORKAROUND");
44+ if (env == "1" || env == "true")
45+ needsWorkaround = true;
46+
47+ if (!needsWorkaround) {
48+ const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
49+ if (rendererString)
50+ needsWorkaround =
51+ qstrncmp(rendererString, "Mali-4xx", 6) == 0 // Mali-400, Mali-450
52+ || qstrncmp(rendererString, "Adreno (TM) 2xx", 13) == 0 // Adreno 200, 203, 205
53+ || qstrncmp(rendererString, "Adreno 2xx", 8) == 0 // Same as above but without the '(TM)'
54+ || qstrncmp(rendererString, "Adreno (TM) 30x", 14) == 0 // Adreno 302, 305
55+ || qstrncmp(rendererString, "Adreno 30x", 9) == 0 // Same as above but without the '(TM)'
56+ || qstrncmp(rendererString, "Adreno (TM) 4xx", 13) == 0 // Adreno 405, 418, 420, 430
57+ || qstrncmp(rendererString, "Adreno 4xx", 8) == 0 // Same as above but without the '(TM)'
58+ || qstrcmp(rendererString, "GC800 core") == 0
59+ || qstrcmp(rendererString, "GC1000 core") == 0
60+ || qstrcmp(rendererString, "Immersion.16") == 0;
61+ }
62+ needsWorkaroundSet = true;
63+ }
64+
65+ if (needsWorkaround)
66+ d->workaround_brokenFBOReadBack = true;
67+
68 d->surface = surface;
69
70 d->shareGroup->d_func()->deletePendingResources(this);
71diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
72index 80693acf88..3edfd34f9a 100644
73--- a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
74+++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
75@@ -64,34 +64,6 @@ void QAndroidPlatformOpenGLContext::swapBuffers(QPlatformSurface *surface)
76 QEGLPlatformContext::swapBuffers(surface);
77 }
78
79-bool QAndroidPlatformOpenGLContext::needsFBOReadBackWorkaround()
80-{
81- static bool set = false;
82- static bool needsWorkaround = false;
83-
84- if (!set) {
85- QByteArray env = qgetenv("QT_ANDROID_DISABLE_GLYPH_CACHE_WORKAROUND");
86- needsWorkaround = env.isEmpty() || env == "0" || env == "false";
87-
88- if (!needsWorkaround) {
89- const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
90- needsWorkaround =
91- qstrncmp(rendererString, "Mali-4xx", 6) == 0 // Mali-400, Mali-450
92- || qstrncmp(rendererString, "Adreno (TM) 2xx", 13) == 0 // Adreno 200, 203, 205
93- || qstrncmp(rendererString, "Adreno 2xx", 8) == 0 // Same as above but without the '(TM)'
94- || qstrncmp(rendererString, "Adreno (TM) 30x", 14) == 0 // Adreno 302, 305
95- || qstrncmp(rendererString, "Adreno 30x", 9) == 0 // Same as above but without the '(TM)'
96- || qstrcmp(rendererString, "GC800 core") == 0
97- || qstrcmp(rendererString, "GC1000 core") == 0
98- || qstrcmp(rendererString, "Immersion.16") == 0;
99- }
100-
101- set = true;
102- }
103-
104- return needsWorkaround;
105-}
106-
107 bool QAndroidPlatformOpenGLContext::makeCurrent(QPlatformSurface *surface)
108 {
109 bool ret = QEGLPlatformContext::makeCurrent(surface);
110@@ -101,9 +73,6 @@ bool QAndroidPlatformOpenGLContext::makeCurrent(QPlatformSurface *surface)
111 if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0)
112 ctx_d->workaround_missingPrecisionQualifiers = true;
113
114- if (!ctx_d->workaround_brokenFBOReadBack && needsFBOReadBackWorkaround())
115- ctx_d->workaround_brokenFBOReadBack = true;
116-
117 return ret;
118 }
119
120diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.h b/src/plugins/platforms/android/qandroidplatformopenglcontext.h
121index c88dbf327b..e0eaae6b16 100644
122--- a/src/plugins/platforms/android/qandroidplatformopenglcontext.h
123+++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.h
124@@ -55,7 +55,6 @@ public:
125 private:
126 virtual EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface);
127
128- static bool needsFBOReadBackWorkaround();
129 };
130
131 QT_END_NAMESPACE
132--
1332.12.0
134
diff --git a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
index a0bb301f..061f9675 100644
--- a/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
+++ b/dynamic-layers/qt5-layer/recipes-qt/qt5/qtbase_%.bbappend
@@ -5,7 +5,6 @@
5 5
6FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 6FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
7 7
8SRC_URI_append_use-mainline-bsp = " file://Environment-variable-enabling-the-workaround-FBO-rea.patch"
9SRC_URI_append_imxgpu2d = "file://0014-Add-IMX-GPU-support.patch \ 8SRC_URI_append_imxgpu2d = "file://0014-Add-IMX-GPU-support.patch \
10 file://0001-egl.prf-Fix-build-error-when-egl-headers-need-platfo.patch \ 9 file://0001-egl.prf-Fix-build-error-when-egl-headers-need-platfo.patch \
11" 10"