eglfs: Implement nativeResourceForWindow
Add support to request EglDisplay resource for a window. This is supported in other platform plugins, like kms and xcb and is required by wayland-egl based QtWayland compositors. Change-Id: If3f8c625682915c9671e820974e810763c3c8b66 Reviewed-by: Andy Nichols <andy.nichols@digia.com>bb10
parent
ba77bb34dd
commit
fe375dc3d0
|
|
@ -202,6 +202,20 @@ void *QEglFSIntegration::nativeResourceForIntegration(const QByteArray &resource
|
|||
return 0;
|
||||
}
|
||||
|
||||
void *QEglFSIntegration::nativeResourceForWindow(const QByteArray &resource, QWindow *window)
|
||||
{
|
||||
QByteArray lowerCaseResource = resource.toLower();
|
||||
|
||||
if (lowerCaseResource == "egldisplay") {
|
||||
if (window)
|
||||
return static_cast<QEglFSScreen *>(window->handle()->screen())->display();
|
||||
else
|
||||
return static_cast<QEglFSScreen *>(mScreen)->display();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void *QEglFSIntegration::nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context)
|
||||
{
|
||||
QByteArray lowerCaseResource = resource.toLower();
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ public:
|
|||
|
||||
// QPlatformNativeInterface
|
||||
void *nativeResourceForIntegration(const QByteArray &resource);
|
||||
void *nativeResourceForWindow(const QByteArray &resource, QWindow *window) Q_DECL_OVERRIDE;
|
||||
void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context);
|
||||
|
||||
NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) Q_DECL_OVERRIDE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue