summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2014-12-03 16:56:17 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2014-12-04 13:46:59 +0100
commit198d7a51d4fc894fca691c1f8243372e876af68a (patch)
tree48183281fe15fb053afd5f837b6d9eeb15c7f7e2 /src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
parent6b8b6b80a1852c1e4d0a626129d4382d11423a54 (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/client/wayland-egl/qwaylandeglclientbufferintegration.cpp')
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp27
1 files changed, 27 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;