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>
This commit is contained in:
parent
e819e47b42
commit
55eec6829e
@ -189,7 +189,8 @@ QPlatformNativeInterface *QEGLPlatformIntegration::nativeInterface() const
|
|||||||
enum ResourceType {
|
enum ResourceType {
|
||||||
EglDisplay,
|
EglDisplay,
|
||||||
EglWindow,
|
EglWindow,
|
||||||
EglContext
|
EglContext,
|
||||||
|
NativeDisplay
|
||||||
};
|
};
|
||||||
|
|
||||||
static int resourceType(const QByteArray &key)
|
static int resourceType(const QByteArray &key)
|
||||||
@ -197,7 +198,8 @@ static int resourceType(const QByteArray &key)
|
|||||||
static const QByteArray names[] = { // match ResourceType
|
static const QByteArray names[] = { // match ResourceType
|
||||||
QByteArrayLiteral("egldisplay"),
|
QByteArrayLiteral("egldisplay"),
|
||||||
QByteArrayLiteral("eglwindow"),
|
QByteArrayLiteral("eglwindow"),
|
||||||
QByteArrayLiteral("eglcontext")
|
QByteArrayLiteral("eglcontext"),
|
||||||
|
QByteArrayLiteral("nativedisplay")
|
||||||
};
|
};
|
||||||
const QByteArray *end = names + sizeof(names) / sizeof(names[0]);
|
const QByteArray *end = names + sizeof(names) / sizeof(names[0]);
|
||||||
const QByteArray *result = std::find(names, end, key);
|
const QByteArray *result = std::find(names, end, key);
|
||||||
@ -214,6 +216,9 @@ void *QEGLPlatformIntegration::nativeResourceForIntegration(const QByteArray &re
|
|||||||
case EglDisplay:
|
case EglDisplay:
|
||||||
result = m_screen->display();
|
result = m_screen->display();
|
||||||
break;
|
break;
|
||||||
|
case NativeDisplay:
|
||||||
|
result = reinterpret_cast<void*>(nativeDisplay());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user