summaryrefslogtreecommitdiffstats
path: root/src/compositor
Commit message (Collapse)AuthorAgeFilesLines
* Don't crash at application exitwip/texturesharing-5.12Paul Olav Tvete2019-06-051-1/+1
| | | | | | | | | | | | | | | Qt Quick may destroy objects after QGuiApplication shutdown. It is not possible to call any QOpenGL functions at that point (including QOpenGLContext::currentContext()), and there is no point since the graphics resources will be released by the system anyway. Fixes: QTBUG-76053 Change-Id: Ic86c8fb5a34126ab03178cda3071d712582ed496 Reviewed-by: Johan Helsing <johan.helsing@qt.io> (cherry picked from commit 280d0e557eabe9410632edf32ed46e712535c45b) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'qt/5.12' into texturesharing-5.12Paul Olav Tvete2019-06-0511-11/+61
|\ | | | | | | Change-Id: Ib8fba00f848821bfab58d33aff74ace436af204a
| * Compositor: Map touch ids to contiguous idsJohan Klokkhammer Helsing2019-05-222-1/+20
| | | | | | | | | | | | | | | | | | | | The protocol doesn't require this, but some clients seem to depend on it nevertheless. Fixes: QTBUG-75667 Change-Id: I47491c396d3c9193c7e51e13c7ca1586246e335c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 869a38c082daf150a16b2abb230b420de3e4af31)
| * Fix compile error with -no-openglJohan Klokkhammer Helsing2019-05-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Fixed a build error when configured with -no-opengl. This is the same fix as in dev's 8663de3f, but leaves the QML APIs disabled. Fixes: QTBUG-76104 Change-Id: I9807144e0c0cf33d421c7c6adcb2664e1e67368c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
| * Docs: Fix incorrect version for module importJohan Klokkhammer Helsing2019-04-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This fixes an issue with the XdgShell documentation where the import statement at the top was too low (1.1 instead of 1.3) Later we should make it automatically follow the Qt minor version (see QTBUG-74042). Fixes: QTBUG-73256 Change-Id: Ib280998fe9c65168854e517b8555c5cd9b17cdd7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Compositor: Add qwaylandoutput_p.h to headersJohan Klokkhammer Helsing2019-04-241-0/+1
| | | | | | | | | | | | Fixes: QTBUG-75329 Change-Id: Ifdd93e28ebf971ab10f7d051c2da56d115f2068b Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
| * Compositor: Fix compilation problems for qwaylandshell.hJohan Klokkhammer Helsing2019-04-172-2/+26
| | | | | | | | | | | | | | | | | | | | | | d65783c broke compilation for code that includes qwaylandshell.h, but not qwaylandshell_p.h, because QWaylandShellPrivate is an incomplete type and we don't know that it's convertible to QWaylandCompositorExtensionPrivate by just looking at the public header. And we can't move the QWaylandShellTemplate constructors to the cpp file because it's a template class. Change-Id: Ia2d093de74429ace33d08b91743cbc8b7e7befa8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * compositor: fix QWaylandShell private objects inheritanceChristophe Chapuis2019-04-035-6/+10
| | | | | | | | | | | | | | | | | | | | If the public API has inheritance relationships, this should be reflected in the private classes too. Otherwise the d_func will cast to a wrong type, leading to crashes. Change-Id: Iad2dccad4b63326e6b108a44c708ab51f0784678 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | New texture sharing protocol and infrastructurePaul Olav Tvete2019-03-293-3/+661
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a higher level protocol on top of the server buffer extension, providing an easy way for Qt Quick applications to use the shared textures. [ChangeLog] Added protocol and Qt Quick image provider for sharing textures in graphics memory between compositor and multiple clients. Task-number: QTBUG-73822 Change-Id: Idc41b3479d6ca37be35d9ccd7b89e9994ff17f8f Reviewed-by: Johan Helsing <johan.helsing@qt.io> (cherry picked from commit 80001cbf0451f4ba2a971fb20b80dc8e25ac604d) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Implement server-side toOpenGlTexture for VulkanPaul Olav Tvete2019-03-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This allows the compositor to use the textures shared through the vulkan server buffer extension in its own UI. Adds a new virtual function ServerBuffer::releaseOpenGlTexture(). Change-Id: I48a8dfd020832fe55cfd5594a3274ba285a7cf09 Reviewed-by: Johan Helsing <johan.helsing@qt.io> (cherry picked from commit 19361e7259f04b08925b1e8e99faf9460770ee7b) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compressed texture support for vulkan server buffersPaul Olav Tvete2019-03-291-1/+9
| | | | | | | | | | | | | | | | | | | | Adding new virtual function createServerBufferFromData() to the ServerBufferIntegration class. Change-Id: I6009fd5aec07f1794431bd52ccd56cfae9d0f77b Reviewed-by: Johan Helsing <johan.helsing@qt.io> (cherry picked from commit f710489a341713c675cfd91d22ccd7bf8f29f4dd) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Add server buffer integration based on VulkanPaul Olav Tvete2019-03-291-0/+10
|/ | | | | | | | | | | | Using NVIDIA's Vulkan/GL interop function: glGetVkProcAddrNV [ChangeLog] Added Vulkan-based server buffer integration for NVIDIA EGLStreams. Change-Id: I500f80ff3b00a9585178976d8e400baa38e89ef6 Reviewed-by: Johan Helsing <johan.helsing@qt.io> (cherry picked from commit df3a1761af2f20d59ae09a7adaa2f5b959047687) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Call eglUnbindWaylandDisplayWL when destroying the compositorJohan Klokkhammer Helsing2019-03-141-0/+3
| | | | | | | | | | | | | | | If unbind is not called, some drivers may try to do cleanup that depends on a valid wl_display in eglTerminate. Arguably, this could/should also have been fixed in the affected drivers. There is a display_destroy signal that the driver should listen to, to avoid using dangling wl_display and wl_global pointers. However, by using eglUnbindWaylandDisplayWL we can force the cleanup to happen before wl_display_destroy. Which is what this patch does. Change-Id: Id9062de896b723838bcecac3902031e6b172a6de Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Fix the build with -no-guiLiang Qi2019-02-251-0/+1
| | | | | | Change-Id: I9ff6ac4e33e89691e06965515a54e91a831b7a0a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Doc: Fix wrong link to isBufferLockedNico Vertriest2019-02-071-2/+2
| | | | | | Change-Id: I5024e50af6e403e9373181948b36548bc0862f9b Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Merge remote-tracking branch 'qt/5.12.1' into 5.12Paul Olav Tvete2019-01-211-1/+1
|\ | | | | | | Change-Id: I6ca92b605c55b0c8941d42e40fad624f00a65cd3
| * Fix flickering (black frames) of wayland clients on NVIDIADominik Holland2019-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the threaded render loop rendering the texture we acquired from the eglstream is done in a different thread. This rendering needs to be finished before the next acquire call for the eglstream is done otherwise we might end up rendering a broken (black) frame and see the client flicker. To fix this, make sure to send the frame callbacks after the rendering was completed and not before the rendering starts. Change-Id: I5a75914d14d2df7fa8b6bbd526f87e3ef6208cd6 Task-number: QTBUG-71697 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Remove stray surfaceDestroyed() declarationPier Luigi Fiorini2019-01-181-1/+0
| | | | | | | | | | Change-Id: I1a23d6ab5a455603990db269446c15a012c0f879 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Remove unimplemented QWaylandCompositor::createSurfaceViewJohan Klokkhammer Helsing2019-01-181-2/+0
|/ | | | | | | | Seems like it was just a left behind by mistake in fffa0f76 back in 2011. Fixes: QTBUG-73070 Change-Id: I3055d2c72cd6752de9917d765684ff049c0dbc6c Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Compositor: Fix crash in QWaylandSurface::waylandClientJohan Klokkhammer Helsing2018-12-222-1/+14
| | | | | | | | Adds a test for customSurface which crashed without the fix. Fixes: QTBUG-72688 Change-Id: I30c50e474379c61b90b2dd294eae9a7c88c105a2 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
* Fix invalid QWaylandOutputMode comparison operatorJędrzej Nowacki2018-12-061-2/+2
| | | | | | Fixes: QTBUG-72288 Change-Id: I61fde92ea4275febbb4ec8c067280a4ca570d7c1 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* use new feature name xkbcommon_evdev -> xkbcommonGatis Paeglis2018-12-054-18/+18
| | | | | | | | | The xkbcommon configure logic was refactored in qtbase/c3a963da1f9e7b1d37e63eedded61da4fbdaaf9a. For more details see the relevant commit. Change-Id: Ic1aa26846ab8266c589f6e92dc8b81aba36df58a Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-12-051-1/+3
|\ | | | | | | Change-Id: Ica38060e6d624a7534660eabec604f6795970c95
| * Don't crash if view is deleted from surfaceDestroyed signalv5.12.0-rc2v5.12.0-rc1v5.12.0Paul Olav Tvete2018-11-071-1/+3
| | | | | | | | | | | | | | | | Fix regression introduced in 297bcd005c4205f69e1bf9e9dc565ab757cf0bac Fixes: QTBUG-71643 Change-Id: I769518a9ca13fcd13ea277c7fa8ac1885ca123ba Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Fix compilation with gcc 4.8Ville Voutilainen2018-12-043-10/+22
| | | | | | | | | | | | | | | | | | | | GCC 4.8 doesn't like QPointers in signal connections. Also, Default Member Initializers for aggregates are C++14, so we need to write a constructor to make a class with DMIs work in C++11. Change-Id: I567c60a8081fa2f268517ec747bd6534674bcce5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix build due to missing QDebug includeSergio Martins2018-11-301-0/+1
|/ | | | | | | Build was failing on Archlinux Change-Id: I3cf9a367a099cd365a2de6579c7ef5585cd9be56 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Compositor: Add const version of QWaylandQuickItem::inputRegionContainsJohan Klokkhammer Helsing2018-10-222-1/+12
| | | | | Change-Id: I649149e2cee24f8296bf24a22ee8bb865feea9c6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Emit signals after applying pending surface statev5.12.0-beta3Johan Klokkhammer Helsing2018-10-182-50/+40
| | | | | | | | | | | | | | | | [ChangeLog][Compositor] Fixed a bug where some signals on QWaylandSurface were emitted before all double buffered state had been applied. Restructures QWaylandSurface::commit so no signals are emitted until all state mutations are completed. Adds a test to confirm that pending state is applied at once. Also fixes opaqueRegion, which is documented to be double buffered as well, but the old implementation set it immediately. Change-Id: I1c4dfea7c83dd9ee84dc8c03e6d92e2924bf2fad Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Don't send ivi_surface configure events with negative sizeJohan Klokkhammer Helsing2018-10-041-0/+4
| | | | | | | Similarly to how we don't do it for xdg_shell or wl_shell. Change-Id: I61cd453858c9fdff148364f4dfb85c345943725c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Fix crash after surface destructionJohan Klokkhammer Helsing2018-10-011-1/+1
| | | | | | | | Fixes a crash due to dangling pointer dereference in QWaylandQuickItem::inputMethodQuery. Change-Id: Id379779f23221e7de17423f75c3d78d7e794b7b9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add server buffer integration using Linux dma-bufPaul Olav Tvete2018-09-211-0/+11
| | | | | | Fixes: QTBUG-70494 Change-Id: Iaa4990fe9d39a1f9fb81f5e5f19039aa2e52dcac Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Add virtual QtWayland::ServerBuffer::bufferInUse()Paul Olav Tvete2018-09-211-0/+1
| | | | | | | | This allows the compositor to reclaim unused graphics memory when a buffer is no longer used by clients. Change-Id: Ia0269608019c5120da8c091c81e165411b563554 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Add logging category for hardware integrationsPaul Olav Tvete2018-09-202-0/+2
| | | | | | | qLcWaylandCompositorHardwareIntegration, "qt.waylandcompositor.hardwareintegration" Change-Id: I977ccc53f51b24b58acee08c424b806868550eac Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Change compositor categorized logging namespacePaul Olav Tvete2018-09-203-6/+8
| | | | | | | | | [ChangeLog][Compositor] Add new categorized logging namespace "qt.waylandcompositor" and rename "qt.compositor.input.methods" to "qt.waylandcompositor.inputmethods" Change-Id: Id861e527e3eb8582fdc96f8497fad0cba0766847 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Don't use members of wl_resourceJohan Klokkhammer Helsing2018-09-185-8/+8
| | | | | | | | | When we switch to only including core wayland headers, wl_resource will be an opaque type. Use the getters and setter functions instead. Task-number: QTBUG-70553 Change-Id: I7d84d48a4ee3586f231a331cd15716686dcee775 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Rename addSocketFd to addSocketDescriptorJohan Klokkhammer Helsing2018-09-172-4/+4
| | | | | | | | Generally we prefer not to use abbreviated names. It now also matches what's in other Qt modules. Change-Id: I67d54961bebf93760780be54761c6122069f1e1d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove ifdefs for unsupported libwayland versionsJohan Klokkhammer Helsing2018-09-172-18/+0
| | | | | | | The ifdefs were for version 1.2.0. Change-Id: Ie58745c7cf4c0fba45bc5203d24e9913d3a8b8ce Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compositor: Use Q_PRIVATE_SLOTs in QWaylandOutputJohan Klokkhammer Helsing2018-09-173-37/+34
| | | | | Change-Id: I25a8feb0919dcccc30d2f23d619e0ba5d4c214ff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Compositor: Rename QWaylandKeyboard::toScanCode to keyToScanCodeJohan Klokkhammer Helsing2018-09-173-4/+4
| | | | | | | Since the key argument is an int, the signature looks ambiguous otherwise. Change-Id: I732971437ff7354ad3863ecfe42c779a06a84d69 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove confusing elses after returnsJohan Klokkhammer Helsing2018-09-142-8/+4
| | | | | Change-Id: I0ba39df637f6e5ce93ba57f40f279c81532e9289 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add missing Q_UNUSEDJohan Klokkhammer Helsing2018-09-141-0/+1
| | | | | Change-Id: I41ff947ed5fd18d19058583ed3da51225d353af9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Merge remote-tracking branch 'qt/5.11' into 5.12Paul Olav Tvete2018-09-122-24/+35
|\ | | | | | | Change-Id: I703c03c4c92889f82a1c8d16eb906bad9fa10461
| * Don't destroy buffer before surfaceDestroyed signalPaul Olav Tvete2018-09-112-24/+35
| | | | | | | | | | | | | | | | Give the application time to set buffer lock first. Change-Id: Id8a7ee8956bc587344b8eece7072edff5197414c Task-number: QTBUG-69384 Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* | Create feature wayland-shm-emulation-server-bufferJohan Klokkhammer Helsing2018-09-101-0/+5
| | | | | | | | | | | | | | | | | | And make OpenGL a requirement, in order to make builds without OpenGL work again. Fixes: QTBUG-69779 Change-Id: Iff1153b0aaca8e115f47c59c2ceb028e638e3fe9 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Prefix and suffix server buffer integrationsJohan Klokkhammer Helsing2018-09-101-2/+2
| | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Features for server buffer integrations have been renamed. "drm-egl-server" is now "wayland-drm-egl-server-buffer" and "libhybris-egl-server" is "wayland-libhybris-egl-server-buffer". Change-Id: I06a9d1b1c9219c88045fe966be134ff072cd756e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Compositor: Add XdgToplevel::xdgSurfaceJohan Klokkhammer Helsing2018-09-072-0/+19
| | | | | | | | | | | | | | Similar to the property we already have for popups, XdgPopup::xdgSurface. Change-Id: I1a0b77b28a35597139fcf381a4b345ccaa93d626 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into 5.12Qt Forward Merge Bot2018-09-063-3/+6
|\| | | | | | | Change-Id: I06b86b413984c07f6be98120450bc859dab271c1
| * Compositor: Don't send illegal leave eventsJohan Klokkhammer Helsing2018-09-051-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a client doesn't bind to an output, don't try to send leave events for it. ...similarly to how we don't send enter events for it. weston-simple-egl is one such client. [ChangeLog][Compositor] Fixed a bug that caused some clients to abort in libwayland when a surface left an output. Change-Id: Ia7f4c21a7d766092dfb8a20c56fa1128a3046f97 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Compositor: Fix OpenGL textures deleted prematurelyJohan Klokkhammer Helsing2018-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][Compositor] Fixed a bug where destroying a WaylandQuickItem would delete the OpenGL texture for all other WaylandQuickItems using that surface. The texture QWaylandBufferRef::toOpenGLTexture returns is owned by the buffer (documented public API), so setting QQuickWindow::TextureOwnsGLTexture in QWaylandTextureProvider is wrong. Task-number: QTBUG-70163 Change-Id: I831f2aa81ed20c08d4d87bccac33650ab86d19c8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * Compositor: Fix resize grab release for xdg-shell-v6Johan Klokkhammer Helsing2018-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The grab was only released for the move state, so if a window was resized, it would continue to be in the resize state until it was moved. This makes sure all grabs are released when the mouse is released. [ChangeLog][Compositor] Fixed a bug where ShellSurfaceItems for XdgToplevelV6s wouldn't stop resizing. Task-number: QTBUG-70126 Change-Id: I37d8359dca5f21f2fb52b781a94846a961211a02 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>