diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-17 20:57:50 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-09-17 20:57:50 +0200 |
commit | a72d34d26e6a02b9d836a9a3ade3d97930818fe6 (patch) | |
tree | 63448fc192275fa107c7cd4ca6957df1688b656a /src/plugins | |
parent | e409eafe23c8f90a01ed198090c2d7df0d07e708 (diff) | |
parent | 209a75f2d071e0977b6c0a8a2ce5d6eb0ff95b8c (diff) |
Merge remote-tracking branch 'origin/5.3.2' into 5.3
Change-Id: Iae36a5178c0411d4d36508e0725e132af390157a
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformopenglcontext.cpp | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp index a352d3ebb8..dfc43f0fa5 100644 --- a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp +++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp @@ -70,16 +70,22 @@ bool QAndroidPlatformOpenGLContext::needsFBOReadBackWorkaround() static bool needsWorkaround = false; if (!set) { - 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; + 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; } |