summaryrefslogtreecommitdiffstats
path: root/src/compositor/hardware_integration/qwlclientbufferintegration_p.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 the feature system internallyLars Knoll2016-11-231-1/+1
| | | | | | | | | Get rid of almost all DEFINES += ... in the pro files, instead use the proper QT_CONFIG() macro to determine whether a feature is available. Change-Id: I867769be2085c6ba93b6815e223e2b89edcb245d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Refactor buffer handlingPaul Olav Tvete2016-10-011-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | We cannot support bindToTexture() functions. On some platforms the texture is provided by the driver. Therefore, the HW integration must always provide a texture. This has the added bonus of unifying the two separate code paths that were introduced when EGLStream support was added. Add a separate buffer manager that owns all buffers. Don't destroy buffer objects on release. The client will probably attach them again later. Also, release shm buffers immediately after uploading to texture (needs to be documented that image() will not work afterwards). Make the old SurfaceBuffer class into an abstract base class, so we can store state in the buffer class instead of having to map from the wl_resource in each buffer integration. Move the shared memory buffer handling into a separate subclass. Change-Id: I81e471d13c92913d31ea1efe487f93fa908b5e0c Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io> Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* Fixed eglStream compositingDominik Holland2016-05-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | When creating the eglStream from the fd we also need to create the texture and call stream_consumer_gltexture. Otherwise the wayland client can't create the wayland client surface. Fixed the qwindow-compositor example to use the texture associated to the QWaylandBufferRef when compositing a EXTERNAL_OES target. QML compositing only works when QSG_RENDER_LOOP is set to basic as we need to generate a texture from the gui thread. As the texture is created by the bufferintegration it might end up in a different gl context than the quick item using it. The texture is also deleted together with the buffer, which prevents the use of the texture afterwards. Both problems need to be fixed in follow up commits. Task-number: QTBUG-50850 Change-Id: Ifec67bbe9e4b2a680c871dc4aced37b71b7b6f80 Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* QtWaylandCompositor: Add support for different EGL buffer formatsLouai Al-Khanji2016-04-291-1/+2
| | | | | Change-Id: Idfeeedbf247fa81dccdf28a1aa04f878900ed262 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.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>
* Merge branch '5.6' into wip-compositor-apiLaszlo Agocs2015-10-271-7/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qwindow-compositor changes from 5.6 will be adapted separately. The traditional wayland-egl path is tested and is functional like before. The EGLStream support will be verified separately once the qwindow-compositor changes are ready. Conflicts: examples/wayland/qwindow-compositor/qwindowcompositor.cpp examples/wayland/qwindow-compositor/textureblitter.cpp examples/wayland/qwindow-compositor/textureblitter.h examples/wayland/server-buffer/client/client.pro examples/wayland/server-buffer/compositor/compositor.pro src/compositor/compositor_api/qwaylandbufferref.cpp src/compositor/compositor_api/qwaylandbufferref.h src/compositor/hardware_integration/qwlclientbufferintegration_p.h src/compositor/wayland_wrapper/qwlkeyboard.cpp src/compositor/wayland_wrapper/qwlkeyboard_p.h src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp src/compositor/wayland_wrapper/qwlsurfacebuffer_p.h src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro Change-Id: Ic2e3a6e8f74606c35b1e27cd4016fa133527d7ba
| * Support EGLStream in wayland-eglLaszlo Agocs2015-10-201-4/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Wayland on NVIDIA. Tested with a Jetson TK1 Pro and Vibrante Linux. With just the hw integration no compositors would work out of the box since EGL_KHR_stream_consumer_gltexture only allows connecting to the texture bound to GL_TEXTURE_EXTERNAL_OES, meaning that assumptions about the target always being GL_TEXTURE_2D break horribly both in C++ and in shader code. In addition, buffers have to be extended with an additional updateTexture() operation as EGLStream requires to call ConsumerAcquire on every frame. Previously there was no concept of this as calling createTexture() on attach() was sufficient. Qt Quick bits are omitted since the refactored compositor API is pretty different. This means that QML compositors will not currently function in this environment. The qwindow-compositor example is enhanced to support the external texture target, but this won't apply for the refactored branch either. It is provided for testing purposes for the time being, and to show how C++ compositors can support different texture targets and correct operation with EGLStreams. Done-with: Louai Al-Khanji <louai.al-khanji@theqtcompany.com> Change-Id: I0e209fc0cbcf435cca83528d938eb50e4bdceb82 Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
* | Merge branch 'qt/5.6' into wip-compositor-apiPaul Olav Tvete2015-10-131-0/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/wayland/pure-qml/main.cpp examples/wayland/pure-qml/qml/Chrome.qml examples/wayland/pure-qml/qml/main.qml src/client/qwaylanddnd_p.h src/compositor/compositor_api/qwaylandquicksurface.cpp src/compositor/compositor_api/qwaylandsurface_p.h src/compositor/compositor_api/qwaylandsurfaceitem.cpp src/compositor/extensions/qwlinputmethodcontext_p.h src/compositor/hardware_integration/qwlclientbufferintegration_p.h src/compositor/hardware_integration/qwlclientbufferintegrationfactory_p.h src/compositor/hardware_integration/qwlclientbufferintegrationplugin_p.h src/compositor/hardware_integration/qwlhwintegration_p.h src/compositor/hardware_integration/qwlserverbufferintegrationfactory_p.h src/compositor/hardware_integration/qwlserverbufferintegrationplugin_p.h src/compositor/wayland_wrapper/qwlcompositor_p.h src/compositor/wayland_wrapper/qwldatadevice_p.h src/compositor/wayland_wrapper/qwldatadevicemanager_p.h src/compositor/wayland_wrapper/qwldatasource_p.h src/compositor/wayland_wrapper/qwlextendedsurface_p.h src/compositor/wayland_wrapper/qwlinputdevice_p.h src/compositor/wayland_wrapper/qwlinputmethod_p.h src/compositor/wayland_wrapper/qwlinputpanel_p.h src/compositor/wayland_wrapper/qwlinputpanelsurface_p.h src/compositor/wayland_wrapper/qwlkeyboard.cpp src/compositor/wayland_wrapper/qwlkeyboard_p.h src/compositor/wayland_wrapper/qwloutput_p.h src/compositor/wayland_wrapper/qwlpointer_p.h src/compositor/wayland_wrapper/qwlregion_p.h src/compositor/wayland_wrapper/qwlshellsurface_p.h src/compositor/wayland_wrapper/qwlsubsurface_p.h src/compositor/wayland_wrapper/qwlsurface.cpp src/compositor/wayland_wrapper/qwlsurface_p.h src/compositor/wayland_wrapper/qwltextinput_p.h src/compositor/wayland_wrapper/qwltextinputmanager_p.h src/compositor/wayland_wrapper/qwltouch_p.h src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration_p.h src/imports/compositor/WaylandCursorItem.qml Change-Id: I4e63ef295b297022d4970b3c68b3d565843086bd
| * Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-051-0/+11
| | | | | | | | | | Change-Id: I70c01453b3939d1d645d626ae84c21ab4c9d267a Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* | Rename QtCompositor to QtWaylandCompositorJørgen Lind2015-09-101-2/+2
| | | | | | | | | | | | | | enable building QtWaylandCompositor by default Change-Id: I7cf34052b304ca9fef55b7e30ef6a6367b5d75f1 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* | Remove QtWayland::Compositor and add QWaylandCompositorPrivateJørgen Lind2015-08-281-1/+1
| | | | | | | | | | | | Embrace PIMPL Change-Id: I8c8b5971e15c208317ff33231bda1513e7b8d489
* | Move the texture ownership from the QWaylandSurfaceJørgen Lind2015-08-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | LGPL v3 license change for Qt Wayland CompositorJørgen Lind2015-07-241-27/+23
|/ | | | Change-Id: I84ed248b471464214d935352768f300d4b90dec3
* Update copyright headersJani Heikkinen2015-02-171-4/+4
| | | | | | | | | 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>
* Remove the unused context parameter from lock/unlockLaszlo Agocs2014-08-261-2/+2
| | | | | | | Nothing relies on it and we are anyway passing null. Change-Id: I2543650441c7f97d23b52bc7a4caa555b0777676 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Making the buffer intgrations privateJorgen Lind2014-02-111-0/+90
Change-Id: Ifb6e2456c781e80f84e27e68c3e279ea993f9307 Reviewed-by: Andy Nichols <andy.nichols@digia.com>