summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxglcontext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [QNX] Add support for QLoggingCategory in QNX QPA debug log outputTuomas Vaarala5 days1-8/+4
| | | | | | | | Makes it possible to enable debug log outputs via QLoggingCategory. Earlier it was only possible via buid time flags. Change-Id: Iaec732e7acdf44a74c9d7c806bf0e6f5a5f87b1c Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QNX: fix buildSamuli Piippo2020-08-121-2/+2
| | | | | | | | Remove unused argument and use default contructor for the flags. Change-Id: I09d319bc58199ed713333055a2fdd519c249f831 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* Move QQnxGLContext::ms_eglDisplay to the integration objectJames McDonnell2019-12-131-25/+2
| | | | | | | | | | | | | | In part, this is a continuation of https://codereview.qt-project.org/c/qt/qtbase/+/227953. It also paves the way toward implementing the EglDisplay integration resource needed by QtWayland. For the code that's being moved around and modified, switch from !QT_NO_OPENGL to QT_CONFIG(opengl). Change-Id: I5046e8caf5df7cf326f8e697d7d41cf802250414 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-07-171-1/+12
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/xcb/qxcbintegration.cpp Conflicts git missed: src/plugins/platforms/qnx/qqnxglcontext.cpp Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
| * QNX: Add the ability to disable EGL_KHR_surfaceless_context useJames McDonnell2018-07-011-1/+12
|/ | | | | | | | | | | QML fails to draw when this is used on at least one jacinto6 platform. Works when it's disabled. Task-number: QTBUG-68227 Change-Id: I7b3c081d4d5a4fe22136f4bdd8ad1f34495cd94a Reviewed-by: Adam Treat <adam.treat@qt.io> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Make use of our egl convenience code for QNX QPAAdam Treat2018-02-081-190/+16
| | | | | | | | | This fixes various problems that occur because the current egl context assumes OpenGL ES 2.0 and does not support newer versions of ES. Task-number: QTBUG-64306 Change-Id: I81466ba5cf028b47ca5a2ebcdc702167aff655a2 Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* OpenGL function lookup for QNXJames McDonnell2017-05-071-1/+6
| | | | | | | | | Qt no longer supports using OpenGL ES2 via static linkage. Task-number: QTBUG-60457 Change-Id: I754ff1c084ecdfdf7bea0bd691c8f0fc47a2fcb0 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Avoid repeated QByteArray creation when resolving opengl functionsLars Knoll2016-03-011-2/+2
| | | | | | | | | | 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>
* Updated license headersJani Heikkinen2016-01-151-13/+19
| | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-12-021-9/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
| * QtBase: remove explicit function info from qWarning() etcMarc Mutz2015-11-281-9/+9
| | | | | | | | | | | | | | | | | | | | | | This information is already registered by the QMessageLogger ctor. Where, by dropping the << Q_FUNC_INFO in ostream-style qDebug(), only a string literal remained, converted to printf-style qDebug() on the go. Change-Id: I3f261c98fd7bcfa1fead381a75a82713bb75e6f3 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Use Q_UNLIKELY for every qFatal()/qCritical()Marc Mutz2015-11-291-9/+9
|/ | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qFatal() or a qCritical(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In some cases, simplified the expressions newly wrapped in Q_UNLIKELY as a drive-by. Change-Id: I67537d62b04bc6977d69254690c5ebbdf98bfd6d Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Update copyright headersJani Heikkinen2015-02-111-6/+6
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* eglfs: Add support for systems without pbuffer supportLaszlo Agocs2014-10-101-2/+2
| | | | | | | | | Use a small native window and window surface in case the hooks indicate that pbuffer support is not available. Change-Id: I6515309041f0e1e2f5321d59941f35d6ee16dca7 Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QNX: Report if GL context is sharedBernd Weimer2014-02-281-8/+9
| | | | | | | | | This fixes the tst_qopengl sharedResourceCleanup auto test Change-Id: I0ac6f45797f656b637254f01c2cb8073436b45b2 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* [QNX] Handle the case when an egl surface can not be createdFabian Bumberger2014-02-021-1/+2
| | | | | | | | | | If an egl surface can not be created (e.g. when out of memory) the application should not crash. In this case we will not be able to make the egl surface current and have to return false in the makeCurrent call in QQnxGlContext. Change-Id: If9b5a82a0f64dc0a42bee687d351bea43fb05d51 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* QNX: Create the egl context according to the version in QSurfaceFormatFabian Bumberger2014-01-281-3/+3
| | | | | | | | Change-Id: Iee556d51ad1d7db2593e3996da4d90d938d13e17 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Blackberry: Cannot create shared egl contexts.Nick Ratelle2013-10-171-1/+9
| | | | | | | | | | Currently the share context is always set to EGL_NO_CONTEXT when it should instead query the share handle from the QOpenGlContext and pass that to the eglCreateContext call. Change-Id: Ia7e32574e1427fba0f919003e5367cfc98688d9d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Split QQnxWindow into QQnxEglWindow and QQnxRasterWindowFabian Bumberger2013-09-181-5/+4
| | | | | | | | Change-Id: I2fb4096ccca54fa6631aa16c9b8d1308b0a6b918 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
* QNX: Enable rendering on different displays using OpenGLFabian Bumberger2013-08-081-112/+42
| | | | | | Change-Id: Ife9c090cff732aba42a5cbc04640721e8fdde69d Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* BlackBerry: fix delayed root window posting on OpenGLRafael Roquetto2013-06-141-0/+3
| | | | | | | | | | | The delayed root window posting introduced by 77a06e7e6c517003 broke the OpenGL support. In that patch, the posting of the root window is trigerred by QQnxRasterRasterBackingStore's call to QQnxWindow::post(), that obviously does not happen when OpenGL is enabled, therefore requiring the OpenGL context to explicitly post() the root window. Change-Id: Ifd302c1dde612a03b79c778ec4586aa70f88260d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QNX: normalize bracesRafael Roquetto2013-05-231-20/+10
| | | | | Change-Id: I05f140a0626e543535cc74c6f737be9be1e27a5d Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* QNX: Code cleanup: normalize 'if' macro usageRafael Roquetto2013-03-261-1/+1
| | | | | | | | | Always use "if defined" instead of "ifdef". The same is valid for "ifndef" macros Change-Id: I8e8f65e36dc636c10b3d656ce9a89ab3a664a80b Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* QNX: Fix qFatal() statements.Sergio Martins2013-02-121-5/+5
| | | | | | "QQNXQBBWindow" doesn't make sense. Change-Id: I0e56d5be4a9bb7a0336f71ea3348621be730dee1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-23/+23
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* QNX: Ensure that the QQnxWindow has a valid size for EGL surfacesSean Harmer2012-08-011-0/+4
| | | | | | | | | | | | | | | | If QWindow::create() gets called before resize() or setGeometry() then the rect argument passed into QQnxWindow::setGeometry() by the ctor is null. This could potentially result in 0 sized buffers and EGL surface creation being attempted. We bail out in this case and tell user how to fix their application. Change-Id: Ia709dba617fa266bd66b61409bdb1c980acfb1a2 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Kevin Ottens <kevin.ottens.qnx@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* QNX: Enable threaded OpenGL rendering on QNXSean Harmer2012-07-031-10/+20
| | | | | | | | | | | | | | The only complicated aspect to this was deferring EGLsurface re-creation as a result of window geometry changes (e.g. when we receive an orientation change event). To allow this to be done in a controlled way we defer the surface manipulation until the next call to QQnxGLContext::makeCurrent(). Change-Id: I8062d3e4d19220a822fbc3b8ca563bb1e3be09d0 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Verify the surfaceType before activating the GL contextHolger Hans Peter Freyther2012-06-051-0/+2
| | | | | | | | | | | | Verify that the surfaceType() of the QPlatformContext is of type OpenGLSurface before making the context active. Make it possible to get the QSurface from a QPlatformSurface, make QPlatformWindow use that to access the QWindow. Remove the setSurfaceType call from the eglfs plugin as this hiding a problem. Change-Id: I08906da052e066bb1f1f042030643c6389ab17d7 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
* QNX: Rationalise the usage of qDebug() to remove lots of #ifdef'sSean Harmer2012-05-251-36/+23
| | | | | | Change-Id: I097e4af86a6a0941f4fd7e122970f88ba536ab38 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Andriy Golovnya <andriy.golovnya@googlemail.com>
* QNX: Make sure calls to (create/destroy)Surface are symmetricKevin Ottens2012-05-241-2/+3
| | | | | | | | | As a matter of fact also reduces state duplication with QQnxWindow by getting rid of m_surfaceSize. Change-Id: I47f5af0f00a317d3bb246c0c9161e2219fbd3263 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
* Do not force OpenGL sample buffers on in the qnx qpa pluginSean Harmer2012-04-191-1/+0
| | | | | | | Change-Id: I6af40382102f2163f5ad8606b498a89db420c5d6 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Don't assume windows and GL contexts are created on the primary screenThomas McGuire2012-03-301-1/+2
| | | | | | | Change-Id: Ib4f1c377bf93b1041b5f5e3fc56c0e01e35aeb38 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Rename blackberry QPA plugin to QNXSean Harmer2012-03-121-0/+356
Changing the naming scheme from Blackberry to QNX in line with pattern of using platform names. Change-Id: I048a6a18010bc932311d63c8dde19ccab97894c8 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>