summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration
Commit message (Collapse)AuthorAgeFilesLines
...
* Returns false for window decoration support in xcomposite and brcmLaszlo Agocs2014-08-253-0/+3
| | | | | Change-Id: Ibc8eae85219da044812d22967c46b4bebb5e27bf Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Indicate from the client buffer integration if decorations are supportedLaszlo Agocs2014-08-252-0/+6
| | | | | | | | | | | | | | Custom client buffer integrations may not care about window decorations. Setting QT_WAYLAND_DISABLE_WINDOWDECORATION is tedious and error-prone. And it cannot be omitted since things like input events will be off if the common client code thinks decorations are in use but the client buffer integration does not render them at all. Therefore add a supportsWindowDecoration() virtual in addition to the environment variable. Change-Id: If8f621182d5c230f4d8d679c050f5d27aed6c2fb Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Support RasterGLSurface windowsLaszlo Agocs2014-08-253-9/+22
| | | | | | | | | | | | | | | | | In an attempt to make QOpenGLWidget and QQuickWidget working on Wayland. Since Qt 5.3 all widget windows are of type RasterGLSurface (given that the plugin reports this capability which wayland will, with this patch). Such a window can behave either like a raster or an OpenGL window. This concept maps badly to platform plugins that have a rigid separation between raster and OpenGL platform window implementations. From now on, the OpenGL window implementation, that is used pretty much always, except for raw RasterSurface windows, must be prepared to behave like a raster window too, which involves having a backingstore. Change-Id: I0226704b8d5893843fcae68059c5fe9ad2f5e761 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix return type conflict with libhybrisYen-Chin Lee2014-08-251-2/+2
| | | | | | | | | | The return type in 'PFNEGLHYBRISGETNATIVEBUFFERINFOPROC' and 'PFNEGLHYBRISSERIALIZENATIVEBUFFERPROC' conflict with hybris_native.h, it is void while it should be EGLBoolean. Change-Id: Ia23ab4da59b3a904eb5b2884398ab5dd207f415b Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Yen-Chin Lee <coldnew.tw@gmail.com>
* Fix build with desktop OpenGLGiulio Camuffo2014-08-231-15/+19
| | | | | Change-Id: I6a21f447f31e9eeeafed81275c33b0c2c79e1c8a Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Explicitly define the interface versionsGiulio Camuffo2014-08-232-2/+2
| | | | | | | | | | Currently a global is bound with the version the interface has in the xml file. This is a problem for apps that explicitly link to libwayland-client because they may link to a newer libwayland, so the version of some interface may be higher than the one that it is actually implemented. Change-Id: Id0dbe6c0f1e05fe91954b9d8d9472d42d2053cdc Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Save and restore the state when doing decorationsLaszlo Agocs2014-08-221-15/+126
| | | | | | | | | | | | | | | The idea that swapBuffers() randomly changes the state is ridiculous and breaks even Qt's own OpenGL examples. An application, that has full control over its context and rendering, is not necessarily prepared for random state changes in its context. To overcome this, save and restore all the interesting state. This is fragile and applications can break it in different ways by setting all sorts of exotic state, esp. when using modern OpenGL. For GLES2 level stuff it should be sufficient, though. Change-Id: I52e7ba4072b241eb92f5f04b81d707ad5bc68f6d Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Do not request the highest color buffer sizeLaszlo Agocs2014-08-212-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | That third parameter is dangerous and should never be set to true, unless you know what you are doing. eglfs does not set this flag either. Do the same in wayland-egl, otherwise certain context/window creation patterns (in particular with QOffscrenSurface, which is often created with an existing context's format()) will end up with incompatible contexts and surfaces on systems that offer both 565 and 888 configs. Long story short, setting the flag ignores the extra check in the EGL config selection logic that ensures that you get a config you asked for, i.e. that a 888 config will not be returned (unless there is no other choice) if 565 was explicitly requested in the input QSurfaceFormat. The result is that we may get a 888 config even when explicitly asking for 565. However asking for unspecified will give 565. In the QOffscreenSurface case this means having an 565 context and a 888 window -> bad match. Not setting the flag brings the expected behavior: not specifying the color buffer sizes chooses the lower buffer size (565), explicitly specifying 565 chooses 565, while explicitly specifying 888 prioritizes 888 configs. Change-Id: Ia78086a9f255f2933cda7de4f5787d71d58a1356 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Avoid allocating and (failing to) manage our own texture cacheGunnar Sletta2014-08-202-7/+2
| | | | | | | | | | There is no reason we should be allocating and managing our own set of window decorations. This is only going to add to the total texture memory used and because it is managed as a shared GL resource, it would have needed some care during cleanup to clean it up correctly. Change-Id: I19651837da6b3dfde0f78a964982f3f67e577493 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* wayland-egl: Logging cleanup.Robin Burchell2014-08-181-13/+15
| | | | | | | | | Prefix warnings with QtCompositor so it's clear where they are coming from. Remove trailing newlines from messages, they aren't needed. Also, only warn if something actually goes wrong. Change-Id: I88b8b03480d938a08a84a4964108d10d86606be6 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix namespaced buildGiulio Camuffo2014-08-072-1/+3
| | | | | Change-Id: Id73f8ddffe00359f38c634fc88b1f81ac5638653 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix fetching of the y-inverted value fomr the wayland-egl integrationGiulio Camuffo2014-07-291-0/+1
| | | | | | | | The default return value of isYInverted() is true, but we want to return false by that point, unless the ifdeffed part was thrown away. Change-Id: Ia875c1e3083c7c378cc7dd1f4b634f6fa7500f5b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Reduce headers inter-dependency in the QPA pluginGiulio Camuffo2014-06-162-0/+4
| | | | | Change-Id: I8b810e54531453b6a80250555c21bb0b1e6e76cc Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix generated code for interface names not starting with qt_ or wl_Giulio Camuffo2014-06-121-1/+1
| | | | | | | | | The generated code for an interface without a qt_ or wl_ prefix was broken, and could not compile. This commit needs a 'make clean' to let qtwaylandscanner run again. Change-Id: Id9c7e3f87385f83eeffd1e8718c854a405f411f0 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix glx_xcomposite build after change in QtPlatformSupportGiulio Camuffo2014-06-031-1/+1
| | | | | | | The API was changed by qtbase's af1e32426c50694c0e4c1c292aa5eeee3b38c7bc Change-Id: I38ec8f1be5f5ffb4b93097ce4e72c9a61c9459d0 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Don't create an invalidated surface when not neededGiulio Camuffo2014-05-213-6/+10
| | | | | | | | After invalidateSurface() is called we don't want to recreate the EGLSurface on setGeometry() until makeCurrent is called Change-Id: Ide10ecf3bff40a01fa1ed249986a631c77c2bf63 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Show the correct function name when makeCurrent failsLaszlo Agocs2014-05-121-1/+1
| | | | | Change-Id: I0fb0dcdf9d9691bbda602a7cf6cd04ce2e094769 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix build after QEGLPlatformContext API changeLaszlo Agocs2014-05-123-4/+7
| | | | | Change-Id: I7f2a72ad1430d48f54565b3996b61260756f3edf Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Egl surfaces can now be invalidated, make sure to recreate themGiulio Camuffo2014-04-223-1/+11
| | | | | | Change-Id: Ifae97cc4538989bc45641bda5ce2ec8a7d8980ce Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Implement invalidateSurface() to free up surface memoryGunnar Sletta2014-04-072-0/+10
| | | | | | Change-Id: I848a9f37f1b2e9616c3e5254a6329531e8eec825 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Deal with 0x0 sized egl windowsGiulio Camuffo2014-04-072-27/+32
| | | | | | | wl_egl_windows must have both the width and height > 0 to be valid Change-Id: I444f3732d9df3eabf12bbd966ac62093866b6926 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add a libhybris hardwareintegrations to share EGL server buffersGiulio Camuffo2014-03-266-0/+760
| | | | | | | | | Add a hardwareintegration plugin to make Qt server side EGL buffers shareable from the compositor to the client, such as what the server-buffer example does. Change-Id: I24558324d51202ca449b47b0ee395c8e81c10698 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Fix NPOT decoration texture bindingCedric Chedaleux2014-03-121-0/+4
| | | | | | | | If the context does not support the NPOTTextureRepeat (i.e. GL_OES_texture_npot extension), wrapping must be set to CLAMP_TO_EDGE to prevent invalid texture mapping. Change-Id: I3ededccc14a32188986529c14fa91161fb383cfc Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fixup for GLX integrationJorgen Lind2014-03-117-13/+17
| | | | | Change-Id: I2de94481f7d3e109fdce7ca961f8969299cf5d9e Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix build breakLaszlo Agocs2014-03-111-1/+1
| | | | | | | Remove the removed argument from the EGL platform context constructor. Change-Id: I6203d07c356f7191a698d8d5bc958923cbdc2d96 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Create the egl windows and context with the right configGiulio Camuffo2014-03-062-6/+6
| | | | | | | | | | The egl config should be calculated when creating the window, and the format of it should be set accordingly. The format of the window and the one of the context will then match if using the same format as input. Change-Id: Ie93735171d8945111a450263089e192919249b68 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Making the buffer intgrations privateJorgen Lind2014-02-1110-25/+25
| | | | | Change-Id: Ifb6e2456c781e80f84e27e68c3e279ea993f9307 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Merge remote-tracking branch 'origin/stable' into devAndy Nichols2014-02-0419-94/+77
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h src/compositor/hardware_integration/qwaylandclientbufferintegrationplugin.h src/compositor/hardware_integration/qwaylandserverbufferintegrationplugin.h src/plugins/hardwareintegration/client/brcm-egl/main.cpp src/plugins/hardwareintegration/client/drm-egl-server/main.cpp src/plugins/hardwareintegration/client/wayland-egl/main.cpp src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp Change-Id: I9a9b418075970dd334babc3590b9b0315c2afb0d
| * fix compile with Mesa 10.0Clemens Buchacher2014-01-291-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mesa 10.0 replaces struct wl_buffer with struct wl_resource in the eglQueryWaylandBufferWL signature. The structures are binary compatible (struct wl_buffer is a superset of struct wl_resource), but C++ complains about the type mismatch: error: cannot convert ‘wl_buffer*’ to ‘wl_resource*’ in argument passing We are already using struct wl_resource on our side, so removing the now redundant reinterpret_cast would fix it. But then we could not compile with Mesa versions older than 10.0 any more, and those are still common in mainstream distributions today. A compile-time switch for different Mesa versions is possible, but unnecessarily clumsy. Instead, re-declare the new signature and use that independently of the Mesa version. The duplicate declaration can be removed when backwards compatibility is no longer needed. Change-Id: I3d0e326f5a0eb88d125b8c9fd23147682e23b94b Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * Allow resizing the Qt window after the buffers swapGiulio Camuffo2014-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | Some EGL implementations resize the EGL buffers after eglSwapBuffers, so we need to send the geometry change event after the swap, or else the Qt window size and the physical buffer size will be different to each other. Do not force this behavior though, but use it only when the QT_WAYLAND_RESIZE_AFTER_SWAP environment variable is set. Change-Id: I79e39442b3010c563a81d7c94e747a982e158fc1 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| * Removed directrender/pageflipper codepaths.Gunnar Sletta2014-01-212-18/+0
| | | | | | | | | | | | | | Change-Id: I770b79eb21fbc4ac7826cec5c47286dab6c74da5 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
| * Fix pkgconfig for brcm-egl hw integrationLaszlo Agocs2014-01-152-1/+14
| | | | | | | | | | Change-Id: I092eaebad40785a68c0c9c22201c9e2d39666ea9 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * brcm-egl fix: do not remove previous include dirsLaszlo Agocs2014-01-151-1/+1
| | | | | | | | | | Change-Id: I5fef403fa99fc3ac1181cf0b7e149a5d3337a50d Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Fixup the brcm-egl hardware integrationsJorgen Lind2014-01-1510-26/+40
| | | | | | | | | | Change-Id: I2a25c7d0b5019c30f31cba1f608a8731be6b1f10 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Fix up brcml-egl buffer swapLaszlo Agocs2014-01-152-32/+3
| | | | | | | | | | | | | | | | | | | | | | There is no need to do attach/damage/commit on the gui thread, doing it on whatever thread we are (e.g. the render thread of scenegraph) is fine. There is no need for flushRequests() either which means the entire metacall can be removed. Change-Id: Ia2ecf7cacc97787e68a97dc6a02641653e072ed3 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Make the glx backend compile againJorgen Lind2014-01-103-10/+11
| | | | | | | | | | | | | | Still needs some renaming and verification, but this makes it compile at least Change-Id: Ifb7fc68e8705f235bf0edf2ae9bb38274b693d3c Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
| * Add missing pkg-config packageJorgen Lind2014-01-103-3/+3
| | | | | | | | | | | | | | The hardware integrations needs to pick up the correct include path Change-Id: I457028803d3a4086bff53be4aa91417c1b293623 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge remote-tracking branch stable into devAndy Nichols2014-01-098-8/+22
|/ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/compositor/hardware_integration/qwaylandclientbufferintegrationplugin.h src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp src/plugins/platforms/qwayland-brcm-egl/main.cpp src/plugins/platforms/qwayland-egl/main.cpp src/plugins/platforms/qwayland-generic/main.cpp src/plugins/platforms/qwayland-xcomposite-egl/main.cpp src/plugins/platforms/qwayland-xcomposite-glx/main.cpp Change-Id: I957c9bee893a9e19fc8c93f0e51292007fb3a4a8
* Include wayland-client with < and not "Jorgen Lind2014-01-094-4/+4
| | | | | Change-Id: Ida61437bb76c81ee2af57856d9be9694e2fdb4a4 Reviewed-by: Andrew Knight <andrew.knight@digia.com>
* Adjust the serverbufferintegrations to use bind texture apiJorgen Lind2014-01-094-16/+5
| | | | | | | | It mapps closer to the underlying OpenGL architecture Change-Id: I4e0dca4d54670846488c86df2a0fa0c58d49734d Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Revised createTextureFromBufferLaszlo Agocs2014-01-068-38/+14
| | | | | | | | | | | | The context is not passed anymore to texture() and similar functions since they have to use the current context anyhow. createTextureFromBuffer() becomes bindTextureToBuffer() which is called with the texture bound. The integration can also provide its own texture in case the one created and managed by the surfacebuffer is not suitable. Change-Id: I1bfc4fe35c0e3db6081b47c551f20f4bca9aa04e Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* update DrmEglServerIntegration to handle experimental 8 bit supportJorgen Lind2014-01-062-19/+43
| | | | | Change-Id: I8fa4ecf8b0848ca681f944a5fa56a4f6bb0a76be Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Update the Compositor side ServerBufferIntegrationJorgen Lind2014-01-032-0/+17
| | | | | | | | so its possible to ask for supported formats and make the createServerBuffer function pure virtual Change-Id: Idf07b993ea54927a51d43ef5e3a11fa1639dc1fe Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add a size to the QWaylandServerBuffer on the client sideJorgen Lind2014-01-031-1/+0
| | | | | Change-Id: I48b7d514c1231eb4bd4a30f1329a89515b497269 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Make classes in client privateJorgen Lind2013-12-2710-14/+14
| | | | | Change-Id: Ibf400b32f78a6a0fcf0991914d2d9ad684483979 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Add drm-egl server buffer integrationJorgen Lind2013-12-276-0/+670
| | | | | Change-Id: Ib72cb43e78c068ebafa8c4e8ef1576746c7015e8 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Remove stale createGLIntegration functionsJorgen Lind2013-12-273-14/+0
| | | | | | | | They are not used anymore since QtWaylandClient supports subclassing QWaylandIntegration Change-Id: I847a412725c4ce06377886b44236f9793b609399 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Remove compiler warnings in compositor:wayland-eglJorgen Lind2013-12-271-2/+2
| | | | | Change-Id: I898e7f55076cb55996fd44931eb74e9fb112ceed Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Change constructor of QWaylandClientBufferIntegrationJorgen Lind2013-12-274-17/+20
| | | | | | | | | For QWaylandClientBufferIntegrations to be loadable from plugins the constructor shold not take any arguments, but give the display in the initialize function Change-Id: Ie38555120d7f29c6ba7eef0f095837235782684d Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Rename QWaylandGLIntegration to QWaylandClientBufferIntegrationJorgen Lind2013-12-2711-57/+55
| | | | | | | also add a factory to load QWaylandClientBufferIntegrationPlugins Change-Id: Ia6a03627659b0452439ae664fceef21eaf0f6de0 Reviewed-by: Andy Nichols <andy.nichols@digia.com>