| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
If makeCurrent was called before the window was exposed, it would disable
resizing, which would block the window from applying the configure which the
client needs to ack in order to be exposed.
Fixes the issue by locking resizing only if the window is exposed.
Change-Id: I0e6b30bc4b08886fb95d502cac0b735d4bb732d2
Fixes: QTBUG-70646
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
QOpenGLContext::makeCurrent no longer sets the current context before calling
the platform function.
Task-number: QTBUG-70511
Change-Id: I67766d43b1142b0742f655b5c2728f4c87fbfb5f
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QPA plugin] Fixed a bug where offscreen surfaces would get
surfaceless EGL contexts.
Fixes a regression in in bf09c7a1.
The call, window->updateSurface(window->isExposed()), is problematic because
offscreen textures are never exposed, and consequently, eglSurface will be
EGL_NO_SURFACE, which will then create a surfaceless context in the call:
eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context)
This reverts to the old behavior of always trying to create an EGL surface,
unless the window doesn't have a valid wl_surface, in which case it doesn't
make sense (which is what bf09c7a1 fixed, QTBUG-65553).
Task-number: QTBUG-70242
Task-number: QTBUG-68605
Task-number: QTBUG-67601
Change-Id: I44b07bb8bf4b33c73c6379a1de8e9e5cfd220b51
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
When creating gl context with egl pass reference format
[ChangeLog][QPA plugin] Fixed a bug where
QSurfaceFormat::renderableType() was ignored when creating an OpenGL
context.
Change-Id: Id7ae55413b8b515e344e9147345631186bef6d6c
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
| |
Context creation would sometimes fail because of this.
Change-Id: Icf73a42ee2bb984ebfc09b7ed98f094d544134b8
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
|
|
| |
Initialize to nullptr to prevent undefined behavior.
Change-Id: I7753c0be77a886d62ecb1cd7b86fc8c98340b0b8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang-tidy -p compile_commands.json $file \
-checks='-*,modernize-use-default-member-init,readability-redundant-member-init' \
-config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' \
-header-filter='qtwayland' \
-fix
Afterwards I ran search and replace on the diff to clean up some whitespace errors:
- Replaced '(\n\+[^:\n]*)(:\s+\+\s+)' with '$1: '
- Replaced '(\n\+[^,\n]*)(,\s+\+\s+)' with '$1, '
- Replaced '\n\+\s*\n' with '\n'
I also had to do some manual edits, because for some reason, this particular
clang-tidy check doesn't trigger for some files.
Change-Id: I3b3909bac4bf20108bbe8ad1e01bcc54236dae1b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|\
| |
| |
| | |
Change-Id: I603cbb164e6015c1bb7796bd8bb055d84dbc3b04
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QWaylandEglWindow deletes surfaces when a window changes from hidden to
visible, presumably as a result of us not having a valid wl_surface
object. By extension it doesn't make sense to create a surface whilst a
window is still hidden.
This fixes a crash where a QQuickWindow hides and then is destroyed. In
QQuickWindow destruction we have to create a valid context in order to
delete any textures/assets owned by the scene graph; as the wl_surface
has gone this causes an error in the EGL libs when we create an EGL
surface.
Task-number: QTBUG-65553
Change-Id: I9b37a86326bf2cd7737c4e839c1aa8c74cf08116
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|/
|
|
|
|
|
| |
Change-Id: I9699a957430b8d3574ce29acb91b7ada9ea6209b
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 5.7 refactoring for QOpenGLFunctions introduced new requirements for the
QPlatformGLContext::getProcAddress implementations. Implementations outside of
qtbase were unfortunately forgotten. QtWayland's implementation does not derive
from the common EGL version so it needs its own patch.
Task-number: QTBUG-57326
Change-Id: Ie2ad22bf5986870aac74adc1e4c654c616091034
Reviewed-by: Risto Avila <risto.avila@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I7883470e22deb089240d86df7dc2d625a107a53e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | | |
This introduces the new compositor API, removing the
old API (which was never officially supported).
Change-Id: I1dc01f0fb4edc749e34ed8356e56ad87d7d64913
|
| |/
| |
| |
| | |
Change-Id: I09f34fe3ea6bb3b57e49c63284f48d8af908ec1a
|
|/
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This is in preparation for decoration plugins.
Change-Id: Idb322a7a5cbc2eb5bf2cce019073f9f4fb46297f
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Id840ace3d762e47c0076745301e8012755077770
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
| |
Change-Id: I6a21f447f31e9eeeafed81275c33b0c2c79e1c8a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I0fb0dcdf9d9691bbda602a7cf6cd04ce2e094769
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
|
|
|
|
| |
Change-Id: Ifae97cc4538989bc45641bda5ce2ec8a7d8980ce
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Ibf400b32f78a6a0fcf0991914d2d9ad684483979
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
|
|
Change-Id: I0d383e4cdd59c4e4eae5506c814f0c80ecbf58ae
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
|