Android: use FBO readback workaround by default.

Maintaining a black list of devices can't be reasonably done.
The workaround is now enabled by default. It can be disabled with the
QT_ANDROID_DISABLE_GLYPH_CACHE_WORKAROUND environment variable, in
which case the current list of blacklisted drivers will still be taken
into account.

Task-number: QTBUG-40483
Change-Id: I9b90ab45e86569e8e4679333ddb9b835189892c7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
Yoann Lopes 2014-09-02 15:50:55 +02:00 committed by Jani Heikkinen
parent 9c3a58a913
commit 05670f586f

View File

@ -70,6 +70,10 @@ bool QAndroidPlatformOpenGLContext::needsFBOReadBackWorkaround()
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
@ -80,6 +84,8 @@ bool QAndroidPlatformOpenGLContext::needsFBOReadBackWorkaround()
|| qstrcmp(rendererString, "GC800 core") == 0
|| qstrcmp(rendererString, "GC1000 core") == 0
|| qstrcmp(rendererString, "Immersion.16") == 0;
}
set = true;
}