summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-02-06 14:21:16 +0100
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-02-07 13:07:25 +0100
commita1fe728fa5bd6cb9e50cf317a58efcf4eea4de2c (patch)
tree0798ae897d111147238544826c79243b6f9a48a4 /src/plugins/platforms/android/qandroidplatformopenglcontext.cpp
parent57fe9bd2c6a361cf979d17d962abed5db17a1457 (diff)
parent65bd80ebfc1be81a196a861ade40ff874a3554f0 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/gui/kernel/qguiapplication.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformintegration.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/android/qandroidplatformopenglcontext.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/sql/doc/src/sql-driver.qdoc src/widgets/widgets/qtoolbararealayout.cpp Change-Id: Ifd7e58760c3cb6bd8a7d1dd32ef83b7ec190d41e
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;
}