summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/android/qandroidplatformopenglcontext.cpp')
-rw-r--r--src/plugins/platforms/android/qandroidplatformopenglcontext.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
index d99cafe6b7..59ca69c004 100644
--- a/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
+++ b/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
@@ -42,6 +42,7 @@
#include "qandroidplatformopenglcontext.h"
#include "qandroidplatformopenglwindow.h"
+#include "qandroidplatformintegration.h"
#include <QSurface>
#include <QtGui/private/qopenglcontext_p.h>
@@ -64,12 +65,14 @@ void QAndroidPlatformOpenGLContext::swapBuffers(QPlatformSurface *surface)
bool QAndroidPlatformOpenGLContext::makeCurrent(QPlatformSurface *surface)
{
bool ret = QEGLPlatformContext::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;
}