TestWaylandSeat::sync() ensures that events and requests can't be
reordered after it. That is, it guarantees that
- events sent from the compositor will be processed by the client
before sync() finishes
- requests issued by the client will be processed by the compositor
before sync() finishes
WaylandSyncPoint relies on the fact that wl_display_sync()'s callback
and other wayland events will be processed in the same event queue.
But, it's not the case right now. The wl_callback belongs to the default
event queue and KWayland::Client::Seat belongs to a different queue.
If the default event queue is dispatched first, the WaylandSyncPoint may
emit the done signal too early.
In order to fix sync(), this change ensures that WaylandSyncPoint's
wl_callback uses the correct event queue.
The test used to verify that kwin doesn't crash when ShellClient sets
new geometry. ShellClient used to access decoration borders without
checking whether decoration() is null.
On the other hand, we've added a bunch of new test cases in
testXdgShellWindow, so let's remove this one. If the bug is back, that
test will fail.
If gbm_bo_get_fd_for_plane() or gbm_bo_get_fd() fails, ensure that the
gbm buffer allocator properly handles it and doesn't return a
GraphicsBuffer object.
This makes it possible to ensure type safety for enums, as each drm property
object can have its own type now, and it reduces the amount of typing needed
to access properties
The test needs OpenGL in order to ensure that the window view effect is
loaded and it registers a screen edge. On the other hand, we could
register a screen edge ourselves and thus allow running the test on
freebsd.
The test fails because it incorrectly handles the server-side and the
client-side virtual desktops being removed within one event loop cycle.
In order to fix the test, this change makes the removal of server-side
virtual desktop object take effect immediately.
testXdgShellWindow already tests intricate subsurface size changes. The
surface pixmaps are handled differently now too, so the test is not
useful as it used to be 4 or 5 years ago.
Before Deleted merge, it used to be equivalent to waiting until the
window is closed.
This fixes tests waiting until the window closing animation completes
and the Window object is destroyed.
testPointerInput requires OpenGL compositing because it wants to test
cursor push back in the window view effect and the window view effect is
available only if OpenGL is supported.
On the other hand, ScreenEdgesTest::testPushBack() already tests similar
scenario, so let's drop relevant test in testPointerInput to allow
running it when using software rendering.
The virtual backend uses the surfaceless platform. On the other hand, we
move in a direction where the graphics buffer type is explicit, which
creates issues for the virtual backend.
This change ports the virtual backend to gbm so we could manually
allocate dmabuf buffers in order to unify buffer handling in kwin.
Its main drawback is that you won't be able to use the virtual backend
on setups without render nodes. On the other hand, given that the
compositor is meaningless without clients being able to share buffers
with it, it's reasonable to require some way to create and export prime
buffers.
Currently the test spends a lot of time idling. This change speeds up
the test by removing QTest::qWait() calls.
The sync() helper was introduced to sync both client and server sides.
It lets us simplify some code and get rid of QTest::qWait()s.
With this change, the execution time will drop from 20s to about 300ms.
Pipewire's buffer meta structure apparently wants the presentation timestamp
to be absolute (where absolute means number of nanoseconds since computer was started).
So subtracting the timestamp of the buffer breaks the timestamps later on in the pipeline.
This feature is no longer needed, as the scene can efficiently do its own
transformations now. Support for using hardware rotation to make direct scanout
work specifically can be added again later
Without hardware rotation, the buffer transform with always be "normal",
so all "normal" client buffers would be accepted for direct scanout, which
is not correct.
CCBUG: 467138
WAYLAND_ONLY will create two tests: one with Xwayland, the other without
Xwayland. This is somewhat wasteful and it results in higher CI times.
On the other hand, Xwayland is started on demand. If a test doesn't need
Xwayland, it won't start.
So let's remove WAYLAND_ONLY in order to lighten kwin on CI resources.
If wayland only tests are needed, we can consider passing the operation
mode to the WAYLANDTEST_MAIN helper, but there aren't such tests afaik.
The main motivation is to avoid scattering graphics buffer things around
kwin.
DmaBufParams struct has been moved to the OutputBackend, but with the
introduction of buffer allocators, we need to port screencasting code to
the new abstractions some time in the future.
A client can specify the following flags when creating a linux dmabuf
client buffer:
- y_invert
- interlaced
- bottom_first
Only the y_invert flag is supported by kwin. The interlaced and the
bottom_first flags are ignored. On the other hand, most clients don't
specify the dmabuf flags. For example, neither EGL nor Vulkan WSIs
use the y_invert flag.
The y_invert flag is undesired because it also blocks optimizations such
as direct scanout because DRM assumes that the origin is in the top left
corner.
Therefore, this change drops the support for linux dmabuf flags. From
the protocol perspective, this is fine. It can be viewed as buffer
import failing with the specified flags.
LinuxDmaBufV1ClientBuffer contains properties (formats, and flags) that
are not available in the base GraphicsBuffer type and there's no reason
to move it there.
In order to get rid of those properties (and eventually hide the
LinuxDmaBufV1ClientBuffer type from the public api), this change adds a
DmaBufAttributes getter in the GraphicsBuffer.
The debug shader is targeted to help with debugging blurriness when
using fractional scaling.
The shader works as follows:
- if the vertex coordinate has fractional part, the item will be
highlighted with blue color
- if the texture coordinate (in device pixels) has fractional part,
the item will be highlighted with red color
The shader can be toggled by setting the KWIN_SCENE_VISUALIZE=fractional
environment variable.