diff options
author | Liang Qi <liang.qi@qt.io> | 2017-04-06 12:52:28 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2017-04-06 14:35:54 +0000 |
commit | c50f6a832916c573a631b1b060e764705fe50434 (patch) | |
tree | 3c32a7d6986611d9333f320e1c6569cf481a276b /src/plugins/platforms/android | |
parent | 60f6e4428fd8ec1cc2fd619b20d94a08e953af46 (diff) | |
parent | 0fc569184cf0fb6663e955e68bfa14baf3f3fe0d (diff) |
Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9
Diffstat (limited to 'src/plugins/platforms/android')
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformopenglcontext.cpp | 31 | ||||
-rw-r--r-- | src/plugins/platforms/android/qandroidplatformopenglcontext.h | 1 |
2 files changed, 0 insertions, 32 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp index d3810329c5..89ac0cbd93 100644 --- a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp +++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp @@ -67,42 +67,11 @@ 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); QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context()); - 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 3897b3166b..8e65b4cc36 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 |