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>bb10
parent
61dabf97f2
commit
84ecc17152
|
|
@ -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())
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -117,6 +117,10 @@ static inline QQnxIntegration::Options parseOptions(const QStringList ¶mList
|
|||
options |= QQnxIntegration::RootWindow;
|
||||
}
|
||||
|
||||
if (!paramList.contains(QLatin1String("disable-EGL_KHR_surfaceless_context"))) {
|
||||
options |= QQnxIntegration::SurfacelessEGLContext;
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 ¶mList);
|
||||
|
|
|
|||
Loading…
Reference in New Issue