Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
meta-nemo
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
NemoMobile
meta-nemo
Commits
b5e5b8bb
Commit
b5e5b8bb
authored
Jun 02, 2017
by
Florent Revest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qtbase: Removes an unneeded patch since Qt 5.9
parent
3c03cae2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
127 deletions
+1
-127
0002-Environment-variable-enabling-the-workaround-FBO-rea.patch
...nvironment-variable-enabling-the-workaround-FBO-rea.patch
+0
-125
qtbase_git.bbappend
recipes-qt/qt5/qtbase_git.bbappend
+1
-2
No files found.
recipes-qt/qt5/qtbase/0002-Environment-variable-enabling-the-workaround-FBO-rea.patch
deleted
100644 → 0
View file @
3c03cae2
From 4423cf82adcc29656867a0dbbcac3165a37f469e Mon Sep 17 00:00:00 2001
From: Marco Martin <mart@kde.org>
Date: Fri, 10 Feb 2017 15:00:23 +0100
Subject: [PATCH] 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
---
src/gui/kernel/qopenglcontext.cpp | 34 ++++++++++++++++++++++
.../android/qandroidplatformopenglcontext.cpp | 31 --------------------
.../android/qandroidplatformopenglcontext.h | 1 -
3 files changed, 34 insertions(+), 32 deletions(-)
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 8aea593bf0..3dc06ae60e 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -982,6 +982,40 @@
bool QOpenGLContext::makeCurrent(QSurface *surface)
QOpenGLContext *previous = QOpenGLContextPrivate::setCurrentContext(this);
if (d->platformGLContext->makeCurrent(surface->surfaceHandle())) {
+ static bool needsWorkaroundSet = false;
+ static bool needsWorkaround = false;
+
+ if (!needsWorkaroundSet) {
+ QByteArray env;
+#ifdef Q_OS_ANDROID
+ env = qgetenv(QByteArrayLiteral("QT_ANDROID_DISABLE_GLYPH_CACHE_WORKAROUND"));
+ needsWorkaround = env.isEmpty() || env == QByteArrayLiteral("0") || env == QByteArrayLiteral("false");
+#endif
+ env = qgetenv(QByteArrayLiteral("QT_ENABLE_GLYPH_CACHE_WORKAROUND"));
+ if (env == QByteArrayLiteral("1") || env == QByteArrayLiteral("true"))
+ needsWorkaround = true;
+
+ if (!needsWorkaround) {
+ const char *rendererString = reinterpret_cast<const char *>(functions()->glGetString(GL_RENDERER));
+ if (rendererString)
+ needsWorkaround =
+ qstrncmp(rendererString, "Mali-4xx", 6) == 0 // Mali-400, Mali-450
+ || qstrncmp(rendererString, "Adreno (TM) 2xx", 13) == 0 // Adreno 200, 203, 205
+ || qstrncmp(rendererString, "Adreno 2xx", 8) == 0 // Same as above but without the '(TM)'
+ || qstrncmp(rendererString, "Adreno (TM) 30x", 14) == 0 // Adreno 302, 305
+ || qstrncmp(rendererString, "Adreno 30x", 9) == 0 // Same as above but without the '(TM)'
+ || qstrncmp(rendererString, "Adreno (TM) 4xx", 13) == 0 // Adreno 405, 418, 420, 430
+ || qstrncmp(rendererString, "Adreno 4xx", 8) == 0 // Same as above but without the '(TM)'
+ || qstrcmp(rendererString, "GC800 core") == 0
+ || qstrcmp(rendererString, "GC1000 core") == 0
+ || qstrcmp(rendererString, "Immersion.16") == 0;
+ }
+ needsWorkaroundSet = true;
+ }
+
+ if (needsWorkaround)
+ d->workaround_brokenFBOReadBack = true;
+
d->surface = surface;
d->shareGroup->d_func()->deletePendingResources(this);
diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
index 2644fa27f6..2801b135fa 100644
--- a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
+++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
@@ -64,34 +64,6 @@
void QAndroidPlatformOpenGLContext::swapBuffers(QPlatformSurface *surface)
QEGLPlatformContext::swapBuffers(surface);
}
-bool QAndroidPlatformOpenGLContext::needsFBOReadBackWorkaround()
-{
- static bool set = false;
- static bool needsWorkaround = false;
-
- if (!set) {
- QByteArray env = qgetenv("QT_ANDROID_DISABLE_GLYPH_CACHE_WORKAROUND");
- needsWorkaround = env.isEmpty() || env == "0" || env == "false";
-
- if (!needsWorkaround) {
- const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
- needsWorkaround =
- qstrncmp(rendererString, "Mali-4xx", 6) == 0 // Mali-400, Mali-450
- || qstrncmp(rendererString, "Adreno (TM) 2xx", 13) == 0 // Adreno 200, 203, 205
- || qstrncmp(rendererString, "Adreno 2xx", 8) == 0 // Same as above but without the '(TM)'
- || qstrncmp(rendererString, "Adreno (TM) 30x", 14) == 0 // Adreno 302, 305
- || qstrncmp(rendererString, "Adreno 30x", 9) == 0 // Same as above but without the '(TM)'
- || qstrcmp(rendererString, "GC800 core") == 0
- || qstrcmp(rendererString, "GC1000 core") == 0
- || qstrcmp(rendererString, "Immersion.16") == 0;
- }
-
- set = true;
- }
-
- return needsWorkaround;
-}
-
bool QAndroidPlatformOpenGLContext::makeCurrent(QPlatformSurface *surface)
{
bool ret = QEGLPlatformContext::makeCurrent(surface);
@@ -101,9 +73,6 @@
bool QAndroidPlatformOpenGLContext::makeCurrent(QPlatformSurface *surface)
if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0)
ctx_d->workaround_missingPrecisionQualifiers = true;
- if (!ctx_d->workaround_brokenFBOReadBack && needsFBOReadBackWorkaround())
- ctx_d->workaround_brokenFBOReadBack = true;
-
return ret;
}
diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.h b/src/plugins/platforms/android/qandroidplatformopenglcontext.h
index 87a0829655..d9c22538a3 100644
--- a/src/plugins/platforms/android/qandroidplatformopenglcontext.h
+++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.h
@@ -55,7 +55,6 @@
public:
private:
EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) override;
- static bool needsFBOReadBackWorkaround();
};
QT_END_NAMESPACE
--
2.11.0
recipes-qt/qt5/qtbase_git.bbappend
View file @
b5e5b8bb
FILESEXTRAPATHS_prepend := "${THISDIR}/qtbase:"
SRC_URI += " file://0001-Forces-GLES2-the-dirty-way.patch \
file://0002-Environment-variable-enabling-the-workaround-FBO-rea.patch"
SRC_URI += " file://0001-Forces-GLES2-the-dirty-way.patch"
# Remove dependencies to mesa
PACKAGECONFIG_remove = "kms"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment