summaryrefslogtreecommitdiff
path: root/src/hardwareintegration
Commit message (Collapse)AuthorAgeFilesLines
* Introduce path for surviving compositor restartsDavid Edmundson2023-03-074-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces an optional mechanism for clients to survive a crash and reconnect seemingly seamlessly. In the event of a disconnect from the compositor socket we simply try to reconnect again and replay any data needed so that we maintain a consistent state to where we left off. From an application point-of-view any open popups will be dismissed and we we potentially get a new framecallback, but it will be almost entirely transparent. Users of custom QWaylandClientExtensions will be notified via the activeChanged signal and rebuild as though the compositor had withdrawn and re-announced the global. OpenGL contexts will be marked as invalid, and handled the same way as a GPU reset. On the next frame RHI will notice these are invalid and recreate them, only now against a new wl_display and new EGLDisplay. Users of low level EGL/native objects might be affected, but the alternative at this point is being closed anyway. The entire codepath is only activated via an environment variable. Change-Id: I6c4acc885540e14cead7640794df86dd974fef4f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Suppress QSharedMemory deprecation warningsMårten Nordheim2023-03-022-3/+5
| | | | | | | | | | | Since some consumers/producers may be using the old API we will use that and suppress the warnings. Reverts 904b9d33dc0ac97b01c811f0bcb8f67f824b052b Change-Id: Ia59fcb241ca991b8f096a07de4946c49f7997d72 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* client: Cleanup CSD contentFBO on surface hideDavid Edmundson2023-03-021-0/+2
| | | | | | | | | | | Otherwise we're wasting a large amount of memory. It will be recreated on the next show. This is also needed for handling compositor reset support where the framebuffer needs recreating. Change-Id: Ia684266f6f7998b0d62d177faf182efdfeaa0f06 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Move setup functions from local to memberThomas Senyk2023-02-272-5/+7
| | | | | | | | | | | | | | Two functions with the same name and signiture were committed in two files. Normally this isn't an issue as those symbols end up in different plugins, however for a static Qt build all are linked into the same binary => symbol clash! Changing those functions to member functions of the respective private classes resolves this issue. As the original name was rather long, it was also shorted in the process. Fixes: QTBUG-111473 Pick-to: 6.5 Change-Id: I0f341a64199637a415898309763f9b5416fc4be1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QOpenGLContext re-creation - orphanedTexturesThomas Senyk2023-02-206-13/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The texture clean-up in the HW-integration has two issues when QOpenGLContext is re-created. 1. texture going out-of-date (QOpenGLContext::aboutToBeDestroyed) and still being used/returned to be used 2. QOpenGLContext dies (QOpenGLContext::aboutToBeDestroyed) while an "discarded" QOpenGLTexture (an orphan) isn't deleted yet. (you can't delete a texture past it's ctx's QOpenGLContext::aboutToBeDestroyed) This patch fixes both issues with a helper and a lambda on 3 HW-integration-backends: wayland-egl, wayland-eglstream and linux-dmabuf Fix for 1.: Simple connection to a lambda that deletes the texture and removes them from the set of used textures. Signal is QOpenGLContext::aboutToBeDestroyed Fix for 2.: A function in each backend: deleteSpecificOrphanedTexture(QOpenGLTexture *texture) Also connected/called by QOpenGLContext::aboutToBeDestroyed Deletes the texture (before deleteOrphanedTextures() does it too late) and removes the dead pointer from the orphanage Pick-to: 6.5 Change-Id: Iccce8845bb669df93f1be43cbe9b9d25f7fd5235 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Disambiguate Vulkan debug constantsFriedemann Kleint2023-02-133-34/+34
| | | | | | | | | They cause clashes in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I4dfef40309a42b8fa662dfa3d99b65d920480aba Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Do not use deprecated QSharedMemory constructorFabian Kosmale2023-02-011-1/+1
| | | | | | Change-Id: Ic2c2ee4256aa16ebfeb51b3c2f7a3430d4104091 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-102-3/+3
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: Ia64c6615ee81f7ad5d0658449b0ee347c3db8c29 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Port from container::count() and length() to size()Marc Mutz2022-10-105-5/+5
| | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: I574208abc90a8042b500b3f96e3862b0ff339eb6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Hold surface read lock throughout QWaylandEglWindow::updateSurfaceDavid Edmundson2022-09-121-2/+4
| | | | | | | | | | | | | | | | | QWaylandEGLWindow::updateSurface is called from both the main and render threads. It is called on the render thread when making the surface current, which could be after the window is hidden if there are cleanup jobs to be done. Whilst the getter wlSurface() holds a read lock, it's not enough as we need the instance alive between the two calls and throughout the mesa code. This potentially fixes a crash seen in mesa where we crash creating a surface for an invalid wl_surface object. Change-Id: I497356e752ffaf3549d174f10c4c268234b02cbd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-235-5/+5
| | | | | | | Task-number: QTBUG-105718 Change-Id: Icb25ea4e07a38eea81f55ed59c6d3b9d37602626 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QWaylandGLContext: print the 0x prefix in error codeThiago Macieira2022-08-101-2/+2
| | | | | | | | | So it's not ambiguous that this is hex, in messages like: "WARNING: QWaylandGLContext::makeCurrent: eglError: 3003" Pick-to: 6.4 Change-Id: Ie4bb662dcb274440ab8bfffd1709ba0415c3d790 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-085-0/+15
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: Ib014757184540728f40df71cd580f01e85fbbb56 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove unused variablesEskil Abrahamsen Blomfeldt2022-06-281-2/+0
| | | | | | | | | They appear to have been around and unused forever, but I've started getting warnings (-are-errors) about this. Pick-to: 6.4 6.3 6.2 5.15 Change-Id: I2f3006aa47de24927d7edd2d7f43cff78f965f87 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Fix build with libcxx (missing array include)Sam James2022-06-201-0/+2
| | | | | | | | | Bug: https://bugs.gentoo.org/833488 Task-number: QTBUG-104435 Change-Id: I06384761a5560b81b675e6c4ae498bb93dcb4f4f Pick-to: 5.15 6.2 6.3 6.4 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1051-1658/+102
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I106d3a5d1a7b96250380b6f51a48f3b19d10e4d9 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtWaylandEglClientHwIntegrationPrivate: includemocsLiang Qi2022-06-011-0/+2
| | | | | | | Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-103295 Change-Id: I27804dc4a26050931ff7d99aaee319d88b254b00 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Replace QScopedPointer with std::unique_ptrThiago Macieira2022-05-111-5/+5
| | | | | | | | | | | | | As the warning asked. qwaylandshellintegrationfactory.cpp:67:28: warning: ‘T* QScopedPointer<T, Cleanup>::take() [with T = QtWaylandClient::QWaylandShellIntegration; Cleanup = QScopedPointerDeleter<QtWaylandClient::QWaylandShellIntegration>]’ is deprecated: Use std::unique_ptr instead, and call release(). [-Wdeprecated-declarations] As a drive-by, change *foo.get() to *foo. Pick-to: 6.3 6.2 Change-Id: I7fb65b80b7844c8d8f26fffd16e97fe161d6a67a Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Allow multiple client buffer integrations to initializeEskil Abrahamsen Blomfeldt2022-05-034-25/+23
| | | | | | | | | | | | | | | | | | | | | | | | | This amends 585f20dce37c398d8b2e6367008e3329dac79e24 where support for multiple client buffer integrations was added. Previously, this would not work unless you also set QT_WAYLAND_IGNORE_BIND_DISPLAY in the environment, because we would fail if eglBindWaylandDisplayWL() returned false, which it will when the display is already bound. Instead, we assume the display is correctly bound when the function returns false, and then we make sure we unbind from the same integration that originally did the bind. The patch adds unbind to the destructor of linux-dmabuf and eglstream integrations. This was previously missing. [ChangeLog][QtWaylandCompositor] Enabled support for multiple client buffer integrations without the need to set the QT_WAYLAND_IGNORE_BIND_DISPLAY environment variable. Fixes: QTBUG-101366 Change-Id: Iefeb865b540d96a55d3be9b9c1fb41bf388638ca Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* QtWaylandClient: use the CMake exports.h supportThiago Macieira2022-04-283-3/+3
| | | | | | | | | | | | The one in qtwaylandglobal.h was wrong. It just happened to work on Linux because the lack of import wasn't an error... until GCC 12 with -mno-direct-extern-access. Pick-to: 6.3 Change-Id: If05aeeb7176e4f13af9afffd16e8535b469f9158 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* wayland: do not rely on transitive includesFabian Kosmale2022-03-113-0/+3
| | | | | Change-Id: I149e04d31ef3e897e25a91450427237069af4c34 Reviewed-by: Liang Qi <liang.qi@qt.io>
* QtWaylandCompositor: use cmake-generated export headersMarc Mutz2022-02-141-2/+2
| | | | | | | | Pick-to: 6.3 Change-Id: Ifda9223dbf9d7c615de6540250a23a6687daecd7 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Do not delete window decorations before next updateInho Lee2022-02-091-8/+10
| | | | | | | | | | | | | When window decorations are turned on/off, a timing issue might happen with accessing deleted decorations. A boolean value, mWindowDecorationEnabled, will be used instead of mWindowDecoration. Pick-to: 6.3 6.2 Fixes: QTBUG-59627 Change-Id: I5514a408d89340fdbf481721ea2dc4bf62078852 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Don't keep eglConfig in hardwareintegrationInho Lee2022-01-254-18/+11
| | | | | | | | | | | | There is no reason to keep eglConfig value as a member variable. Even this can result in creating wrong surface from the current surface. And it makes no sense to change alpha bits of the surface format by supporting decorations. Task-number: QTBUG-97916 Pick-to: 6.3 6.2 5.15 Change-Id: Iaa395d36e83373ea197dc5e14424fcb62cd2cd8b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* wayland-egl: fix build with recent eglplatform.hSamuli Piippo2022-01-171-0/+5
| | | | | | | | | | | | | | | | EGL_NO_X11 has been replaced with USE_X11, thus breaking all existing code out there, including Qt: https://github.com/KhronosGroup/EGL-Registry/pull/130 QtGui/private/qt_egl_p.h now defines USE_X11 whenever we do not define QT_EGL_NO_X11. See also 4cc5428548cb8ab973e4b0281dd123d59bfaf6a0 in qtbase. Fixes: QTBUG-99746 Pick-to: 6.3 6.2 Change-Id: If67b9f1f37dac59bb518010fec08944bc181766d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* client: Fix crash on shutdown on Mesa driverEskil Abrahamsen Blomfeldt2021-12-212-12/+28
| | | | | | | | | | | | | | | | | | | | | On Wayland, then the mesa driver is in use, calling eglDestroySurface() while OpenGL commands are being executed may crash. While this means the driver does not operate by the specs in this case, the driver is so popular that it makes sense to work around it. To work around this, we read-lock the surface while rendering and wait for a write-lock before we destroy the EGL surface. [ChangeLog][QtWaylandClient] Fixed a crash on shutdown that could happen with some graphics-heavy applications when running on Mesa drivers. Pick-to: 6.3 Fixes: QTBUG-92249 Change-Id: I8b8461066cc9f948dc44ddeeddaa6e7d92b76f04 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Remove the XComposite buffer sharing extensionPaul Olav Tvete2021-12-0729-2318/+0
| | | | | | | | | | | | | These extensions were disabled because they did not work properly and they are no longer very useful. It does not make sense to keep non-functional code around when it is unlikely to be fixed. [ChangeLog][Extensions][The xcomposite-egl and xcomposite-glx shell extension protocols have been removed.] Task-number: QTBUG-97985 Change-Id: I0ad37bd2b35551d7b2b1e5e7d4e77a51037864ad Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Introduce new qt-shell and an API for custom shellsPaul Olav Tvete2021-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | Adds a new API for writing custom shell extensions. This API is supported, but semi-public. Binary compatibility is not guaranteed. Also adds qt-shell, a new shell that maps directly to the QWindow API, and provides functionality that Qt provides on other window systems, such as absolute window positions and window activation. This shell is not intended for use on the desktop. This is a squashed commit of a development branch consisting of approximately 60 changes. Contributors: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Paul Olav Tvete <paul.tvete@qt.io> Task-number: QTBUG-94330 Task-number: QTBUG-91542 Change-Id: I419b6bd8179fe03e4da47d328c7ff4b4795b8a91 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* linux-dmabuf-unstable-v1: Fix importing dmabuf buffers with modifiersAlexandros Frantzis2021-06-291-68/+61
| | | | | | | | | | | | | | | | | | | | | | | | Depending on the used modifiers, there are cases where dmabuf buffers may be transported as multiple dmabuf planes, although they are conceptually single plane buffers. An example of a modifier that works like this is I915_FORMAT_MOD_Y_TILED_CCS. In such cases we need to create a single EGLImage by merging all the dmabuf planes. Almost all of the currently supported DRM formats are conceptually single plane, so they require such merging of the dmabuf planes. The only formats that need to be mapped to multiple EGLImages are some YUV based ones, which we are already importing in a different way (see initYuvTexture). In addition, ensure that we don't pass to EGL a modifier value of DRM_FORMAT_MOD_INVALID, since this is not an acceptable value. To indicate a lack of modifiers skip the relevant EGL_DMA_BUF_*_MODIFIER_* attributes altogether. Sponsored-by: LG Electronics Inc. Change-Id: I32a717f3be20927f2f3f4aa0fc6c4f7a5250db33 Pick-to: 5.15 6.1 6.2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Use QEventPoint::State instead of Qt::TouchPointStateJiDe Zhang2021-06-252-0/+4
| | | | | | | | | Also fix compile warnings about -Wenum-compare. Pick-to: 6.2 6.1 6.0 5.15 Change-Id: I5e94fc028c727b155d5db4c7def35d518c497c5c Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove forward declaration for classes that don't exist anymoreAlbert Astals Cid2021-06-182-2/+0
| | | | | | Change-Id: I06bd8056a9892d0affe92ddc262def9d42a471fa Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add "We mean it" to private headersFabian Kosmale2021-06-035-0/+56
| | | | | Change-Id: Ia5c21421be7bc546b04002932dd5571464152635 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add the 'Private' suffix to the internal module namesAlexey Edelev2021-05-312-4/+4
| | | | | | | | Rename internal modules to adjust their names to the internal module policy. Change-Id: Ib9604c0b0dbd2a216d48df3797e912983f7e3c8f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Enhance QWaylandQuickHardwareLayer supportElvis Lee2021-05-311-1/+1
| | | | | | | | | 1. method to re-enable scenegraph painting 2. method to initialize in native level Change-Id: Ia680c25d327608fd9163b46f3d1051d44dc759a8 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* client: Gracefully handle shutdown and window hidingEskil Abrahamsen Blomfeldt2021-05-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | When a window is hidden or destroyed, the render thread may already be rendering. We need to properly read-lock the surface pointer when it is in use and exit when it becomes null. Note that there is also a potential crash in the Mesa GL driver where it keeps a proxy to the wl_surface, so if we delete this while we are still rendering, it can crash inside the driver. This is not addressed by this patch, and has not been reproduced on any other drivers so far. [ChangeLog][Client] Fixed a crash that could happen when hiding or closing windows while Qt Quick was actively rendering on a different thread. Pick-to: 6.0 6.1 5.15 Fixes: QTBUG-91264 Fixes: QTBUG-90037 Task-number: QTBUG-92249 Change-Id: I029b123b83c58740321e8b90a463ced748d8bcf4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Export wayland-egl compositor hwintegrationElvis Lee2021-04-296-6/+34
| | | | | | | | Support wayland-egl compositor hwintegration as a module for external build Change-Id: I794ad4eb38fc2dda31ace1b0eeb2e001020d0956 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Export wayland-egl client hwintegrationElvis Lee2021-04-2811-18/+54
| | | | | | | | | | | Support wayland-egl client hwintegration as a module for external build. Change-Id: I3e82838d0cc89d4bb1435b835dc1e9b592319ddf Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* client: Remove unused header fileEskil Abrahamsen Blomfeldt2021-04-281-62/+0
| | | | | | | | | | The qwaylandegldisplay.h file is not included from anywhere, and also doesn't compile. This is currently in the way of moving the code into a library, as it will then be attempted to be compiled as part of the headersclean check. Change-Id: Ib382f220977f751186c485cc0d866da2587f937d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Replace scale with devicePixelRatio for non-integer scalingJungi Byun2021-03-251-1/+1
| | | | | | | | | | | | | | | The 'scale' event from wayland cannot support non-integer scaling which was originally supported in Qt. As default, devicePixelRatio follows the 'scale' so that the high DPI still works as the mechanism in Wayland. But if non-integer scaling factor such as 150% is needed, it can be supported to override the devicePixelRatio. Change-Id: I63a04db27bd521264b6d0904e1ddd05a572dc970 Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Jungi Byun <jungi.byun@lge.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Support EGL protected contentYoungjin Kim2021-03-152-1/+22
| | | | | | | | | | If a buffer has a protected content like DRM decoded video, the EGL Protected content extension allows GPU to operate on the buffer. With that, wayland-egl can get EGL image and texture from protected content. Change-Id: Ia687fc4ebc348cb03450e06713040acaa34b1cab Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix issue with repeated window size changesJaeyoon Jung2021-03-032-1/+4
| | | | | | | | | | | | | Check if the new window size is different from the size requested previously before calling wl_egl_window_resize. It addresses the issue where repeated setGeometry calls between two sizes might not work as expected. The problem occurs when wl_egl_window_get_attached_size does not get the same size that was requested by the previous setGeometry call. If the returned size happened to match the new size instead, we would mistakenly skip the resize. Change-Id: Iafe4a91cc707f854b9099b6109b6be1423d7bd29 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Clear dirty flag to protect original textureJungi Byun2021-02-042-0/+2
| | | | | | | | | | | | If the dirty flag is kept as true, a texture which is rendered in a thread might be ruined by "glEGLImageTargetTexture2DOES" by another rendering thread. This can cause an undefined behavior like a crash in GPU driver. As same as SharedMemoryBuffer, change the dirty flag into false in WaylandEglClientBuffer and LinuxDmabufClientBuffer. Change-Id: I2deb09703174e6257c13cc0bb542a90f0956c1c2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Use new QTextureFileData::getDataView methodJonas Karlsson2021-01-212-3/+7
| | | | | | Change-Id: I18b96d3ca6c539af811027b6d854dd77251523ed Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix memory leak in QWaylandGLContextEskil Abrahamsen Blomfeldt2021-01-061-0/+2
| | | | | | | | | | | | | | We were leaking an EGL context with every GL context created, which lead to rapid OOM errors in stress tests. [ChangeLog][Qt Wayland Client] Fixed a memory leak when creating QOpenGLContexts on Wayland and using the wayland-egl backend. Fixes: QTBUG-85608 Pick-to: 5.15 Pick-to: 6.0 Change-Id: I8426b5df36ec7ab9e66ce15f9e02edad3aca60b9 Reviewed-by: David Edmundson <davidedmundson@kde.org>
* Adapt to platform API renameTor Arne Vestbø2020-10-122-2/+2
| | | | | | Fixes: QTBUG-87313 Change-Id: I99c0b08d908cffe271b555e0696af5fba3fb8780 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix brcm-egl wayland integrationAaron Dewes2020-09-074-4/+7
| | | | | | | | | | This amends d58008c431 which changed the number of arguments QWindow takes. The brcm-egl integration was not updated for these changes. Pick-to: 5.15 Fixes: QTBUG-86109 Change-Id: I14ad2e5d6a62f5f285d01a4fcd47a34bf9495cf9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Support multiple buffer integrationsPaul Olav Tvete2020-08-2610-18/+27
| | | | | | | | | | | | | Allow compositors to support more than one type of hardware client buffer integration. [ChangeLog][QtWaylandCompositor] QtWaylandCompositor now supports multiple client buffer integrations. QT_WAYLAND_CLIENT_BUFFER_INTEGRATION will now accept a semicolon-separated list. Fixes: QTBUG-68846 Change-Id: Iff1fa0a45b01f6a45dd744c37a89bac7d5e70658 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Compile against latest qtbaseLars Knoll2020-08-244-0/+4
| | | | | Change-Id: I6111cd2e280a7cff610d3f89d51fb3964d61b51f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update to match qtbase changes to platform headersTor Arne Vestbø2020-08-192-10/+22
| | | | | Change-Id: I8e39d87361728c81b526f1ad89b45136500c9913 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Make QWaylandGLContext a QEGLPlatformContextMichal Klocek2020-08-052-171/+47
| | | | | | | | | | | Since 6ff7947 we have a new way of querying for native context. Rewrite some methods to reuse base implementation. [ChangeLog][Client] Using EGL_KHR_surfaceless_context when querying the surface format, if not supported falling back to temporary wayland surface. Change-Id: I276e4b1108a703fb3cf1587db007537e3f36b2fe Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>