Age | Commit message (Collapse) | Author | Files | Lines |
|
Conflicts:
src/client/qwaylandwindow.cpp
Change-Id: I80ead87f3e1f36299b1bf9cc9c7db6cd48c0e86f
|
|
When a client attachs a NULL buffer on a surface we may want to hang on
to the old buffer for a bit, e.g. to do a hide animation.
Add the QWaylandUnmapLock class to keep a surface mapped after an attach(0)
request.
Change-Id: I5d5be0b36410a76a58d2b68c1b2ac5e3b875a801
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|
It is a bit dangerous to call wl_display_dispatch() in the event thread,
since it may race with the dispatch called e.g. in QWaylandDisplay's
blockingReadEvents() and lead to a dead lock. Instead, use wl_display_prepare_read()
and wl_display_read_events() in the event thread, which doesn't block, and only
dispatch in QWaylandDisplay.
As a result we don't need the additional wayland queue anymore, so remove it.
Change-Id: I9fbbe5d2f38d06773beb7847df1a0212cca92c37
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|
Conflicts:
src/client/qwaylandshmbackingstore.cpp
src/client/qwaylandwindow.cpp
Change-Id: I795fd08f0fc5d3cb5ed55bf16e724f66b7567723
|
|
Unused since commit fc439e40e37f9c0b3108225f951fb19bb3abee80
Rework the way buffers are used and rendered
Also remove associated slots that are now empty in server-buffer.
Change-Id: I33be0bc6a5e175553d28e9ead54fefd2f0c07ce0
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
Always use GL_CLAMP_TO_EDGE instead of GL_REPEAT, since OpenGL ES2
doesn't support NPOT textures in combination with GL_REPEAT by
default, and repeat is not needed anyway.
See also qtbase commits:
8dfeb1c374972f06759a92b4edc5d6a18b96ccec
8ab1323842433fb6b45e7d6f381b4b9710a81da9
72558e810d9b3493dabfc936fa6c8bf3c3f3b49c
Change-Id: I01770fe3352da05baf6898d63c091bfae95e7a98
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
|
|
It was being called with a garbage pointer, since the signal does not
have an object argument anymore.
This has been changed in commit fc439e40e37f9c0b3108225f951fb19bb3abee80
Rework the way buffers are used and rendered
Change-Id: I220c52285909dc93aebd128fc418df3c8a6bd37c
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.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>
|
|
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>
|
|
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>
|
|
Change-Id: I9a3285dc5bddd848ec557287c4641d9edce752a9
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
|
|
Conforming to the Qt project directory structure.
Change-Id: I452867fabc88e9594fa26f944b5d3e1ca4ffc720
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
|
|
We cannot just assume all clients implement the same version of the
various interfaces as the compositor does. Keep track of them, and
react accordingly when creating a resource or sending an event.
Change-Id: I9792433a14d49c5c4df0c892fc1349ce0dfb0d43
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
|
That's a public class in Qt 5.4. Use the more appropriate CompositorWindow.
Change-Id: Id7de20c7e2d5b373f8ef9fe9a836188dc864479e
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
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>
|
|
With a SHM client, if a null attach happened, then the old buffer would be
deleted but left with a dangling pointer which would be deleted again on the
destructor.
This was revealed by tst_dialog.
Change-Id: I89e22487e7ec982789a4b7dfd45e5db7db3222d1
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
|
|
Change-Id: Ibf6facdd1fba72c2f9741e49cf2c83f9b4136ffc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
|
|
Change-Id: I6ba4731abbf892f8f7bb0a0d5b30bba8082e67be
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
setCursorSurface may be invoked with a null surface.
This was exposed by tst_QWidget::destroyBackingStore.
Change-Id: Iac1ef6d2f17e5ee6a693ddbf3875b743bde2ded1
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
Change-Id: I76303b8640f013167159d94e8db7d673358c4983
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
Change-Id: I1072d6efa059e01d8dcba98c90320bcc242d1c0f
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
|
|
Change-Id: Id73f8ddffe00359f38c634fc88b1f81ac5638653
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
|
|
The previous virtual method initShell() was not working because
it was called from QWaylandCompositor constructor.
Replace that with a mthod to create the default shell to be
manually called by the compositors if they so choose.
Change-Id: I35a1dc0edfaf4237ca47b532645ac0d95752311c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
|
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>
|
|
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>
|
|
A surface without any attached shell surface should never be mapped,
so make the latter set the mapped state on the surface.
Change-Id: If09bd9eebecd6e0a52f862cb866d85aec403c3a0
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
|
|
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>
|
|
The QWidget API isn't well fit for a Wayland compositor, and does
not have any advantage over a QWindow, which can also draw using
QPainter. Besides the current implementation doesn't work properly,
and no one seems to be interested in fixing it.
Change-Id: Id1c337506af48e1d1fdd8d14f0ed637d299702f3
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
|
It must redraw, even if it doesn't actually redraw anything, irrespective
of the fact that a attach/damage has come or not. Just calling frame();commit()
is perfectly valid.
Change-Id: If298654b8a7cb7c954cfbad8618f23134731cb9f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
|
We want to make sure the events reach the clients asap.
Change-Id: I0783c6be4f4412fd5f3665faec1e57d141291ce7
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
|
Change-Id: I8efbda3e5266c5668b2461429a21d900e2ecd175
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
|
When there is a rendering thread, like with QtQuick compositors,
there is a race condition where the frame callbacks are sent before
the last buffer the client sent is released.
Assume the following scenario:
attach(B1)/frame(F1)/commit()...frame started...attach(B2)/frame(F2)/
commit()...frame finished.
On frame finished the callback just installed is emitted before the
buffer B2 is being used and B1 released. That forces the client to
allocate a third buffer to draw the next frame.
Now, do not send out the frame callbacks until a new frame started.
The successive draw will release B1, use the new B2 and than send out F2.
Change-Id: I5743c7baf9fdd3cde28c5f594ff646c06abb74b7
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
|
A client calling attach(A);commit();attach(B);commit() should result
in its back buffer be set to B, and A be discarded.
If the client wants to have a queue it should keep it client side or
a protocol extension tailored for that purpose should be developed.
Change-Id: Ia0048f311504d85821df9f5b9225887801efec71
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
|
Conflicts:
src/compositor/wayland_wrapper/qwlsurface.cpp
Change-Id: I3b6a4af41f272d3dc7fc920ba2542f2dd7978175
|
|
Change-Id: Ifb6e2456c781e80f84e27e68c3e279ea993f9307
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
|
|
Change-Id: Idb0ad89c47fdca7249022049c00063a4d0bac95a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
|
Improve the way wl_surface's frame callbacks are handled. The sooner
they are sent the better is for the clients, as they have more time to
render the next frame, but reducing the time for the compositor to
render its frame. The best compromise is probably to send them out
after the compositor has issued its GL calls but before calling
eglSwapBuffers(), and before the GPU actually draws anything.
Rename the function to send the callbacks to only reflect its purpose,
leaving the compositors free to choose when they want to send them.
Change-Id: Ifcdfcad9e54b4d07d5c087898123ac724395a194
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
|
Fixes build break when built on linux with wayland libs installed
via pkg manager.
Change-Id: I17be64e702d07e817a2e34e76ddbe8dde064f3d2
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
|
|
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
|
|
Change-Id: I888ef46381342af61a48c6e542ec564e67adfe13
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
|
The surface now has a distinct back and front buffer. Front means it
is on the screen and being used as a texture. Back means it should be
put to screen in the next updatePaintNode().
For the purpose of QML and GUI-thread properties, the 'back' buffer is
what contains the correct properties as it is what it will eventually
be rendered with. For the purpose of rendering, the front buffer
contains the right texture. If no back buffer is present, then there
was no changes and front buffer applies to both.
The Surface's buffer queue has been updated to only fire damage and
advance once we swap back buffer to front buffer which happens during
updatePaintNode(). The fact that the buffer advancing happens during
sync also means that we are releasing buffers back to the client as
soon as another buffer is ready to be displayed in the compositor.
This is "half a frame" earlier than the current implementation (which
releases after the next swap). We consider this safe because:
- The compositor has a new buffer to display and does not need the
old one.
- If the GPU is not done rasterizing the scanout buffer for the
previous frame, it should hold a read-lock on the buffer so
preventing the client from starting a render to it. If this
assumption fails on any hardware we can make the time of
buffer-advance optional. Either during "sync" or during "after
rendering" as it is today, but "after rendering" will not offer any
guarantee, just more time, resulting in a higher chance of the
buffers being ready. Aka, without an internal read-lock and no
fence mechanism, there is no guarantee.
Texture cleanup is now explicit as we have a well defined location to
clean up textures, during updatePaintNode(). This avoids cleanup
issues which previously existed as buffer cleanup was happening on the
GUI thread. Surface and Buffer destruction coming over wayland is
queued up in compositor and handled before the next "sync", when it is
safe to do so.
The change also removes doUpdate, postBuffer and frameSwappedInternal
as these are no longer used. Direct rendering will need to be
considered in a new light with the new buffering scheme, and anyway
needs work.
Change-Id: I2db0385b4b8859f96caba374f3530448178e1473
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
|
Using the texture cache is wrong for two reasons:
1) it's a private API
2) we will get new QImages all the time so the caching is effectively useless
The main problem here is that the textures were not deleted which embedded
systems do not really like.
Change-Id: Ia9bafb0df58491f5ceb08ddcd9bf11b7c6137c83
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
|
Fixes linking on some toolchains where linkage is a bit more restrictive.
Change-Id: I7ec3f2bde009ce6d2e20e4b500a96d234cdcc301
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
|
|
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>
|
|
Change-Id: I4399681dc91ca20a84177247379cf6eafd2b6a6e
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
|
|
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>
|
|
Change-Id: I33950ae923f5edba4faeca26cc0656be0255e403
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
|
Specify precision to make the shader working.
Change-Id: I055fe47e1073403dc981274236fa82e091e0eca4
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
|
|
This simplifies the creation and use of ExtensionFlags.
Change-Id: Ia72bbc3f712759b231d8543a4f13ef2fdf6260f3
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
|
|
Handy when Quick rendering that needs stencil is performed in-process.
Change-Id: Ic6593150ddde217fa0ad257f889eda131fb09095
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
|