summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandquickcompositor.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace all occurrences of Q_DECL_OVERRIDE with overrideJohan Klokkhammer Helsing2017-01-231-4/+4
| | | | | Change-Id: I16b7b23efe944b49d1fcc9e7588cdb0a991cebd1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Compile with -Wzero-as-null-pointer-constantPaul Olav Tvete2016-05-251-1/+1
| | | | | | | | Task-number: QTBUG-53619 Change-Id: Idf073287f215113431cad64f85628e010176ab74 Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Add API to grab a surface's contentGiulio Camuffo2016-04-181-0/+2
| | | | | | | | This patch adds a new QWaylandSurfaceGrabber class. The user can use it to grab a surface's content, and get a QImage with the data. Change-Id: I25dd72a8ba39201cd91addbfc976b93ca1e05112 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* 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>
* Move the createDefaultSurface function to QWaylandCompositorPrivateJørgen Lind2015-09-101-4/+0
| | | | | | | | | | Its really not meant to be reimplemented by other classes than QWaylandCompositor or QWaylandQuickCompositor because of the createSurface signal. If someone really wants to use the virtual function then they can subclass the private Change-Id: Iad88fde3fc999ac18bdc57bd37864884865a962a Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Remove legacy namingJørgen Lind2015-09-101-6/+0
| | | | | Change-Id: Ibf7fad69085b4439b7d5cc3fd1a7aa24ed9e03c3 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Make it possible to connect to a createSurface signalJørgen Lind2015-09-041-2/+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 it possible to construct QWaylandOutputJørgen Lind2015-09-041-2/+0
| | | | | | | | | | | | | | | This requires QWaylandOutput to be initialized. This will happend when the QWaylandCompositor of the QWaylandOutputSpace that is set on the QWaylandOutput is created. QWaylandCompositor will send or post a Polish event to the QWaylandOutput which again will call QWaylandOutput::initialize. This function will create the global that will be put on the wl_displays registry This makes it possible to Create WaylandOutputs in QML (see the pure-qml example) and also gives a better programming model in C++ Change-Id: Iaf907ae18a283678eda6d04390dc9790ae0bced8
* Make Manufacturer & Model modifiable properties of QWaylandOutputJørgen Lind2015-09-021-3/+1
| | | | | | This to make construction look nicer and make them modifyable from QML Change-Id: I5f5ffffb34f664914cdb531736c42a6873bfe18c
* Remove the default shell functionalityJørgen Lind2015-08-281-5/+0
| | | | | | | | This will be readded in a different way. Also, remove the WaylandSurfaceChrome since it is no longer needed, and just use WaylandView directly Change-Id: I8d4a7b2135d9fdaea7dd3fcd729e55cceebf48fb
* Remove the QWaylandCompositor::createView virtual functionJørgen Lind2015-08-281-1/+0
| | | | | | | | | Views are just a representation of the QWaylandSurface, and many different types of view "sub-classes" will exist depending on its perticular use. Dont enforce just one view implementation for one compositor. Change-Id: Ie237a73e63638e70713f89b479fb1b248426c9ac
* Rename QWaylandSurfaceView to QWaylandViewJørgen Lind2015-08-281-1/+5
| | | | | | and rename QWaylandSurfaceItem to QWaylandQuickView Change-Id: I989b482eb79df06e9f265bc2b0ef6b3dce7509d6
* Introducing QWaylandOutputSpaceJørgen Lind2015-08-281-1/+2
| | | | | | | | | | Its purpose is to make it possible to have multiscreen environments, and also multiple multioutput environments It is also an abstraction to make it clear that outputs are arranged in a 2d space Change-Id: I418509996a03b2ca1a12aec9c9e25e143a15a10f
* Make it possible to set a QWaylandSurface on the QWaylandSurfaceViewJørgen Lind2015-08-281-1/+1
| | | | | | This will allow us to use QWaylandSurfaceItem from within QML Change-Id: I6ecfbf3a5de5f5a748a6a85295b9741316fef976
* Make it possible to add the default shell from qmlJørgen Lind2015-08-281-1/+12
| | | | Change-Id: I00f01a42b98dbe76851800b87a725fcca16f824e
* Make it optional to register the QWaylandQuick types to qmlJørgen Lind2015-08-281-0/+10
| | | | Change-Id: Ic50e3516e435a354ad478349d9af86a5a112f5c7
* Make QWaylandCompositor inherit QObjectJørgen Lind2015-08-281-1/+1
| | | | | | | | | | | | | | | | | And remove the constructor arguments, and just having parent as a constructor argument. This requires QWaylandCompositor to have a create semantic familiar from QWindow and QOpenGLContext. On create the native wayland socket is created and initialized. Also the virtual functions surfaceCreated and surfaceAboutToBeDestroyed have been converted to signals, removing the need to subclass QWaylandCompositor Examples have been changed to avoid having two super classes inheriting QObject. This is done by either making the QWindow subclass a member or making the QWaylandCompositor a member. Change-Id: I317d37e2adca15bfe4e1904e20ab0d83943b2d45
* Add createSurface factory function on QWaylandCompositorJørgen Lind2015-08-281-5/+1
| | | | | | This simplifies subclassing the compositor getting Change-Id: I392b84febae62df042b23fa806360bc068bf984f
* LGPL v3 license change for Qt Wayland CompositorJørgen Lind2015-07-241-11/+14
| | | | Change-Id: I84ed248b471464214d935352768f300d4b90dec3
* Update copyright headersJani Heikkinen2015-02-171-22/+14
| | | | | | | | | 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>
* Add QWaylandOutput to support multiple outputsPier Luigi Fiorini2015-02-081-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a new QWaylandOutput class to support multiple outputs. Each QWaylandOutput need a window for rendering. Rename OutputGlobal to Output and Output to OutputResource. Add support for physical size, mode and available geometry. Use better defaults for geometry and refreshRate from the QWindow if available. A window is no longer passed to QWaylandCompositor constructor and all output related methods are removed, however one or more outputs are required for hardware integration. QWaylandCompositor returns a list of outputs and offers an API to add or remove outputs. Hardware integrations can run headless. Change-Id: I742996571ddb78328f7bfa4f79b25a81995279e1 Done-with: Jan Arne Petersen <jan.petersen@kdab.com> Done-with: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix a few project warningsGiulio Camuffo2014-07-081-0/+2
| | | | | Change-Id: I342b677f529994430125797f1b971f8723e1355a Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Split QWaylandSurface in a model and view fashionGiulio Camuffo2014-04-291-0/+3
| | | | | | | | | | QtQuick compositors already use a view class (QWaylandSurfaceItem), so add a new QWaylandSurfaceView, which is subclassed by QWaylandSurfaceItem, and move the view related methods of QWaylandSurface there. A QWaylandSurface can have many views. Change-Id: I7e92fe1f7e9d252f5f40a3097feabb5f3318b03a Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Rework the way buffers are used and renderedGiulio Camuffo2014-04-291-0/+64
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>