summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/eglconvenience
Commit message (Collapse)AuthorAgeFilesLines
* Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-192-10/+10
| | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add INTEGRITY mkspec for ARMv8 Drive CXTero Alamäki2017-05-291-2/+4
| | | | | | Change-Id: I038de7a0cc9e6046aec3fc930876d43263702e90 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * streamline libdl detection and linkingOswald Buddenhagen2017-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of having a library and a test, use a library with two sources, the first being empty (i.e., just libc). this allows us doing away with the "libdl" feature, and using just the "dlopen" one. subsequently, replace all LIBS+=$$QMAKE_LIBS_DYNLOAD with QMAKE_USE+=libdl. the definitions of QMAKE_LIBS_DYNLOAD remain in the qmakespecs for backwards compat only. n.b.: the only specs where it is not empty or "-ldl" (i.e., what we support now) are the hpux ones, where the library is called 'dld'. technically, the "library" feature should depend on '!unix || dlopen', but that's for a later patch. Change-Id: Ib8546affc4b7bc757f1a76729573ddd00e152176 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-142-0/+18
|\| | | | | | | Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669
| * Add the new NVIDIA specific calls to qeglstreamconvenienceDominik Holland2017-02-132-0/+18
| | | | | | | | | | | | | | | | | | NVIDIA 370 introduced new calls needed to work with eglstreams in the wayland window system Task-number: QTBUG-58299 Change-Id: I606b143d3016f365b0d5ca4bc163b99289afbea1 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | egl: Expose direct function pointers on INTEGRITYLaszlo Agocs2017-02-101-0/+345
| | | | | | | | | | | | Change-Id: I4f7df9abcd580297a40fd9dd16a26f5f93e1c4c7 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-131-0/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/Makefile.unix.macos qmake/Makefile.unix.win32 qmake/generators/win32/msvc_vcproj.cpp src/3rdparty/pcre/qt_attribution.json src/corelib/io/qsettings.cpp src/corelib/kernel/qdeadlinetimer.cpp src/platformsupport/kmsconvenience/qkmsdevice.cpp src/platformsupport/kmsconvenience/qkmsdevice_p.h src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h tests/manual/qstorageinfo/printvolumes.cpp tools/configure/configureapp.cpp Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
| * Add EGL_STREAM_FIFO_LENGTH to the helper headerLaszlo Agocs2016-12-031-0/+4
| | | | | | | | | | | | | | | | | | | | Parent patch introducing usage of this attribute did not add it to the EGLStream support header. This is likely not fatal, but follow the practice of defining the constants ourselves, in case they are not present. Change-Id: Ib16f9809f9c6a212570c49472bb840183232e68a Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/devLiang Qi2016-11-181-1/+1
|\|
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-161-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/linux-android.conf src/gui/opengl/qopengl.h src/network/socket/qnativesocketengine_winrt.cpp src/network/socket/qnativesocketengine_winrt_p.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/api/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp sync.profile Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
| | * Fix EGL break on Debian X32Laszlo Agocs2016-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change to QT_POINTER_SIZE instead of Q_PROCESSOR_WORDSIZE. The latter is 8 due to targeting 64-bit, but pointers are 32-bit still in such builds. For the condition in question it is the pointer size that matters. Task-number: QTBUG-56686 Change-Id: I96c203cae91ceb8404606de605c4fdb1a02a9d5f Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Enable support for OpenVGAndy Nichols2016-11-172-6/+19
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit re-enables support for OpenVG in Qt, but not in the same way as in Qt 4.8. The first part is about adding a test and using the new configure system to enable OpenVG. There is still support code in Qt for setting up EGL to provide a surface and context for rendering with the OpenVG API, this commit enables a path to do so. Normally to get access to an EGLContext from a QWindow you do so via QOpenGLContext, but in setups without OpenGL but with EGL and OpenVG this doesn't make sense (there would be no QOpenGLContext). So the intended way is to use a QWindow to get an EGLSurface, then create an EGLContext directly (without going through QPA). Change-Id: I0f75aadbaa3cd006deb7e6fd12cfbb574870fba4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | create modularized version of qtplatformsupport moduleOswald Buddenhagen2016-10-156-36/+47
| | | | | | | | | | | | | | | | | | | | lumping together all kinds of unrelated stuff has caused problems with spurious dependencies from the beginning. as the modularization infra is now in a state which supports many small private libraries just fine, take advantage of it. Change-Id: Ic40f47ce76a308bbfd32deae281f6f064fe1ef4c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | xcb: Support EGLStreams for Wayland on X11Paul Olav Tvete2016-09-271-0/+4
| | | | | | | | | | | | | | | | To make NVidia EGLStreams work on the desktop, we need to use eglGetPlatformDisplayEXT instead of eglGetDisplay. Therefore, let's try that first if we have the extension. Change-Id: Id420fb46d5bc5345faa5cbb066584b0859d50417 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Use qtConfig throughout in qtbaseLars Knoll2016-08-191-3/+3
|/ | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Add X11 support for the DRIVE CXLaszlo Agocs2016-08-106-8/+124
| | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-061-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| * Compile Fix: unused variable in q_refreshRateFromFb() on non-linuxRalf Nolden2016-05-251-0/+4
| | | | | | | | | | | | | | | | | | To fix a compile warning under non-Linux systems, declare framebufferDevice in q_refreshRateFromFb() as Q_UNUSED like in the other functions. Change-Id: I31a4e788f07d27d3cff7f6ea7fd82813a7acc7d9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| * egl: Reshuffle headers to help less fortunate systems with X11Laszlo Agocs2016-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EGL headers including X headers has traditionally been problematic due to getting macros for Status, None, etc. In most cases this is not an issue anymore because on embedded one will almost always use a driver targeting the framebuffer or DRM/KMS and therefore the EGL headers do not pull in X dependencies. Furthermore, Mesa supports MESA_EGL_NO_X11_HEADERS which we set, avoiding the problem altogether with Mesa regardless of targeting X11 or KMS. However, other drivers do not have this option. On i.MX6 for instance, targeting X11 is problematic due to not having EGL_API_FB defined, which in turn means the EGL headers pulls in X headers in order to be able to define the native display and window types as Display and Window. Try to play nice with this use case by reshuffling the includes and undefining the problematic names. This restores patch set 2 from the previously merged, and then reverted commit. This here is safe since the egl.h include and the following undefs are only done internally for eglfs and can have therefore no effect on other code. Task-number: QTBUG-52928 Change-Id: I383e783d5064dc8fb41f3ef56d2a4f4fcd31a6cf Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
| * Revert "egl: Reshuffle headers to help less fortunate systems with X11"Liang Qi2016-05-046-73/+6
| | | | | | | | | | | | | | | | | | This reverts commit ecf127505effbbf4dbfd1e7cb9561de5dae51bf2. ecf12750 breaks the build of qtwayland. Change-Id: If8bf04f035aa47e4e867d201ec7d95b0d3e18317 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| * egl: Reshuffle headers to help less fortunate systems with X11Laszlo Agocs2016-05-036-6/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EGL headers including X headers has traditionally been problematic due to getting macros for Status, None, etc. In most cases this is not an issue anymore because on embedded one will almost always use a driver targeting the framebuffer or DRM/KMS and therefore the EGL headers do not pull in X dependencies. Furthermore, Mesa supports MESA_EGL_NO_X11_HEADERS which we set, avoiding the problem altogether with Mesa regardless of targeting X11 or KMS. However, other drivers do not have this option. On i.MX6 for instance, targeting X11 is problematic due to not having EGL_API_FB defined, which in turn means the EGL headers pulls in X headers in order to be able to define the native display and window types as Display and Window. Try to play nice with this use case by reshuffling the includes and undefining the problematic names. Task-number: QTBUG-52928 Change-Id: I059f26b340b6e442e7296055915d18f5a1ce7a7f Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
* | EGL/GLX: Resolve depth buffer more intelligentlyLouai Al-Khanji2016-04-011-8/+11
| | | | | | | | | | | | | | | | | | If a depth buffer size >=32 is requested, try 24 bits as a fallback. Task-number: QTBUG-44029 Done-with: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Change-Id: I43157d17c2bfe19b3b4a9139412e4c297e6150b7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Disable fallback to dlsym() for INTEGRITY.Rolland Dudemaine2016-03-291-1/+1
| | | | | | | | | | | | | | All symbols are available through eglGetProcAddress(). Change-Id: I636f9555f578dc5cf517995a4fcb01b0cd7f7698 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Ensure we can query all GL functions in all platform pluginsLars Knoll2016-03-012-1/+11
| | | | | | | | | | | | | | | | | | This is required to simplify our code in the opengl classes and makes it possible to remove OS dependent code paths in Qt Gui. Change-Id: Ice09440840c86b2d6ac8d3955d273846695338d4 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Avoid repeated QByteArray creation when resolving opengl functionsLars Knoll2016-03-012-3/+3
| | | | | | | | | | | | | | | | | | | | Add an getProcAddress(const char *) overload to QOpenGLContext, and refactor the QPA interface to take a const char *. Like this we can avoid lots of mallocs when resoving GL methods. Change-Id: Ic45b985fbaa0da8d32ba3e3b485351173352ca6f Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-262-0/+8
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
| * eglfs: Detect llvmpipe and show a warningLaszlo Agocs2016-01-212-0/+8
| | | | | | | | | | | | | | | | | | | | Do ourselves and our users a favor by pointing out why Qt (Quick) apps perform horribly on commonly used distros on the RPi. Using a software rasterizer on such boards is not going to cut it. Task-number: QTBUG-50533 Change-Id: I087f502ddb9c6bdde84343e6abd85c87cdc474f0 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-1510-140/+200
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add EGL stream state defines used by Qt WaylandLaszlo Agocs2015-11-191-0/+9
| | | | | Change-Id: I7318de90477aa92abd782cf2038e882152b515bf Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
* Add Xlib for eglconvenienceLaszlo Agocs2015-11-191-0/+1
| | | | | | | | This used to work by accident but now with the recent build system changes the problem became apparent. Not listing the X11 libs is wrong anyway. Change-Id: I6f75dafa81510d6d6a7571a9fe156cc7b968c8dc Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Move EGLDevice/Output/Stream resolvers into eglconvenienceLaszlo Agocs2015-10-203-2/+291
| | | | | | | Needed by Qt Wayland as well. Change-Id: Ic349f0a79831e9121cbe9885246897efea2701d5 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* eglfs: Handle custom platform window implementations betterLaszlo Agocs2015-10-145-7/+20
| | | | | | | | | | | | | | Backends may want to subclass QEglFSWindow and reimplement resetSurface() and similar. Make it possible to do this by moving window creation to the device integration interface, similarly to screens. In addition to customizing the windows, some backends may want to disable the dependency on surfaceless contexts when using offscreen windows (i.e. pbuffer surfaces). Make this possible too. Change-Id: Ic5a426e07f821c7a800217b8799f91770ba6a6d8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-0/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * Force GLES 2.0 on Android 4.2 devices reporting 3.0Laszlo Agocs2015-09-101-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Android does not support GLES 3.0 before 4.3 (API level 18). However some 4.2.2 devices are reported to return 3.0 in the version string and therefore choose the GLES 3+ code paths in Qt. This blows up sooner or later because the 3.0 specific functions are apparently not present at all. Task-number: QTBUG-46831 Change-Id: Ic3eeb7c55829cf36c6d142c01ff8a1e18e9ecc1a Reviewed-by: Kati Kankaanpaa <kati.kankaanpaa@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-261-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/snippets/code/doc_src_qmake-manual.pro qmake/doc/src/qmake-manual.qdoc src/corelib/io/qstorageinfo_unix.cpp src/corelib/tools/qbytearray.cpp src/widgets/kernel/qwidgetwindow.cpp tests/auto/corelib/io/qprocess/tst_qprocess.cpp tests/auto/corelib/mimetypes/qmimedatabase/tst_qmimedatabase.cpp tests/auto/network/access/qnetworkreply/BLACKLIST Change-Id: I9efcd7e1cce1c394eed425c43aa6fce7d2edf31c
| * egl: Do not do any further ops when context creation failsLaszlo Agocs2015-08-181-1/+2
| | | | | | | | | | Change-Id: I54bf4a720e8d414d310ecdb88f08a9705023aef9 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* | Make EGL context init work when msaa is requested but there's no surfacelessLaszlo Agocs2015-08-042-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To query back certain things, like the actual OpenGL version from the created context, the eglconvenience code makes the new context current either without a surface (in case EGL_KHR_surfaceless_context is supported) or with a pbuffer (or other platform specific equivalent). There is no problem with the former. The latter can however fail when samples are requested for the context and there are no matching pbuffer configs. The result is a pbuffer without multisampling, which could lead to a BAD_MATCH. This is visible on GLES 2.0 devices like the Beaglebone. The solution is to fall back to creating a new, temporary context with a config matching the pbuffer's whenever the makeCurrent attempt fails. Change-Id: Icd9f3383f2cad36dd5b60dead655328b7b9af658 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* | Move eglfs-only parts back from eglconvenienceLaszlo Agocs2015-07-169-1507/+6
|/ | | | | | | | | | | | | | The integration, screen, window and cursor classes were split in Qt 5.3 under a plan of sharing these between eglfs, the Android port and potentially other future plugins. This never materialized. Maintaining the artificial split is getting difficult and is prone to errors. Therefore it is time to merge back these base classes into eglfs. The result is cleaner, smaller, and potentially better performing code. eglconvenience is now restored to be a collection of convenience classes instead of platform plugin bits. Change-Id: I75c6ad876ef66a1a0c5b39c1c307f928d2ed47d4 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* Disable surfaceless QOffscreenSurface with MesaLaszlo Agocs2015-06-221-1/+12
| | | | | | | | | | | With Intel at least Mesa is unable to handle surfaceless contexts in glReadPixels(). This cripples QOpenGLFramebufferObject::toImage() and potentially others too. Task-number: QTBUG-46605 Change-Id: I07c1015eca67b8add14496ec0df0e0c17ac3d896 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* evdevtouch: Add hotplug supportLaszlo Agocs2015-04-091-2/+2
| | | | | | | | | | | Follow the exact same structure as evdevmouse and keyboard. We must do monitoring via device discovery just like we do for keyboards and mice. Otherwise the usage of touchscreens that connect via USB or can be turned on/off independently from the board becomes troublesome. Change-Id: I2de3b519e8d617b0612e5df486e481bbc09b9c8c Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Fix EGL config - X visual matching for i.MX6Laszlo Agocs2015-03-181-0/+6
| | | | | | Task-number: QTBUG-44290 Change-Id: I06cbb169803aa8a06ea310651def1f3582194c8e Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Add support for grabWindow() on eglfs with widgetsLaszlo Agocs2015-03-162-0/+51
| | | | | | | | | | | | | For real OpenGL content it is still not supported because we have no reliable way to read back the contents at arbitrary times. Applications should rather use QQuickWindow::grabWindow() in that case. [ChangeLog][QtGui] Support for QScreen::grabWindow() is now available on embedded platforms (eglfs, linuxfb). Task-number: QTBUG-44937 Change-Id: I4ad046062782c160f5bb9f8f2a2fe82f2e7394cc Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* eglfs: Report the QScreen refresh rate from eglfsLaszlo Agocs2015-03-142-0/+28
| | | | | | | | | | | | For KMS we can always know the correct rate so report it from the backend's custom screen implementation. For the rest, query from the framebuffer. If the fb driver publishes the timings then we can calculate the vertical refresh rate from them. If not, default to 60. Task-number: QTBUG-44971 Change-Id: I854a34e7c0d652790cc2ac967715828ec76f5733 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Support QCursor::setPos() properly for eglfsLaszlo Agocs2015-03-141-0/+1
| | | | | | | | | | | | | | | | | The internal state of the input handlers need updating too. This was not possible in the past due to the one way communication from the input handlers (that are potentially loaded as interface-less generic plugins), but using our new private QInputDeviceManager in QtGui we can now easily implement "talking back" from QtGui to the input handlers, regardless of them being plugins or compiled in. The rest of setPos() is in place already for eglfs. linuxfb will be handled in follow-up patches. Task-number: QTBUG-44856 Change-Id: Id72fdb8b1ea176ddfe082e466e7a538a2a98a005 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* eglfs: Generate enter and leave eventsLaszlo Agocs2015-03-144-3/+52
| | | | | | | | | | | In addition the logic in QGuiApplication that picks the target window for input events with a null window has to be enhanced to be compatible with how real windowing systems work: mouse events following a press are delivered to the same window until the release, even if the cursor has left the original target window. Task-number: QTBUG-44814 Change-Id: I3fea84ac77a5ccebeae5def64f92d8d2e03d13ff Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Fix up signal handling in QFbVtHandlerLaszlo Agocs2015-03-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Start using signalfd where we can. Drop the crash (SIGSEGV, SIGBUS) handling completely. The crash handling that was in place previously was not async-safe. It also prevented getting a core dump. So just remove it. There is no safe solution for a single application process since restoring the keyboard, video modes, etc. all need unsafe calls in the signal handler almost for sure. We can however improve the handling of non-crash scenarios greatly: Introduce support for SIGINT, allowing nicely and cleanly restoring the video mode with the KMS backend when pressing Ctrl+C while QT_QPA_ENABLE_TERMINAL_KEYBOARD is set. Same goes for keyboard suspend (SIGTSTP, Ctrl+Z). When QT_QPA_ENABLE_TERMINAL_KEYBOARD is set, platform plugins now have the possibility to act upon Ctrl+Z. As an example eglfs' KMS backend is enhanced to handle this by restoring the video mode before suspending the process, and reinitializing when brought into foreground again (SIGCONT). SIGTERM is also handled. This is extremely handy when starting an application locally on the embedded device and then kill-ing it via a remote ssh session. Keyboard and video mode is now cleanly restored. Finally, when disabling the keyboard, try setting also KDSKBMUTE. Change-Id: I2b3608dc23c798e2b39f74cb27f12dcb0e958435 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* Optimize egl cursor update eventsLaszlo Agocs2015-03-052-38/+34
| | | | | | | | | Avoid invokeMethod on every cursor movement and use an event instead. This is more lightweight and efficient. Also, there is no need to have a separate QObject just for this. Change-Id: I65ae202943eeb1e30cf22926576f84198f2487f8 Reviewed-by: Andy Nichols <andy.nichols@theqtcompany.com>
* Fix compilation with ICC: failure to parse placement of Q_DECL_OVERRIDEThiago Macieira2015-02-171-1/+1
| | | | | | | | | | | | | | | | | This is the right way: void (*getProcAddress(const QByteArray &procName)) () Q_DECL_OVERRIDE; However, ICC and GCC do not get it. They expect it in the form: void (*getProcAddress(const QByteArray &procName) Q_DECL_OVERRIDE) (); ICC complains with an error, so this needs a workaround. GCC ignores the incorrectly-placed "override", so it just looks to GCC like no "override" was added. See also: https://groups.google.com/a/isocpp.org/forum/#!topic/std-discussion/IjVB8CWiS5A Change-Id: I1a800c709d3543699131ffff13c2ffc9cee46245 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>