summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/deviceintegration
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2016-08-04 12:22:05 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2016-08-10 11:24:23 +0000
commite694ced803589b3504b6bdb2fc8bf97bc891c794 (patch)
tree23abe407a6122d128d299e1a283c33e98cc0211f /src/plugins/platforms/eglfs/deviceintegration
parentc35fef9d3b8bb77a7f303e3cd62c86cd00e57f5b (diff)
Add X11 support for the DRIVE CX
The spec, added in 5.7.0, simply defined WIN_INTERFACE_CUSTOM, leading to the generic, non-X11 typedefs for the EGL native types. This is fine for the typical embedded use, but is not what is wanted when targeting xcb, and leads to disabling EGL-on-X support. Therefore, move the define into a comon header and let the individual libs decide by defining or not defining QT_EGL_NO_X11. This sets both MESA_EGL_NO_X11_HEADERS and WIN_INTERFACE_CUSTOM in qt_egl_p.h. This way Qt builds supporting all three of eglfs (DRM+EGLDevice), wayland, and xcb (EGL) can be generated out of the box. [ChangeLog][Platform Specific Changes][Linux] xcb with EGL and OpenGL ES, as well as eglfs with the eglfs_x11 backend, are now supported on DRIVE CX boards when using the linux-drive-cx-g++ device spec. Done-with: Louai Al-Khanji <louai.al-khanji@qt.io> Task-number: QTBUG-55140 Change-Id: I6f186d16612e170995e3bca1214bcabad59af08e Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/plugins/platforms/eglfs/deviceintegration')
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro4
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro4
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro3
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro4
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro4
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro4
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp4
7 files changed, 14 insertions, 13 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro
index e2ebf9f7ee..2b710ac24c 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro
@@ -8,8 +8,8 @@ CONFIG += egl
LIBS += -lbcm_host
QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF
-# Avoid X11 header collision
-DEFINES += MESA_EGL_NO_X11_HEADERS
+# Avoid X11 header collision, use generic EGL native types
+DEFINES += QT_EGL_NO_X11
SOURCES += $$PWD/qeglfsbrcmmain.cpp \
$$PWD/qeglfsbrcmintegration.cpp
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro
index 979bfe3ea9..b1791240ab 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro
@@ -8,8 +8,8 @@ QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../.. $$PWD/../eglfs_kms_support
-# Avoid X11 header collision
-DEFINES += MESA_EGL_NO_X11_HEADERS
+# Avoid X11 header collision, use generic EGL native types
+DEFINES += QT_EGL_NO_X11
CONFIG += link_pkgconfig
!contains(QT_CONFIG, no-pkg-config) {
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro
index 3a380b7525..e2263f6cbf 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro
@@ -4,7 +4,8 @@ QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../.. $$PWD/../eglfs_kms_support
-DEFINES += MESA_EGL_NO_X11_HEADERS
+# Avoid X11 header collision, use generic EGL native types
+DEFINES += QT_EGL_NO_X11
CONFIG += link_pkgconfig
!contains(QT_CONFIG, no-pkg-config) {
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro
index 6355fe6abd..32f15f33fb 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro
@@ -6,8 +6,8 @@ QT += core-private gui-private platformsupport-private eglfs_device_lib-private
INCLUDEPATH += $$PWD/../..
-# Avoid X11 header collision
-DEFINES += MESA_EGL_NO_X11_HEADERS
+# Avoid X11 header collision, use generic EGL native types
+DEFINES += QT_EGL_NO_X11
CONFIG += link_pkgconfig
!contains(QT_CONFIG, no-pkg-config) {
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro
index 7fc4568ae3..3e486bd1bd 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro
@@ -2,8 +2,8 @@ TARGET = qeglfs-mali-integration
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
-# Avoid X11 header collision
-DEFINES += MESA_EGL_NO_X11_HEADERS
+# Avoid X11 header collision, use generic EGL native types
+DEFINES += QT_EGL_NO_X11
INCLUDEPATH += $$PWD/../..
CONFIG += egl
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro
index 83f0c74910..1948d73750 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro
@@ -2,8 +2,8 @@ TARGET = qeglfs-x11-integration
QT += core-private gui-private platformsupport-private eglfs_device_lib-private
-# Avoid X11 header collision
-DEFINES += MESA_EGL_NO_X11_HEADERS
+# Avoid X11 header collision, use generic EGL native types
+DEFINES += QT_EGL_NO_X11
INCLUDEPATH += $$PWD/../..
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp
index 74a687b382..f9924fe5ce 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/qeglfsx11integration.cpp
@@ -281,12 +281,12 @@ EGLNativeWindowType QEglFSX11Integration::createNativeWindow(QPlatformWindow *pl
xcb_flush(m_connection);
- return m_window;
+ return qt_egl_cast<EGLNativeWindowType>(m_window);
}
void QEglFSX11Integration::destroyNativeWindow(EGLNativeWindowType window)
{
- xcb_destroy_window(m_connection, window);
+ xcb_destroy_window(m_connection, qt_egl_cast<xcb_window_t>(window));
}
bool QEglFSX11Integration::hasCapability(QPlatformIntegration::Capability cap) const