summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-301-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/client/qwaylandinputcontext_p.h src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h Change-Id: Iac517e1985e4e67d7ca00ca4c10dcda9dd9079f9
| * Fix content positioning relative to decoration on scaled outputsJohan Klokkhammer Helsing2016-06-081-1/+1
| | | | | | | | | | | | | | | | | | Only the width and height were scaled previously, causing an incorrect offset from the lower left corner, resulting in a small transparent gap to form between the decoration and the content on the right and top. Change-Id: I0b253c05c9b260d9ff3a6ab5f8aea42370561959 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
* | Use getProcAddress(const char*) to work with updates in QOpenGLContextErik Larsson2016-03-021-2/+2
| | | | | | | | | | | | | | | | | | QOpenGLContext changed the getProcAddress overload to use const char* instead of QByteArray in commit (qtbase 29d8159c4478a5275d2ea102daf270a91ed7e92e). Change-Id: Idce613ebd06daeb111fd76ebee89a82182d028d5 Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
* | Updated license headersAntti Kokko2016-01-201-14/+20
| | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I76ae5d3e64f096eb3163d6163a38d68c7c1ca756 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge branch 'wip-compositor-api' into devPaul Olav Tvete2015-12-021-1/+1
|\ \ | | | | | | | | | | | | | | | | | | This introduces the new compositor API, removing the old API (which was never officially supported). Change-Id: I1dc01f0fb4edc749e34ed8356e56ad87d7d64913
| * | Make sure to update the content fbo for QWaylandGLContextJørgen Lind2015-08-281-1/+1
| |/ | | | | | | Change-Id: I09f34fe3ea6bb3b57e49c63284f48d8af908ec1a
* / Make swap buffer call non-blocking for subsurfacesMikko Levonmaa2015-11-121-1/+29
|/ | | | | | | | | Allows clients that use subsurfaces in synchronized mode to continue processing the event loop even in cases where a frame callback is not delivered from the compositor pending a parent surface commit Change-Id: I7df38afc4080546b60184dacecde321ba8062fac Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix threaded OpenGL rendering on Mesa and possibly other EGLsGiulio Camuffo2015-05-141-3/+13
| | | | | | | | | eglBindAPI's docs says "defines the current rendering API for EGL in the thread it is called from". We were instead just calling it in the thread the context was created in, not in the thread used for rendering. Change-Id: Iba8ffe75a6f4f8b9d1bba59c0e7cce34499e9c48 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* 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>
* Namespace the platform pluginsGiulio Camuffo2015-01-291-0/+4
| | | | | | | | | | | | There currently is a QWaylandInputDevice class both in the wayland QPA plugin and in the QtCompositor API. This causes the qwindow-compositor example to crash when running nested in a wayland session due to a mismatch between the two classes. By namespacing all the plugin code we make sure that name clashes will not happen anymore. Change-Id: I17497cff697599200bea68bf01dfde474526390f Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Implement high-dpi supportMorten Johan Sorvig2014-12-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | | Wayland 1.2 added support for display scaling, where wl_output has a "scale" event informing the the client that the compositor will scale the output surfaces by the given factor. The client then has the option of providing large surfaces to match the target pixel densety and bypass the compositor's scaling. This is done by calling wl_surface::set_buffer_scale. Re-use the current high-dpi support in Qt by implementing devicePixelRatio() for QWaylandScreen and QWaylandWindow. Provide high resolution buffers both for raster and OpenGL graphics. Introduce a new coordinate system: buffer coordinates, which is related to the window coordinate system via an "int scale" scale factor. This scale factor corresponds to Qts qreal devicePixelRatio, but we keep the name and the type in the QtWayland implementation. Change-Id: Ie10d7e5b4833480a9a25d96a26ad02150eb6e83f Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Support the creation of >= 3.x OpenGL contextsGiulio Camuffo2014-09-301-107/+267
| | | | | | | | | Use the EGL_KHR_create_context extension if available to create modern gl contexts. We disable window decorations on core profiles because that mandates a VAO to be used. Change-Id: Id6044e64f6736244ae9d593af4d68c4000a31de6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Rename QWaylandDecoration => QWaylandAbstractDecorationRobin Burchell2014-09-231-1/+1
| | | | | | | This is in preparation for decoration plugins. Change-Id: Idb322a7a5cbc2eb5bf2cce019073f9f4fb46297f Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Fix window decorations for GL appsLaszlo Agocs2014-09-061-2/+7
| | | | | | | | | | | | You cannot have rounded corners with an alpha-less config. To make OpenGL applications appearing with the correct decoration, alpha must be enabled. With this fix the OpenGL apps' decoration will now look identical to the SHM apps'. Change-Id: I24431ddab63146f7f697c85277f00f41e5c55e85 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Warn when EGLContext could not be created.Gunnar Sletta2014-08-291-0/+4
| | | | | Change-Id: Id840ace3d762e47c0076745301e8012755077770 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
* Fix build with desktop OpenGLGiulio Camuffo2014-08-231-15/+19
| | | | | Change-Id: I6a21f447f31e9eeeafed81275c33b0c2c79e1c8a 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-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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-201-6/+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>
* Don't create an invalidated surface when not neededGiulio Camuffo2014-05-211-1/+1
| | | | | | | | 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>
* Egl surfaces can now be invalidated, make sure to recreate themGiulio Camuffo2014-04-221-0/+4
| | | | | | Change-Id: Ifae97cc4538989bc45641bda5ce2ec8a7d8980ce Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.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>
* Make classes in client privateJorgen Lind2013-12-271-3/+3
| | | | | Change-Id: Ibf400b32f78a6a0fcf0991914d2d9ad684483979 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Move to new hardware structure for the platform pluginsJorgen Lind2013-12-271-0/+261
Change-Id: I0d383e4cdd59c4e4eae5506c814f0c80ecbf58ae Reviewed-by: Andy Nichols <andy.nichols@digia.com>