summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration
diff options
context:
space:
mode:
Diffstat (limited to 'src/hardwareintegration')
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp4
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp5
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h1
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp2
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp2
-rw-r--r--src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pri9
-rw-r--r--src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.cpp262
-rw-r--r--src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.h117
-rw-r--r--src/hardwareintegration/compositor/shm-emulation-server/shmserverbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp2
-rw-r--r--src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp2
11 files changed, 401 insertions, 7 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
index 771b4b2e4..8a1009fa8 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.cpp
@@ -162,7 +162,7 @@ void *QWaylandEglClientBufferIntegration::nativeResource(NativeResource resource
default:
break;
}
- return Q_NULLPTR;
+ return nullptr;
}
void *QWaylandEglClientBufferIntegration::nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context)
@@ -178,7 +178,7 @@ void *QWaylandEglClientBufferIntegration::nativeResourceForContext(NativeResourc
default:
break;
}
- return Q_NULLPTR;
+ return nullptr;
}
EGLDisplay QWaylandEglClientBufferIntegration::eglDisplay() const
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
index 6b5c53263..87f3e2d4e 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
@@ -92,6 +92,11 @@ QWaylandWindow::WindowType QWaylandEglWindow::windowType() const
return QWaylandWindow::Egl;
}
+void QWaylandEglWindow::ensureSize()
+{
+ updateSurface(false);
+}
+
void QWaylandEglWindow::setGeometry(const QRect &rect)
{
QWaylandWindow::setGeometry(rect);
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
index e471a8f7c..77aee56dc 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
@@ -59,6 +59,7 @@ public:
QWaylandEglWindow(QWindow *window);
~QWaylandEglWindow();
WindowType windowType() const override;
+ void ensureSize() override;
void updateSurface(bool create);
virtual void setGeometry(const QRect &rect) override;
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index f4dd6f492..967028861 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -327,7 +327,7 @@ void QWaylandGLContext::updateGLFormat()
EGLSurface prevSurfaceDraw = eglGetCurrentSurface(EGL_DRAW);
EGLSurface prevSurfaceRead = eglGetCurrentSurface(EGL_READ);
- wl_surface *wlSurface = m_display->createSurface(Q_NULLPTR);
+ wl_surface *wlSurface = m_display->createSurface(nullptr);
wl_egl_window *eglWindow = wl_egl_window_create(wlSurface, 1, 1);
EGLSurface eglSurface = eglCreateWindowSurface(m_eglDisplay, m_config, eglWindow, 0);
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
index 431cb14c1..9c3dee3fc 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
@@ -121,7 +121,7 @@ void QWaylandXCompositeEGLWindow::createEglSurface()
XCompositeRedirectWindow(m_glxIntegration->xDisplay(), m_xWindow, CompositeRedirectManual);
XMapWindow(m_glxIntegration->xDisplay(), m_xWindow);
- m_surface = eglCreateWindowSurface(m_glxIntegration->eglDisplay(), m_config, m_xWindow,0);
+ m_surface = eglCreateWindowSurface(m_glxIntegration->eglDisplay(), m_config, reinterpret_cast<EGLNativeWindowType>(m_xWindow), nullptr);
if (m_surface == EGL_NO_SURFACE) {
qFatal("Could not make eglsurface");
}
diff --git a/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pri b/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pri
new file mode 100644
index 000000000..9d68775b3
--- /dev/null
+++ b/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2.pri
@@ -0,0 +1,9 @@
+INCLUDEPATH += $$PWD
+
+QMAKE_USE_PRIVATE += wayland-server
+
+SOURCES += \
+ $$PWD/vsp2hardwarelayerintegration.cpp
+
+HEADERS += \
+ $$PWD/vsp2hardwarelayerintegration.h
diff --git a/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.cpp b/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.cpp
new file mode 100644
index 000000000..a02226a52
--- /dev/null
+++ b/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.cpp
@@ -0,0 +1,262 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "vsp2hardwarelayerintegration.h"
+
+extern "C" {
+#define private priv
+#include <wayland-kms.h>
+#undef private
+}
+
+#include <private/qwaylandquickhardwarelayer_p.h>
+#include <private/qwaylandquickitem_p.h>
+#include <private/qwaylandview_p.h>
+#include <QWaylandQuickOutput>
+#include <QQuickWindow>
+
+#include <QtPlatformHeaders/qeglfsfunctions.h>
+
+QT_BEGIN_NAMESPACE
+
+Vsp2Buffer::Vsp2Buffer(wl_kms_buffer *kmsBuffer)
+ : dmabufFd(kmsBuffer->fd)
+ , bytesPerLine(kmsBuffer->stride)
+ , drmPixelFormat(kmsBuffer->format)
+ , size(kmsBuffer->width, kmsBuffer->height)
+{
+}
+
+Vsp2Layer::Vsp2Layer(QWaylandQuickHardwareLayer *hwLayer, Vsp2HardwareLayerIntegration *integration)
+ : m_hwLayer(hwLayer)
+{
+ connect(hwLayer, &QWaylandQuickHardwareLayer::stackingLevelChanged, this, [integration](){
+ integration->recreateVspLayers();
+ });
+ connect(hwLayer->waylandItem(), &QWaylandQuickItem::surfaceChanged, this, &Vsp2Layer::handleSurfaceChanged);
+ connect(hwLayer->waylandItem(), &QQuickItem::opacityChanged, this, &Vsp2Layer::updateOpacity);
+ connect(hwLayer->waylandItem()->window(), &QQuickWindow::afterSynchronizing, this, &Vsp2Layer::updatePosition);
+ hwLayer->disableSceneGraphPainting();
+ QWaylandViewPrivate::get(hwLayer->waylandItem()->view())->independentFrameCallback = true;
+ handleSurfaceChanged();
+}
+
+void Vsp2Layer::enableVspLayer()
+{
+ auto *kmsBuffer = nextKmsBuffer();
+
+ if (!kmsBuffer)
+ return;
+
+ m_buffer = Vsp2Buffer(kmsBuffer);
+ updatePosition();
+ auto *wlItem = m_hwLayer->waylandItem();
+ m_screen = wlItem->window()->screen();
+ m_layerIndex = QEglFSFunctions::vsp2AddLayer(m_screen, m_buffer.dmabufFd, m_buffer.size, m_position, m_buffer.drmPixelFormat, m_buffer.bytesPerLine);
+ wlItem->surface()->frameStarted();
+ updateOpacity();
+}
+
+void Vsp2Layer::disableVspLayer()
+{
+ QEglFSFunctions::vsp2RemoveLayer(m_screen, m_layerIndex);
+ m_layerIndex = -1;
+ m_screen = nullptr;
+}
+
+void Vsp2Layer::handleBufferCommitted()
+{
+ if (!isEnabled()) {
+ enableVspLayer();
+ return;
+ }
+
+ auto *kmsBuffer = nextKmsBuffer();
+
+ Vsp2Buffer newBuffer(kmsBuffer);
+ if (m_buffer.dmabufFd != -1) {
+ bool formatChanged = false;
+ formatChanged |= newBuffer.bytesPerLine != m_buffer.bytesPerLine;
+ formatChanged |= newBuffer.size != m_buffer.size;
+ formatChanged |= newBuffer.drmPixelFormat != m_buffer.drmPixelFormat;
+ if (formatChanged) {
+ qWarning() << "The VSP2 Wayland hardware layer integration doesn't support changing"
+ << "surface formats, this will most likely fail";
+ }
+ }
+
+ m_buffer = newBuffer;
+ auto *wlItem = m_hwLayer->waylandItem();
+ m_screen = wlItem->window()->screen();
+ QEglFSFunctions::vsp2SetLayerBuffer(m_screen, m_layerIndex, m_buffer.dmabufFd);
+ wlItem->surface()->frameStarted();
+}
+
+void Vsp2Layer::handleSurfaceChanged()
+{
+ auto newSurface = m_hwLayer->waylandItem()->surface();
+
+ if (Q_UNLIKELY(newSurface == m_surface))
+ return;
+
+ if (this->m_surface)
+ disconnect(this->m_surface, &QWaylandSurface::redraw, this, &Vsp2Layer::handleBufferCommitted);
+ if (newSurface)
+ connect(newSurface, &QWaylandSurface::redraw, this, &Vsp2Layer::handleBufferCommitted, Qt::DirectConnection);
+
+ this->m_surface = newSurface;
+}
+
+void Vsp2Layer::updatePosition()
+{
+ QWaylandQuickItem *wlItem = m_hwLayer->waylandItem();
+ QRectF localGeometry(0, 0, wlItem->width(), wlItem->height());
+ auto lastMatrix = QWaylandQuickItemPrivate::get(wlItem)->lastMatrix;
+ auto globalGeometry = lastMatrix.mapRect(localGeometry);
+
+ if (m_buffer.size != globalGeometry.size().toSize()) {
+ qWarning() << "wl_buffer size != WaylandQuickItem size and scaling has not been"
+ << "implemented for the vsp2 hardware layer integration";
+ }
+
+ m_position = globalGeometry.topLeft().toPoint();
+ if (isEnabled())
+ QEglFSFunctions::vsp2SetLayerPosition(m_screen, m_layerIndex, m_position);
+}
+
+void Vsp2Layer::updateOpacity()
+{
+ if (isEnabled()) {
+ qreal opacity = m_hwLayer->waylandItem()->opacity();
+ QEglFSFunctions::vsp2SetLayerAlpha(m_screen, m_layerIndex, opacity);
+ }
+}
+
+wl_kms_buffer *Vsp2Layer::nextKmsBuffer()
+{
+ Q_ASSERT(m_hwLayer && m_hwLayer->waylandItem());
+ QWaylandQuickItem *wlItem = m_hwLayer->waylandItem();
+ auto view = wlItem->view();
+ Q_ASSERT(view);
+
+ view->advance();
+ auto wlBuffer = view->currentBuffer().wl_buffer();
+
+ if (!wlBuffer)
+ return nullptr;
+
+ struct wl_kms_buffer *kmsBuffer = wayland_kms_buffer_get(wlBuffer);
+
+ if (!kmsBuffer)
+ qWarning() << "Failed to get wl_kms_buffer for wl_buffer:" << wlBuffer->object.id;
+
+ return kmsBuffer;
+}
+
+void Vsp2HardwareLayerIntegration::enableVspLayers()
+{
+ for (auto &layer : qAsConst(m_layers)) {
+ Q_ASSERT(!layer->isEnabled());
+ layer->enableVspLayer();
+ }
+}
+
+void Vsp2HardwareLayerIntegration::disableVspLayers()
+{
+ for (auto it = m_layers.rbegin(); it != m_layers.rend(); ++it) {
+ if ((*it)->isEnabled())
+ (*it)->disableVspLayer();
+ }
+}
+
+void Vsp2HardwareLayerIntegration::sortLayersByDepth()
+{
+ std::sort(m_layers.begin(), m_layers.end(), [](auto &l1, auto &l2){
+ return l1->hwLayer()->stackingLevel() < l2->hwLayer()->stackingLevel();
+ });
+}
+
+void Vsp2HardwareLayerIntegration::recreateVspLayers() {
+ disableVspLayers();
+ sortLayersByDepth();
+ enableVspLayers();
+}
+
+Vsp2HardwareLayerIntegration::Vsp2HardwareLayerIntegration()
+{
+ if (QGuiApplication::platformName() != "eglfs") {
+ qWarning() << "Vsp2 layers are currently only supported on the eglfs platform plugin"
+ << "with the eglfs_kms_vsp2 device integration.\n"
+ << "You need to set QT_QPA_PLATFORM=eglfs and QT_QPA_EGLFS_INTEGRATION=eglfs_kms_vsp2";
+ }
+ static Vsp2HardwareLayerIntegration *s_instance = this;
+ QEglFSFunctions::vsp2AddBlendListener(QGuiApplication::primaryScreen(), [](){
+ s_instance->sendFrameCallbacks();
+ });
+}
+
+void Vsp2HardwareLayerIntegration::add(QWaylandQuickHardwareLayer *hwLayer)
+{
+ disableVspLayers();
+ m_layers.append(QSharedPointer<Vsp2Layer>(new Vsp2Layer(hwLayer, this)));
+ sortLayersByDepth();
+ enableVspLayers();
+}
+
+void Vsp2HardwareLayerIntegration::remove(QWaylandQuickHardwareLayer *hwLayer)
+{
+ disableVspLayers();
+ for (auto it = m_layers.begin(); it != m_layers.end(); ++it) {
+ if ((*it)->hwLayer() == hwLayer) {
+ m_layers.erase(it);
+ break;
+ }
+ }
+ enableVspLayers();
+}
+
+void Vsp2HardwareLayerIntegration::sendFrameCallbacks()
+{
+ for (auto &layer : qAsConst(m_layers)) {
+ if (auto *surface = layer->hwLayer()->waylandItem()->surface())
+ surface->sendFrameCallbacks();
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.h b/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.h
new file mode 100644
index 000000000..c9b69b7bc
--- /dev/null
+++ b/src/hardwareintegration/compositor/hardwarelayer/vsp2/vsp2hardwarelayerintegration.h
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef VSP2HARDWARELAYERINTEGRATION_H
+#define VSP2HARDWARELAYERINTEGRATION_H
+
+#include <QtWaylandCompositor/private/qwlhardwarelayerintegration_p.h>
+#include <private/qobject_p.h>
+
+#include <QPoint>
+#include <QSize>
+
+struct wl_kms_buffer;
+
+QT_BEGIN_NAMESPACE
+
+class QScreen;
+class QWaylandSurface;
+class QWaylandQuickHardwareLayer;
+
+class Vsp2Layer;
+
+class Vsp2HardwareLayerIntegration : public QtWayland::HardwareLayerIntegration
+{
+ Q_OBJECT
+public:
+ explicit Vsp2HardwareLayerIntegration();
+
+ void add(QWaylandQuickHardwareLayer *layer) override;
+ void remove(QWaylandQuickHardwareLayer *layer) override;
+
+ void sendFrameCallbacks();
+ QVector<QSharedPointer<Vsp2Layer>> m_layers;
+private:
+ void enableVspLayers();
+ void disableVspLayers();
+ void sortLayersByDepth();
+ void recreateVspLayers();
+ friend class Vsp2Layer;
+};
+
+struct Vsp2Buffer
+{
+ explicit Vsp2Buffer() = default;
+ explicit Vsp2Buffer(wl_kms_buffer *kmsBuffer);
+
+ int dmabufFd = -1;
+ uint bytesPerLine = 0;
+ uint drmPixelFormat = 0;
+ QSize size;
+};
+
+class Vsp2Layer : public QObject
+{
+ Q_OBJECT
+public:
+ explicit Vsp2Layer(QWaylandQuickHardwareLayer *m_hwLayer, Vsp2HardwareLayerIntegration *integration);
+ void enableVspLayer();
+ void disableVspLayer();
+ bool isEnabled() { return m_layerIndex != -1; }
+ QWaylandQuickHardwareLayer *hwLayer() const { return m_hwLayer; }
+
+public slots:
+ void handleBufferCommitted();
+ void handleSurfaceChanged();
+ void updatePosition();
+ void updateOpacity();
+
+private:
+ wl_kms_buffer *nextKmsBuffer();
+ int m_layerIndex = -1;
+ QScreen *m_screen = nullptr;
+ QPoint m_position;
+ QWaylandQuickHardwareLayer *m_hwLayer = nullptr;
+ QWaylandSurface *m_surface = nullptr;
+ Vsp2Buffer m_buffer;
+};
+
+QT_END_NAMESPACE
+
+#endif // VSP2HARDWARELAYERINTEGRATION_H
diff --git a/src/hardwareintegration/compositor/shm-emulation-server/shmserverbufferintegration.cpp b/src/hardwareintegration/compositor/shm-emulation-server/shmserverbufferintegration.cpp
index 7a86785b0..1dd037adc 100644
--- a/src/hardwareintegration/compositor/shm-emulation-server/shmserverbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/shm-emulation-server/shmserverbufferintegration.cpp
@@ -70,7 +70,7 @@ ShmServerBuffer::ShmServerBuffer(ShmServerBufferIntegration *integration, const
QString key = "qt_shm_emulation_" + QString::number(qimage.cacheKey());
m_shm = new QSharedMemory(key);
- int shm_size = qimage.byteCount();
+ qsizetype shm_size = qimage.sizeInBytes();
bool ok = m_shm->create(shm_size) && m_shm->lock();
if (ok) {
memcpy(m_shm->data(), qimage.constBits(), shm_size);
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index f5e63aec5..fdaddb6ab 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -223,7 +223,7 @@ WaylandEglClientBufferIntegrationPrivate::WaylandEglClientBufferIntegrationPriva
, egl_create_image(0)
, egl_destroy_image(0)
, gl_egl_image_target_texture_2d(0)
- , funcs(Q_NULLPTR)
+ , funcs(nullptr)
{
}
diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
index 3cc0ba0a9..071b08827 100644
--- a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
+++ b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
@@ -129,7 +129,7 @@ QOpenGLTexture *XCompositeEglClientBuffer::toOpenGlTexture(int plane)
attribList.append(EGL_TEXTURE_2D);
attribList.append(EGL_NONE);
- EGLSurface surface = eglCreatePixmapSurface(m_integration->eglDisplay(),config,pixmap,attribList.constData());
+ EGLSurface surface = eglCreatePixmapSurface(m_integration->eglDisplay(), config, reinterpret_cast<EGLNativePixmapType>(pixmap), attribList.constData());
if (surface == EGL_NO_SURFACE) {
qDebug() << "Failed to create eglsurface" << pixmap << compositorBuffer->window();
}