summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/compositor_api.pri
Commit message (Collapse)AuthorAgeFilesLines
* Introduce QWaylandTextureBufferAttacherMikko Levonmaa2015-10-141-2/+5
| | | | | | | | | | | | | | | | Current surface implementation has two separate pointers to a buffer attacher and it can only be set via the base classes setter. When set externally the QWaylandQuickSurface is unaware of the change and assumes certain members to be present, thus leading to crashes. QWaylandSurface assumes ownership of the attacher instance. This commit also exposes the raw wayland buffer to allow more flexible attachers. Change-Id: If2677b779a035222f92c8dad78b27427c48f0851 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Add QWaylandOutput to support multiple outputsPier Luigi Fiorini2015-02-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove unused headerPier Luigi Fiorini2015-01-301-1/+0
| | | | | | | Remove qwaylandcompositor_p.h leftover. Change-Id: I2ede92db92894f14301c89cc28c896cfdc6d3563 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Expose surface's client to QMLPier Luigi Fiorini2014-08-171-0/+3
| | | | | | | | | | | | | | | Introduce QWaylandClient class that wraps wl_client credentials and has a method to destroy the client. Add QWaylandClient object as a QWaylandSurface property. This come in handy for example when the compositor wants to kill the process of an unresponsive surface or wants to know client credentails. WaylandClient typedef is now useless thus is replaced by QWaylandClient. Change-Id: I997ec459af0f19baef67e7420c90937b197b2e1d Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Do not list a non-existing file in the projectLaszlo Agocs2014-08-111-1/+0
| | | | | Change-Id: I191eb91a160486497c484dde7b92f06bb576cbbe Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Introduce QWaylandSurfaceInterfaceGiulio Camuffo2014-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | Wayland is designed to be easily extensible with new protocol, unfortunately it currently isn't possible with QtCompositor. A QtWayland compositor has two ends: the Wayland end and the shell/wm end, which may be implemented in QML. These two ends communicate mainly through the QWaylandSurface and the QWaylandSurfaceView classes, but the Wayland end is currently unable to hook into custom protocol extensions. This is the purpose of the new QWaylandSurfaceInterface class, and of QWaylandSurfaceOp and its subclasses: based on the QEvent model, QWaylandSurfaceOp has only a type member, and its type specific subclasses have additional data if needed. A custom protocol implementation, such as xdg_surface or my_fancy_surface, will use a QWaylandSurfaceInterface subclass which will call its specific protocol functions when it gets the relative operation requests from the parent surface. The QWaylandShellSurface class is now redundant so it is removed. Change-Id: I37a86157a251626215f57ce030c77a26bfd65126 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Make it possible to have custom shell implementationsGiulio Camuffo2014-04-291-2/+6
| | | | | | | | | | | | | | | | Different compositors may need different shell behaviors, or even different shell protocols. A smartphone compositor, for example, may want to make wl_shell_surface::set_popup or other requests noop, because they don't make sense in the formfactor, or it may even want to not implement wl_shell_surface at all, but some smartphone_shell_surface. A compositor may define its own shell implementation by overriding QWaylandCompositor::initShell(), and creating there its interface instance. The default implementation still creates the built-in wl_shell_surface implementation. Change-Id: I143b0cd4e30e31d4051ada6e562d486d9bf1a751 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Split QWaylandSurface in a model and view fashionGiulio Camuffo2014-04-291-2/+4
| | | | | | | | | | 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-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Don't clobber the m_damaged state during rendering.Gunnar Sletta2014-01-241-4/+2
| | | | | | | | | | | | | | | | | | | | | | If the QWaylandSurfaceNode had m_damage during preprocess() (which it could get if the GUI thread got a surfaceDamaged) it would call into the item, update its texture and clear its m_damaged state. This resulted in that the next time we advanced the buffer queue, the item would not have m_damaged set and as a result, the texture would not be updated. Also, the call from preprocess() to updateTexture, though protected by a mutex in preprocess(), touched a number of variables on the GUI thread which were not being protected there, such as m_damaged and smooth(). The QWaylandSurfaceNode was doing this primarily to deal with direct rendering which has been removed pending a better solution, so we replace its use with the built-in QSGSimpleTextureNode. Change-Id: Ifccb6b1149980b4796a182fa8525446a00bbe57f Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Add Drag&Drop support to compositorJan Arne Petersen2013-11-221-2/+4
| | | | | Change-Id: Ic606ac4dfbb1c55ddb81ac8a912132102753455c Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Add support for text protocol to compositorJan Arne Petersen2013-11-221-2/+4
| | | | | Change-Id: Iff22ba8b10f4ae986acba416d6fbbd4cf4f722e5 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Compositor: Extend QWaylandSurfaceNode from QSGSimpleTextureNodeAndrew Knight2013-10-241-4/+2
| | | | | | | | | Use the convenience base class to remove replicated code and make use of QSGTextureMaterial's internal optimizations. Change-Id: I37e2728eeb62f8cc52ea22c3cc4057d63f948c9b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Qt-ify the QtCompositor moduleAndy Nichols2013-02-081-14/+15
| | | | | | | | | | | | | | | | | | | | Currently the QtCompositor library and API do not follow the Qt API naming conventions. This commit intends to fix these inconsistencies. filenames start with q headers containing private API's end in _p public API classes begin with Q use the qt namespace macros where necessary Wayland namespace is now QtWayland wayland_wrapper classes are now private API's It's important to make these changes not just for stylistic reasons, but also because when qmake builds the module in checks for these conventions to determine how to deploy the include files. Change-Id: I8bfadeceda92a0f52cb73c704551da75540e7587 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* make use of qtHaveModule()Oswald Buddenhagen2013-01-081-1/+1
| | | | | | Change-Id: I7cd0b3e1ac9f326b249bc8ed2ca5abf522cc619a Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
* Fix build when QtQuick is not availableLaszlo Agocs2012-06-181-8/+9
| | | | | Change-Id: I112e8fd8bf9181b4cb72bb9f99be958bd7499e3d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add a custom WaylandSurfaceNode with its own materialsAndy Nichols2012-05-181-2/+6
| | | | | | | | | | | | With the previous WaylandSurfaceNode based on QSGSimpleTextureNode, QSGTexture's created from SHM buffers would always have and use their alpha channels, despite the useTextureAlpha flag being set to false. Now when the useTextureAlpha flag is set to false, we use a material that ignores the textures alpha channel. Change-Id: I9cc33939f37856495f8885357f49de5ffdd81d1f Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Build with latest qtdeclarative.Samuel Rødal2012-03-051-1/+1
| | | | | | | Used the rename-qtdeclarative-symbols.sh script from qtdeclarative/bin. Change-Id: I000b8afc3418fe862c51ce868996a4fd3de495be Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Fix linking errorKent Hansen2012-01-121-1/+1
| | | | | | | | | | Missing "QT += declarative" caused the Q_DECLARATIVE_EXPORT macro to be defined incorrectly, so the linker would complain about missing symbol qdeclarativeelement_destructor. Change-Id: I9638377ddf9478b452362f5ee8c86c0e7b844fc0 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Move event handling into WaylandInput apiJørgen Lind2012-01-111-2/+4
| | | | | | | | | | | | | Qt only gives us 1 input device as of now, ie. the mouse/keyboard and touch events. However, at some point in the future, this will change, so that the events will have a device id. This will ie on x map to the same device, but on evdev this can be different devices. Also this is part of what is needed to implement grabbing Change-Id: Ice049502d6f0f53fd06142d4dedde05806d60120 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Make wayland actually a moduleJørgen Lind2011-12-071-0/+22
Also fix so that QtCompositor can be built as shared object. + fix so that the default QT_WAYLAND_GL_CONFIG is wayland_egl Change-Id: I02b72e99286584426bd37ab2d00bbc84af11efdc Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>