summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZeno Albisser <zeno.albisser@digia.com>2014-03-10 14:43:08 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-13 18:00:04 +0100
commit55eec6829e8e673e348b015ad4c22da971807933 (patch)
tree258c3944e23436ee8831f473a3262f1622cb36b1
parente819e47b426d916bc6be34f7a4414e1a60120a20 (diff)
Expose the EGLNativeDisplay through nativeResourceForIntegration.
This is necessary to allow QtWebEngine to create a separate display connection through eglGetDisplay to the same display as Qt is working on. Change-Id: I3635888bd5e41239ef18b197d24683dcea68f6ee Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformintegration.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
index b48f993436..820c433a2c 100644
--- a/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformintegration.cpp
@@ -189,7 +189,8 @@ QPlatformNativeInterface *QEGLPlatformIntegration::nativeInterface() const
enum ResourceType {
EglDisplay,
EglWindow,
- EglContext
+ EglContext,
+ NativeDisplay
};
static int resourceType(const QByteArray &key)
@@ -197,7 +198,8 @@ static int resourceType(const QByteArray &key)
static const QByteArray names[] = { // match ResourceType
QByteArrayLiteral("egldisplay"),
QByteArrayLiteral("eglwindow"),
- QByteArrayLiteral("eglcontext")
+ QByteArrayLiteral("eglcontext"),
+ QByteArrayLiteral("nativedisplay")
};
const QByteArray *end = names + sizeof(names) / sizeof(names[0]);
const QByteArray *result = std::find(names, end, key);
@@ -214,6 +216,9 @@ void *QEGLPlatformIntegration::nativeResourceForIntegration(const QByteArray &re
case EglDisplay:
result = m_screen->display();
break;
+ case NativeDisplay:
+ result = reinterpret_cast<void*>(nativeDisplay());
+ break;
default:
break;
}