Work around FBO readback bug on Samsung Galaxy Tab 3
Symptom of the error is garbled text in Qt Quick 2, and the fix has been confirmed to be enabling the texture resize workaround. Task-number: QTBUG-34984 Change-Id: If6f621b43120c7913cbd33ab326c52ad6e2599bc Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>bb10
parent
c2629632cf
commit
909dbb92eb
|
|
@ -82,12 +82,14 @@ void QAndroidOpenGLContext::swapBuffers(QPlatformSurface *surface)
|
|||
bool QAndroidOpenGLContext::makeCurrent(QPlatformSurface *surface)
|
||||
{
|
||||
bool ret = QEglFSContext::makeCurrent(surface);
|
||||
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
|
||||
|
||||
const char *rendererString = reinterpret_cast<const char *>(glGetString(GL_RENDERER));
|
||||
if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0) {
|
||||
QOpenGLContextPrivate *ctx_d = QOpenGLContextPrivate::get(context());
|
||||
if (rendererString != 0 && qstrncmp(rendererString, "Android Emulator", 16) == 0)
|
||||
ctx_d->workaround_missingPrecisionQualifiers = true;
|
||||
}
|
||||
|
||||
if (!ctx_d->workaround_brokenFBOReadBack && QAndroidPlatformIntegration::needsWorkaround())
|
||||
ctx_d->workaround_brokenFBOReadBack = true;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶
|
|||
m_androidSystemLocale = new QAndroidSystemLocale;
|
||||
}
|
||||
|
||||
bool QAndroidPlatformIntegration::needsBasicRenderloopWorkaround()
|
||||
bool QAndroidPlatformIntegration::needsWorkaround()
|
||||
{
|
||||
static bool needsWorkaround =
|
||||
QtAndroid::deviceName().compare(QStringLiteral("samsung SM-T211"), Qt::CaseInsensitive) == 0
|
||||
|
|
@ -140,7 +140,7 @@ bool QAndroidPlatformIntegration::hasCapability(Capability cap) const
|
|||
case NativeWidgets: return false;
|
||||
|
||||
case ThreadedOpenGL:
|
||||
if (needsBasicRenderloopWorkaround())
|
||||
if (needsWorkaround())
|
||||
return false;
|
||||
// fall through
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -145,9 +145,9 @@ public:
|
|||
QEglFSScreen *createScreen() const;
|
||||
#endif
|
||||
|
||||
private:
|
||||
static bool needsBasicRenderloopWorkaround();
|
||||
static bool needsWorkaround();
|
||||
|
||||
private:
|
||||
friend class QEglFSAndroidHooks;
|
||||
|
||||
QTouchDevice *m_touchDevice;
|
||||
|
|
|
|||
Loading…
Reference in New Issue