diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2014-12-03 16:56:17 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2014-12-04 13:46:59 +0100 |
commit | 198d7a51d4fc894fca691c1f8243372e876af68a (patch) | |
tree | 48183281fe15fb053afd5f837b6d9eeb15c7f7e2 /src/hardwareintegration | |
parent | 6b8b6b80a1852c1e4d0a626129d4382d11423a54 (diff) |
Enable Qt WebEngine on Wayland
The native resource getters that are supported by eglfs will have to be
supported by the wayland platform plugin too. (on wayland-egl at least)
Change-Id: Ibbab649c04785dbde177342c45b9bc6f1edd954d
Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/hardwareintegration')
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp | 27 | ||||
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h | 3 |
2 files changed, 30 insertions, 0 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp index 99a32018f..7457ae52e 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp @@ -129,6 +129,33 @@ QPlatformOpenGLContext *QWaylandEglClientBufferIntegration::createPlatformOpenGL return new QWaylandGLContext(m_eglDisplay, m_display, glFormat, share); } +void *QWaylandEglClientBufferIntegration::nativeResource(NativeResource resource) +{ + switch (resource) { + case EglDisplay: + return m_eglDisplay; + default: + break; + } + return Q_NULLPTR; +} + +void *QWaylandEglClientBufferIntegration::nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context) +{ + Q_ASSERT(context); + switch (resource) { + case EglConfig: + return static_cast<QWaylandGLContext *>(context)->eglConfig(); + case EglContext: + return static_cast<QWaylandGLContext *>(context)->eglContext(); + case EglDisplay: + return m_eglDisplay; + default: + break; + } + return Q_NULLPTR; +} + EGLDisplay QWaylandEglClientBufferIntegration::eglDisplay() const { return m_eglDisplay; diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h index 75053190d..465ecc751 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h +++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h @@ -65,6 +65,9 @@ public: QWaylandWindow *createEglWindow(QWindow *window) Q_DECL_OVERRIDE; QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const Q_DECL_OVERRIDE; + void *nativeResource(NativeResource resource) Q_DECL_OVERRIDE; + void *nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context) Q_DECL_OVERRIDE; + EGLDisplay eglDisplay() const; private: |