summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
diff options
context:
space:
mode:
authorArvid Nilsson <anilsson@blackberry.com>2013-11-12 10:27:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-20 10:33:04 +0100
commit711d0a16580022d9f38a782f269f5cc3af0f3af7 (patch)
treecacb55936e5fc79f499fb9d5d410b956f16003f9 /src/plugins/platforms/qnx/qqnxnativeinterface.cpp
parentf3a4bc17ab4a68941b3c5bf48a9d5288cff2a8b7 (diff)
Add QQnxNativeInterface::nativeResourceForContext
This mechanism is used by QtWebEngine to extract the platform GL context. In the QNX case, the platform context is an EGL context, so the resource you need to ask for is the "eglcontext". Compare to the xcb native interface which has a similar implementation already. Change-Id: I873eaadf96898abb24de347ac624c88cd54254cb Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxnativeinterface.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxnativeinterface.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
index 8958a5c1e2..6e7fc35a82 100644
--- a/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
+++ b/src/plugins/platforms/qnx/qqnxnativeinterface.cpp
@@ -41,9 +41,11 @@
#include "qqnxnativeinterface.h"
+#include "qqnxglcontext.h"
#include "qqnxscreen.h"
#include "qqnxwindow.h"
+#include <QtGui/QOpenGLContext>
#include <QtGui/QScreen>
#include <QtGui/QWindow>
@@ -71,6 +73,14 @@ void *QQnxNativeInterface::nativeResourceForScreen(const QByteArray &resource, Q
return 0;
}
+void *QQnxNativeInterface::nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
+{
+ if (resource == "eglcontext" && context)
+ return static_cast<QQnxGLContext*>(context->handle())->getEglContext();
+
+ return 0;
+}
+
void QQnxNativeInterface::setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value)
{
if (name == QStringLiteral("mmRendererWindowName")) {