summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorJames McDonnell <jmcdonnell@blackberry.com>2018-06-01 09:36:37 -0400
committerJames McDonnell <jmcdonnell@blackberry.com>2018-07-01 17:38:40 +0000
commit84ecc17152968f7fafe2de27599fb10589534c78 (patch)
tree65aac18dd86e068cc0ac8dd1a9131557e934a6b5 /src/plugins
parent61dabf97f24159f1a1f6c927b39b5c26c59e6c07 (diff)
QNX: Add the ability to disable EGL_KHR_surfaceless_context use
QML fails to draw when this is used on at least one jacinto6 platform. Works when it's disabled. Task-number: QTBUG-68227 Change-Id: I7b3c081d4d5a4fe22136f4bdd8ad1f34495cd94a Reviewed-by: Adam Treat <adam.treat@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.cpp13
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.cpp4
-rw-r--r--src/plugins/platforms/qnx/qqnxintegration.h3
3 files changed, 18 insertions, 2 deletions
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp
index d4493943e2..2031de308c 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.cpp
+++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "qqnxglcontext.h"
+#include "qqnxintegration.h"
#include "qqnxscreen.h"
#include "qqnxeglwindow.h"
@@ -59,8 +60,18 @@ QT_BEGIN_NAMESPACE
EGLDisplay QQnxGLContext::ms_eglDisplay = EGL_NO_DISPLAY;
+static QEGLPlatformContext::Flags makeFlags()
+{
+ QEGLPlatformContext::Flags result = 0;
+
+ if (!QQnxIntegration::options().testFlag(QQnxIntegration::SurfacelessEGLContext))
+ result |= QEGLPlatformContext::NoSurfaceless;
+
+ return result;
+}
+
QQnxGLContext::QQnxGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share)
- : QEGLPlatformContext(format, share, ms_eglDisplay)
+ : QEGLPlatformContext(format, share, ms_eglDisplay, 0, QVariant(), makeFlags())
{
}
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp
index 6085cd34c0..dc4ebdf699 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.cpp
+++ b/src/plugins/platforms/qnx/qqnxintegration.cpp
@@ -117,6 +117,10 @@ static inline QQnxIntegration::Options parseOptions(const QStringList &paramList
options |= QQnxIntegration::RootWindow;
}
+ if (!paramList.contains(QLatin1String("disable-EGL_KHR_surfaceless_context"))) {
+ options |= QQnxIntegration::SurfacelessEGLContext;
+ }
+
return options;
}
diff --git a/src/plugins/platforms/qnx/qqnxintegration.h b/src/plugins/platforms/qnx/qqnxintegration.h
index f11afa1748..f844a7508c 100644
--- a/src/plugins/platforms/qnx/qqnxintegration.h
+++ b/src/plugins/platforms/qnx/qqnxintegration.h
@@ -81,7 +81,8 @@ public:
NoOptions = 0x0,
FullScreenApplication = 0x1,
RootWindow = 0x2,
- AlwaysFlushScreenContext = 0x4
+ AlwaysFlushScreenContext = 0x4,
+ SurfacelessEGLContext = 0x8
};
Q_DECLARE_FLAGS(Options, Option)
explicit QQnxIntegration(const QStringList &paramList);