summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandquicksurface.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix licensingv5.9.0-beta4Jani Heikkinen2017-05-041-12/+15
| | | | | | | | | | Currently tests are licensed under GPL-EXCEPT, examples under BSD and src under LGPL so replase old license headers with new & proper ones. Also remove old & unused license files Task-number: QTBUG-57147 Change-Id: Ia6a738798736c275dc309ccfa5b627dc2178d241 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use WaylandCompositor module name for export macroPaul Olav Tvete2016-02-151-1/+1
| | | | | | | Change-Id: Ieb65b66f28986845f50647ae338678f0a1e7a153 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Erik Larsson <erik@ortogonal.com> Reviewed-by: Johan Helsing <johan.helsing@theqtcompany.com>
* Rename QtCompositor to QtWaylandCompositorJørgen Lind2015-09-101-1/+1
| | | | | | | enable building QtWaylandCompositor by default Change-Id: I7cf34052b304ca9fef55b7e30ef6a6367b5d75f1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Make it possible to connect to a createSurface signalJørgen Lind2015-09-041-1/+2
| | | | | | | | | | | | Remove the QWaylandSurface factory function from QWaylandCompositor. Add a default constructor to QWaylandSurface and a initialize function. Add som housekeeping code in debug builds that ensures the user calls initialize. Add a fallback factory function on the compositor if the user is fine with getting the default implementation of QWaylandSurface or QWaylandQuickSurface Change-Id: Ib9289c323b6723f0d1119a484cf9e0c26c95b549
* Make the default wl_shell available from QMLJørgen Lind2015-08-281-1/+0
| | | | | | | | | | | | | | This finaly ties together how to use QWaylandQuickItems with different shells It was required to decouple QWaylandView from the QWaylandQuickItem since QML doesn't play to well with muliple inheritance. The QWaylandQuickItem can be retrieved from the QWaylandView which is now conveniently a QObject. Also the QWaylandQuickItem owns the QWaylandView. This architecture also leaves room for creating a QWaylandWidget :) Change-Id: Ib8a00e6f17f0f1bfc3ff244753f021c76db22cb1
* Use QWaylandClient in constructor of QWaylandSurfaceJørgen Lind2015-08-281-1/+1
| | | | | | instead of struct ::wl_client * Change-Id: I606a813e84eeec8134e6ece428f42a53e1ba0189
* Remove output from QWaylandSurfaceJørgen Lind2015-08-281-4/+0
| | | | | | | | | | | | | | | It is the views that belong to outputs. This leads to a couple of interesting cases with enter and leave events, but the implementation says you will get enter events for the first view of a surface entering an output, and for the last view being removed from an output. Also to throttle a surface, there has to be 1 surface which takes care of this. This is because if multiple views throttle, then the client might render to quick. Change-Id: If4bba380fd4d7f506fd769606cbdea4ce58b908d
* Fixups after rebasingJørgen Lind2015-08-281-2/+0
| | | | Change-Id: Ie5d8899157d77f83f2cf65f236d534b972aa4770
* Rename QWaylandQuickView to QWaylandQuickItemJørgen Lind2015-08-281-1/+1
| | | | | | | | | QuickView is already used for something semantically different, lets stick with Item which is a subclass of QWaylandView A QWaylandView is a view of a surface.... Change-Id: I75975485e7b5fb66444fe9fe400effb124882d32
* Rename QWaylandSurfaceView to QWaylandViewJørgen Lind2015-08-281-1/+1
| | | | | | and rename QWaylandSurfaceItem to QWaylandQuickView Change-Id: I989b482eb79df06e9f265bc2b0ef6b3dce7509d6
* Rework how we manage extensionsJørgen Lind2015-08-281-9/+2
| | | | Change-Id: If2cbf096e7419bc1bda007d5167ce39d1a5d50ae
* Move the output from QWaylandSurface to the QWaylandSurfaceViewJørgen Lind2015-08-281-3/+3
| | | | | | | | | and add a property called primaryOutput on the QWaylandSurface. Also add some bookkeeping in QtWayland::Output so it knows what surfaces and views it currently holds, sending the enter and leave events automatically. Change-Id: Ib6efbc6f8157657fb4451b751bba1cb5345b7906
* Move the texture ownership from the QWaylandSurfaceJørgen Lind2015-08-281-10/+0
| | | | | | | | | | | | | | | to the respective QWaylandSurfaceView. For all GL applications this will have no significant impact, but will cause a memory regression for shm surfaces with multiple views. This is done to simplify the creation and destruction of textures, especially in multi-threaded environments. Also the same patch removes the y_inverted property and replaces it with a origin property. Its done in the same patch as a lot of the code was overlapping. Change-Id: I4bce50c614c9ac3ba0580e0560339476eac03433
* Add WaylandOutputWindow itemJørgen Lind2015-08-281-0/+4
| | | | | | | | | | and add a convenience getter on the QWaylandQuickSurface to retrieve the window. This is because the window typically in qml will have additional properties which we want to retrieve. Instead of doing surface.output.window we can now do surface.outputWindow which looks cleaner Change-Id: Ia3007583a8a0e8e01444cb3f8819fbc651be14ab
* Make QWaylandsurface::output a propertyJørgen Lind2015-08-281-0/+1
| | | | Change-Id: I2c82466b0e3842da901449d7978683922331d05e
* Add a shellView property on QWaylandSurfaceJørgen Lind2015-08-281-0/+3
| | | | Change-Id: I68d05698b3caed11ccec39ef06ac5f912d782cf2
* LGPL v3 license change for Qt Wayland CompositorJørgen Lind2015-07-241-11/+14
| | | | Change-Id: I84ed248b471464214d935352768f300d4b90dec3
* Move surfaces to outputsPier Luigi Fiorini2015-04-211-0/+3
| | | | | | | | | Moving surfaces to belong to a specific output. Surfaces can be viewed on a different output anyway. Change-Id: I9ef76300f85190d84b83431374e76e581786e4e7 Done-with: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Update copyright headersJani Heikkinen2015-02-171-21/+13
| | | | | | | | | 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. Change-Id: I5a74d32515c3f1fe7aa1916f4241c92832510f8c Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Fix the compositor's wayland versioningGiulio Camuffo2014-10-091-1/+1
| | | | | | | | | We cannot just assume all clients implement the same version of the various interfaces as the compositor does. Keep track of them, and react accordingly when creating a resource or sending an event. Change-Id: I9792433a14d49c5c4df0c892fc1349ce0dfb0d43 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Replace signals with Q_SIGNALS.Robin Burchell2014-08-191-1/+1
| | | | | | | Fixes tst_headers on QtWayland. Change-Id: I14ba4a58c257d03d10c63f0413460e2bf52793fc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix a few project warningsGiulio Camuffo2014-07-081-1/+1
| | | | | Change-Id: I342b677f529994430125797f1b971f8723e1355a Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Add cmake test for QtCompositor and disable cmake files for QtWaylandClientGiulio Camuffo2014-07-081-3/+2
| | | | | Change-Id: Id6e2d46b55e521218a3c0f44cf9a4a2be5f0df7f Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Rework the way buffers are used and renderedGiulio Camuffo2014-04-291-0/+91
The current way buffers are handled is sub-optimal. They are hidden inside QtWayland::Surface and the actual renderer, be it QtQuick or anything else, cannot get a direct hold of them, nor it can directly control when the underlying textures are created or deleted. The main additions in this commit are the splitting of the QtQuick code path and the new QWaylandBufferRef and QWaylandBufferAttacher classes. QWaylandBufferRef allows a renderer to retain a reference to a wl_buffer even after the underlying Surface discarded it. That allows the renderer to directly decide when to destroy the texture of the buffer. QWaylandBufferAttacher is a pure virtual class which must be implemented by the renderer. Instances of it will be assigned to the QWaylandSurfaces, created. Its attach() virtual method will then be called when a new buffer is committed to the surface. The renderer can then choose to immediately create a texture or wait for some later time. It is its responsibility to create and destroy the GL texture, it will not happen automatically. This functionality is implemented for QtQuick in the new QWaylandQuickCompositor and QWaylandQuickSurface classes. Change-Id: I674b4e5fb8c65c3b1c582e33ff3a0b0e45f2acc9 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>